OperationalError at /result unable to open database file - python

I have this error for 2 days now I triyed everything in the other topics nothings works for me. The code of the app was written in linux, but i got the folder and connected it to my project as an app, in this project there is 3 apps that are connecting good to the database, only this one gives an error unable to open data base. I'm using Windows on Localhost, a friend triyed on windows and it's working for him, only for me not working.
Note : When I go to localhost:8000/admin I can see the model created on the database.
PLEASE HELP!
Django Version: 2.2.3
I have tryied to give permissions of the folder on it's proprieties to read and write, tryied to change path of DIR, I switched from sqlite3 to postgres, made full path in database and not full one, triyed all the recommandations on topics but still shows the error
Settings. py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'devee',
'USER': 'postgres',
'PASSWORD': 'thepasswordichoosed',
'HOST': 'localhost',
'PORT': '5432',
}
}
Environment:
Request Method: POST
Request URL: http://localhost:8000/result
Django Version: 2.2.3
Python Version: 3.7.3
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dashboard',
'account',
'analyse']
Installed 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']
Traceback:
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\django\core\handlers\exception.py" in inner
34. response = get_response(request)
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\django\core\handlers\base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\django\core\handlers\base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\django\views\decorators\csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "C:\Users\I500913\Desktop\Projets\final\analyse\views.py" in analyse_result
22. seo_score, report = scrapper(website)
File "C:\Users\I500913\Desktop\Projets\final\analyse\seo_scrapper.py" in scrapper
411. sbl = SafeBrowsingList(api_key)
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\gglsbl\client.py" in __init__
35. self.storage = SqliteStorage(db_path, timeout=timeout)
File "C:\Users\I500913\AppData\Local\Continuum\anaconda3\lib\site-packages\gglsbl\storage.py" in __init__
73. self.db = sqlite3.connect(db_path, timeout)
Exception Type: OperationalError at /result
Exception Value: unable to open database file

Related

Error in sending mail via STMP in aws elasticbeanstalk

I am unable to resolve this error. I am running django. It works properly on my local, but I have deployed the code to aws elasticbeanstalk where it throws the below error.
Also my smtp configuration is something like this.
I have also tried to ALLOW low secure apps in Google settings.
But nothing seems to work.
# SMTP configuration
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'email#gmail.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
Environment:
Request Method: POST
Request URL: http://odm-masala-app-env.eba-ijhfppue.us-west-2.elasticbeanstalk.com/accounts/register/
Django Version: 3.1
Python Version: 3.7.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'category',
'accounts',
'store',
'carts',
'orders',
'admin_honeypot',
'storages']
Installed 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',
'django_session_timeout.middleware.SessionTimeoutMiddleware']
Traceback (most recent call last):
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/app/current/accounts/views.py", line 53, in register
send_email.send()
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/mail/message.py", line 284, in send
return self.get_connection(fail_silently).send_messages([self])
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
new_conn_created = self.open()
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 69, in open
self.connection.login(self.username, self.password)
File "/usr/lib64/python3.7/smtplib.py", line 730, in login
raise last_exception
File "/usr/lib64/python3.7/smtplib.py", line 721, in login
initial_response_ok=initial_response_ok)
File "/usr/lib64/python3.7/smtplib.py", line 642, in auth
raise SMTPAuthenticationError(code, resp)
Exception Type: SMTPAuthenticationError at /accounts/register/
Exception Value: (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbt\n5.7.14 JzmJlDR_KXwRjsGoeGbUwfJiFaseGdN7r4Tr5kVIBAWkZ_KxJtmoZ21tvxssaWR96lYr1\n5.7.14 1McFMOBeAoLgjKAhaZSf7Z0H7mCYUPyXbKlQ-CmDohYCNFK3GmWZG47EBOB2uOnH>\n5.7.14 Please log in via your web browser and then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 63sm12202837pfz.119 - gsmtp')
This is because gmail uses captcha verification, please try disabling it from below link.
https://accounts.google.com/DisplayUnlockCaptcha

django-rest-registration 0.5.1 throws RESET_PASSWORD_VERIFICATION_URL and RESET_PASSWORD_VERIFICATION_URL are not set, even if they are set

I am creating REST api, with Django Rest Framework, and first of all I have to give users the way to register. I saw django-rest-registration as easy way to make this, but when I did everything as is said in Quickstart, my terminal throws those errors:
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
?: (rest_registration.E001) RESET_PASSWORD_VERIFICATION_URL is not set
?: (rest_registration.E004) VERIFICATION_FROM_EMAIL is not set
System check identified 2 issues (0 silenced).
Here's my code:
settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'corsheaders',
'rest_registration',
'app',
]
REST_REGISTRATION = {
'REGISTER_VERIFICATION_ENABLED': False,
'REGISTER_EMAIL_VERIFICATION_ENABLED': False,
'RESET_PASSWORD_VERIFICATION_ENABLED': False,
}
urlpatterns:
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('app.urls')),
path('accounts/', include('rest_registration.api.urls')),
]
But, when I tried to change REST_REGISTRATION to this:
REST_REGISTRATION = {
'REGISTER_VERIFICATION_URL': 'https://frontend-host/verify-user/',
'RESET_PASSWORD_VERIFICATION_URL': 'https://frontend-host/reset-password/',
'REGISTER_EMAIL_VERIFICATION_URL': 'https://frontend-host/verify-email/',
'VERIFICATION_FROM_EMAIL': 'no-reply#example.com',
}
and I submitted the request, I saw another error:
ConnectionRefusedError at /accounts/register/
+ Traceback:
Environment:
Request Method: POST
Request URL: http://localhost:8000/accounts/register/
Django Version: 2.2.3
Python Version: 3.7.3
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'corsheaders',
'rest_registration',
'app']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
495. response = self.handle_exception(exc)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
455. self.raise_uncaught_exception(exc)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
492. response = handler(request, *args, **kwargs)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_framework/decorators.py" in handler
55. return func(*args, **kwargs)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_registration/api/views/register.py" in register
96. send_verification_notification(user, signer, template_config)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_registration/notifications/email.py" in send_verification_notification
24. send_notification(notification)
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/rest_registration/notifications/email.py" in send_notification
209. notification.send()
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/mail/message.py" in send
291. return self.get_connection(fail_silently).send_messages([self])
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/mail/backends/smtp.py" in send_messages
103. new_conn_created = self.open()
File "/home/fullnamedebian/.local/lib/python3.7/site-packages/django/core/mail/backends/smtp.py" in open
63. self.connection = self.connection_class(self.host, self.port, **connection_params)
File "/usr/lib/python3.7/smtplib.py" in __init__
251. (code, msg) = self.connect(host, port)
File "/usr/lib/python3.7/smtplib.py" in connect
336. self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python3.7/smtplib.py" in _get_socket
307. self.source_address)
File "/usr/lib/python3.7/socket.py" in create_connection
727. raise err
File "/usr/lib/python3.7/socket.py" in create_connection
716. sock.connect(sa)
Exception Type: ConnectionRefusedError at /accounts/register/
Exception Value: [Errno 111] Connection refused
I added email settings:
# Email settings
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 8000
And now when I submit post I just see this in terminal: [22/Sep/2019 14:44:54] "POST /accounts/register/ HTTP/1.1" 400 13646 (Its drawn with red font, if it matters). And webpage is loading infinitley.

