Anybody can help about Django Auth Login please ?
On Sun, Jul 1, 2018 at 3:27 PM Umar Kambala <[email protected]> wrote: > Am very grateful > On Jun 30, 2018 1:05 PM, "Anirudh Jain" <[email protected]> > wrote: > >> You forgot to put 'comma' after DIRS': [os.path.join(BASE_DIR, >> 'templates')] in templates. >> >> It should be DIRS': [os.path.join(BASE_DIR, 'templates')], >> >> On Sat 30 Jun, 2018, 15:52 Umar Kambala, <[email protected]> wrote: >> >>> >>> this are my codes... >>> >>> # SECURITY WARNING: don't run with debug turned on in production! >>> DEBUG = True >>> >>> ALLOWED_HOSTS = ['127.0.0.1', '.pythonanywhere.com'] >>> ALLOWED_HOSTS = ['localhost', '.pythonanywhere.com'] >>> >>> >>> # Application definition >>> >>> INSTALLED_APPS = [ >>> 'polls.apps.PollsConfig', >>> 'django.contrib.admin', >>> 'django.contrib.auth', >>> 'django.contrib.contenttypes', >>> 'django.contrib.sessions', >>> 'django.contrib.messages', >>> 'django.contrib.staticfiles', >>> ] >>> >>> MIDDLEWARE = [ >>> 'django.middleware.security.SecurityMiddleware', >>> 'django.contrib.sessions.middleware.SessionMiddleware', >>> 'django.middleware.common.CommonMiddleware', >>> 'django.middleware.csrf.CsrfViewMiddleware', >>> 'django.contrib.auth.middleware.AuthenticationMiddleware', >>> 'django.contrib.messages.middleware.MessageMiddleware', >>> 'django.middleware.clickjacking.XFrameOptionsMiddleware', >>> ] >>> >>> ROOT_URLCONF = 'mysite.urls' >>> >>> TEMPLATES = [ >>> { >>> 'BACKEND': 'django.template.backends.django.DjangoTemplates', >>> 'DIRS': [os.path.join(BASE_DIR, 'templates')] >>> 'APP_DIRS': True, >>> 'OPTIONS': { >>> 'context_processors': [ >>> 'django.template.context_processors.debug', >>> 'django.template.context_processors.request', >>> 'django.contrib.auth.context_processors.auth', >>> 'django.contrib.messages.context_processors.messages', >>> ], >>> }, >>> }, >>> ] >>> >>> WSGI_APPLICATION = 'mysite.wsgi.application' >>> >>> >>> # Database >>> # https://docs.djangoproject.com/en/2.0/ref/settings/#databases >>> >>> DATABASES = { >>> 'default': { >>> 'ENGINE': 'django.db.backends.sqlite3', >>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), >>> } >>> } >>> >>> >>> # Password validation >>> # >>> https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators >>> >>> AUTH_PASSWORD_VALIDATORS = [ >>> { >>> 'NAME': >>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', >>> }, >>> { >>> 'NAME': >>> 'django.contrib.auth.password_validation.MinimumLengthValidator', >>> }, >>> { >>> 'NAME': >>> 'django.contrib.auth.password_validation.CommonPasswordValidator', >>> }, >>> { >>> 'NAME': >>> 'django.contrib.auth.password_validation.NumericPasswordValidator', >>> }, >>> ] >>> >>> >>> # Internationalization >>> # https://docs.djangoproject.com/en/2.0/topics/i18n/ >>> >>> LANGUAGE_CODE = 'en-us' >>> >>> TIME_ZONE = 'GMT' >>> >>> USE_I18N = True >>> >>> USE_L10N = True >>> >>> USE_TZ = True >>> >>> >>> # Static files (CSS, JavaScript, Images) >>> # https://docs.djangoproject.com/en/2.0/howto/static-files/ >>> >>> STATIC_URL = '/static/' >>> STATIC_ROOT = os.path.join(BASE_DIR, 'STATIC') >>> MASSAGE_STORAGE = 'django.contrib.message.storage.session.SessionStorage' >>> >>> >>> this what i get when i run python manage.py runserver >>> line 371, in execute_from_command_line >>> utility.execute() >>> File >>> "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", >>> line 317, in execute >>> settings.INSTALLED_APPS >>> File >>> "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\conf\__init__.py", >>> line 56, in __getattr__ >>> self._setup(name) >>> File >>> "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\conf\__init__.py", >>> line 43, in _setup >>> self._wrapped = Settings(settings_module) >>> File >>> "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\conf\__init__.py", >>> line 106, in __init__ >>> mod = importlib.import_module(self.SETTINGS_MODULE) >>> File >>> "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", >>> line 126, in import_module >>> return _bootstrap._gcd_import(name[level:], package, level) >>> File "<frozen importlib._bootstrap>", line 994, in _gcd_import >>> File "<frozen importlib._bootstrap>", line 971, in _find_and_load >>> File "<frozen importlib._bootstrap>", line 955, in >>> _find_and_load_unlocked >>> File "<frozen importlib._bootstrap>", line 665, in _load_unlocked >>> File "<frozen importlib._bootstrap_external>", line 674, in exec_module >>> File "<frozen importlib._bootstrap_external>", line 781, in get_code >>> File "<frozen importlib._bootstrap_external>", line 741, in >>> source_to_code >>> File "<frozen importlib._bootstrap>", line 219, in >>> _call_with_frames_removed >>> File "C:\Users\Admin\Desktop\Djan Polls\mysite\mysite\settings.py", >>> line 60 >>> 'APP_DIRS': True, >>> ^ >>> SyntaxError: invalid syntax >>> >>> On Fri, Jun 29, 2018 at 6:00 AM, Mikhailo Keda <[email protected]> >>> wrote: >>> >>>> show your code >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/django-users. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/3d5e9f26-3170-440f-b06b-9b9f7ef976d0%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-users/3d5e9f26-3170-440f-b06b-9b9f7ef976d0%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAPkbFbZSz-KFDZ1HdKCAgXCTb-noVmLWPUM-p2ijZxuK0Kjwow%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAPkbFbZSz-KFDZ1HdKCAgXCTb-noVmLWPUM-p2ijZxuK0Kjwow%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAC3mK7dC44w-vAvPruFcKJ4yQsk%2BROzNHmiFFWb%2Bzq4PqQOLdA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAC3mK7dC44w-vAvPruFcKJ4yQsk%2BROzNHmiFFWb%2Bzq4PqQOLdA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPkbFbYDRnORXrgO6xBmD-pH%2B9RGAfZzWH4wWFk%2BOy3AB8%2B2nw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPkbFbYDRnORXrgO6xBmD-pH%2B9RGAfZzWH4wWFk%2BOy3AB8%2B2nw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALmQFgCHLvUPQ-gezCLdR1mQZv5-O51_824s_uKQLcuYpYmDJA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

