# Path: account/conf.py
# def load_path_attr(path):
#     def configure_hookset(self, value):
# class AccountAppConf(AppConf):
#     OPEN_SIGNUP = True
#     LOGIN_URL = "account_login"
#     LOGOUT_URL = "account_logout"
#     SIGNUP_REDIRECT_URL = "/"
#     LOGIN_REDIRECT_URL = "/"
#     LOGOUT_REDIRECT_URL = "/"
#     PASSWORD_CHANGE_REDIRECT_URL = "account_password"
#     PASSWORD_RESET_REDIRECT_URL = "account_login"
#     PASSWORD_RESET_TOKEN_URL = "account_password_reset_token"
#     PASSWORD_EXPIRY = 0
#     PASSWORD_USE_HISTORY = False
#     PASSWORD_STRIP = True
#     REMEMBER_ME_EXPIRY = 60 * 60 * 24 * 365 * 10
#     USER_DISPLAY = lambda user: user.username  # noqa
#     CREATE_ON_SAVE = True
#     EMAIL_UNIQUE = True
#     EMAIL_CONFIRMATION_REQUIRED = False
#     EMAIL_CONFIRMATION_EMAIL = True
#     EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
#     EMAIL_CONFIRMATION_AUTO_LOGIN = False
#     EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = "account_login"
#     EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = None
#     EMAIL_CONFIRMATION_URL = "account_confirm_email"
#     SETTINGS_REDIRECT_URL = "account_settings"
#     NOTIFY_ON_PASSWORD_CHANGE = True
#     DELETION_EXPUNGE_HOURS = 48
#     DEFAULT_HTTP_PROTOCOL = "https"
#     HOOKSET = "account.hooks.AccountDefaultHookSet"
#     TIMEZONES = TIMEZONES
#     LANGUAGES = LANGUAGES
# 
# Path: account/models.py
# class PasswordExpiry(models.Model):
#     """
#     Holds the password expiration period for a single user.
#     """
#     user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name="password_expiry", verbose_name=_("user"), on_delete=models.CASCADE)
#     expiry = models.PositiveIntegerField(default=0)


from django.contrib.auth import get_user_model
from django.core.management.base import LabelCommand
from account.conf import settings
from account.models import PasswordExpiry



class Command(LabelCommand):

    help = "Create user-specific password expiration period."
    label = "username"

    def add_arguments(self, parser):
        super(Command, self).add_arguments(parser)
        parser.add_argument(

# Path: account/conf.py
# def load_path_attr(path):
#     def configure_hookset(self, value):
# class AccountAppConf(AppConf):
#     OPEN_SIGNUP = True
#     LOGIN_URL = "account_login"
#     LOGOUT_URL = "account_logout"
#     SIGNUP_REDIRECT_URL = "/"
#     LOGIN_REDIRECT_URL = "/"
#     LOGOUT_REDIRECT_URL = "/"
#     PASSWORD_CHANGE_REDIRECT_URL = "account_password"
#     PASSWORD_RESET_REDIRECT_URL = "account_login"
#     PASSWORD_RESET_TOKEN_URL = "account_password_reset_token"
#     PASSWORD_EXPIRY = 0
#     PASSWORD_USE_HISTORY = False
#     PASSWORD_STRIP = True
#     REMEMBER_ME_EXPIRY = 60 * 60 * 24 * 365 * 10
#     USER_DISPLAY = lambda user: user.username  # noqa
#     CREATE_ON_SAVE = True
#     EMAIL_UNIQUE = True
#     EMAIL_CONFIRMATION_REQUIRED = False
#     EMAIL_CONFIRMATION_EMAIL = True
#     EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
#     EMAIL_CONFIRMATION_AUTO_LOGIN = False
#     EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = "account_login"
#     EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = None
#     EMAIL_CONFIRMATION_URL = "account_confirm_email"
#     SETTINGS_REDIRECT_URL = "account_settings"
#     NOTIFY_ON_PASSWORD_CHANGE = True
#     DELETION_EXPUNGE_HOURS = 48
#     DEFAULT_HTTP_PROTOCOL = "https"
#     HOOKSET = "account.hooks.AccountDefaultHookSet"
#     TIMEZONES = TIMEZONES
#     LANGUAGES = LANGUAGES
# 
# Path: account/models.py
# class PasswordExpiry(models.Model):
#     """
#     Holds the password expiration period for a single user.
#     """
#     user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name="password_expiry", verbose_name=_("user"), on_delete=models.CASCADE)
#     expiry = models.PositiveIntegerField(default=0)


# Path: account/management/commands/user_password_expiry.py
from django.contrib.auth import get_user_model
from django.core.management.base import LabelCommand
from account.conf import settings
from account.models import PasswordExpiry




class Command(LabelCommand):

    help = "Create user-specific password expiration period."
    label = "username"

    def add_arguments(self, parser):
        super(Command, self).add_arguments(parser)
        parser.add_argument(

            "-e", "--expire",