django template errno 13

I have a problem with django template. I made new template file in pycharm and in code i think all is good. But i have errno 13 permission denied. Other templates are working fine.
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/Doggo/2/results/
Django Version: 1.11
Python Version: 3.6.1
Installed Applications:
['Doggo.apps.DoggoConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "C:\Python36-32\lib\site-packages\django\core\handlers\exception.py" in inner
41. response = get_response(request)
File "C:\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
217. response = self.process_exception_by_middleware(e, request)
File "C:\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
215. response = response.render()
File "C:\Python36-32\lib\site-packages\django\template\response.py" in render
107. self.content = self.rendered_content
File "C:\Python36-32\lib\site-packages\django\template\response.py" in rendered_content
82. template = self.resolve_template(self.template_name)
File "C:\Python36-32\lib\site-packages\django\template\response.py" in resolve_template
64. return select_template(template, using=self.using)
File "C:\Python36-32\lib\site-packages\django\template\loader.py" in select_template
48. return engine.get_template(template_name)
File "C:\Python36-32\lib\site-packages\django\template\backends\django.py" in get_template
39. return Template(self.engine.get_template(template_name), self)
File "C:\Python36-32\lib\site-packages\django\template\engine.py" in get_template
162. template, origin = self.find_template(template_name)
File "C:\Python36-32\lib\site-packages\django\template\engine.py" in find_template
136. name, template_dirs=dirs, skip=skip,
File "C:\Python36-32\lib\site-packages\django\template\loaders\base.py" in get_template
38. contents = self.get_contents(origin)
File "C:\Python36-32\lib\site-packages\django\template\loaders\filesystem.py" in get_contents
28. with io.open(origin.name, encoding=self.engine.file_charset) as fp:
Exception Type: PermissionError at /Doggo/2/results/
Exception Value: [Errno 13] Permission denied: 'C:\\Users\\noob1_000\\PycharmProjects\\eWybory\\Doggo\\templates'
i think i have permission to this folder because other templates are working.
I'm working on windows 10
I would recommend to go through this-
Also , the view that you uses the template are also in the same directory as other views since you said that other views are able to access their templates ?
Let me know , if this solves your problem
Maybe you are just forgetting to indicate the template path (template / app/index.html) in the views.py.

django upgrade from 1.9 to 1.10 __init__() got an unexpected keyword argument 'current_app'

ive just upgraded Django from 1.9 to 1.10. i run 1.10 in my test environment and ironed out any upgrade issues to make sure it all worked.
however when ive gone to do it on my live site and gone to load the home page i get the errors below
Environment:
Request Method: GET
Request URL: http://it.local.com/
Django Version: 1.10.5
Python Version: 2.7.5
Installed Applications:
('home.apps.HomeConfig',
'oncall.apps.OncallConfig',
'tools.apps.ToolsConfig',
'sites.apps.SitesConfig',
'maintenance.apps.MaintenanceConfig',
'service.apps.ServiceConfig',
'management.apps.ManagementConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'bootstrap_pagination',
'easy_thumbnails')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware')
Traceback:
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/infternal/home/views.py" in index
13. return render(request, 'home/index.html', {"user": user})
File "/usr/lib/python2.7/site-packages/django/shortcuts/__init__.py" in render
49. context_instance = RequestContext(request, current_app=current_app)
Exception Type: TypeError at /
Exception Value: __init__() got an unexpected keyword argument 'current_app'
It looks like you haven't installed Django 1.10 properly. The line from the traceback context_instance = RequestContext(request, current_app=current_app) does not exist in Django 1.10. I would try uninstalling and reinstalling Django, and then restarting the server.

Exception Value: 'DatabaseWrapper' object has no attribute 'Database'

I looked at the similar posts before entering this question. I am using Django 1.5, Python 3.3.2, and MySQL 5.6 / Connector.
I am new to Django/Python and working my way through basic tutorial. I created a MySQL database , sync a very simple model, and started basic web server.
I have added entries to the tables via the basic shell commands and everything worked fine.
However when I log into admin portal it immediately throws an exception.
The traceback I see on my browser when I successfully log into the admin portal is:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.6
Python Version: 3.3.2
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'webmgr')
Installed Middleware:
('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')
Traceback:
File "C:\Python33\lib\site-packages\django\core\handlers\base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Python33\lib\site-packages\django\contrib\admin\sites.py" in wrapper
215. return self.admin_view(view, cacheable)(*args, **kwargs)
File "C:\Python33\lib\site-packages\django\utils\decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\contrib\admin\sites.py" in inner
197. return self.login(request)
File "C:\Python33\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\contrib\admin\sites.py" in login
330. return login(request, **defaults)
File "C:\Python33\lib\site-packages\django\views\decorators\debug.py" in sensitive_post_parameters_wrapper
75. return view(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\utils\decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "C:\Python33\lib\site-packages\django\contrib\auth\views.py" in login
43. auth_login(request, form.get_user())
File "C:\Python33\lib\site-packages\django\contrib\auth\__init__.py" in login
83. request.session.cycle_key()
File "C:\Python33\lib\site-packages\django\contrib\sessions\backends\base.py" in cycle_key
277. self.create()
File "C:\Python33\lib\site-packages\django\contrib\sessions\backends\db.py" in create
40. self.save(must_create=True)
File "C:\Python33\lib\site-packages\django\contrib\sessions\backends\db.py" in save
63. obj.save(force_insert=must_create, using=using)
File "C:\Python33\lib\site-packages\django\db\transaction.py" in __exit__
298. connection.savepoint_commit(sid)
File "C:\Python33\lib\site-packages\django\db\backends\__init__.py" in savepoint_commit
249. self._savepoint_commit(sid)
File "C:\Python33\lib\site-packages\django\db\backends\__init__.py" in _savepoint_commit
203. self.cursor().execute(self.ops.savepoint_commit_sql(sid))
File "C:\Python33\lib\site-packages\django\db\backends\util.py" in execute
69. return super(CursorDebugWrapper, self).execute(sql, params)
File "C:\Python33\lib\site-packages\django\db\backends\util.py" in execute
53. return self.cursor.execute(sql, params)
File "C:\Python33\lib\site-packages\django\db\utils.py" in __exit__
86. db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__)
Exception Type: AttributeError at /admin/
Exception Value: 'DatabaseWrapper' object has no attribute 'Database'
My settings file looks like:
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ''
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'webmgr',
)
MIDDLEWARE_CLASSES = (
'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 = 'gymweb.urls'
WSGI_APPLICATION = 'gymweb.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'NAME': 'twntest',
'ENGINE': 'mysql.connector.django',
'USER': 'root',
'PASSWORD': '**********',
'OPTIONS': {
'autocommit': True,
},
}
}
"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
"""
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
Reinstall django. Seems like you have installed django 1.5 on top of 1.4

Categories