from .models import *
Monday, 1 July 2019
Saturday, 29 June 2019
Creating a New Project
Navigate to where you want to store your Django apps
like E drive or F drive 1) cd f:
then
2) django-admin startproject projectname
like E drive or F drive 1) cd f:
then
2) django-admin startproject projectname
Friday, 28 June 2019
NameError: name 'include' is not defined
you have to import include
from django.core import urlresolvers ImportError: cannot import name 'urlresolvers' from 'django.core'
This is Django Version issue.
For versions > 1.10, use
from django.urls import reverse
instead of " from django.core import urlresolvers "
For versions > 1.10, use
from django.urls import reverse
instead of " from django.core import urlresolvers "
ImportError: failed to find libmagic. Check your installation
1) uninstall python-magic
pip uninstall python-magic
2) install python-magic-bin==0.4.14
pip install python-magic-bin==0.4.14
pip uninstall python-magic
2) install python-magic-bin==0.4.14
pip install python-magic-bin==0.4.14
Monday, 24 June 2019
Getting Server Error (500) on starting the server in local
Set DEBUG = True in settings.py file
Note: Make sure to set its value to False in production.
Note: Make sure to set its value to False in production.
ImportError: cannot import name 'patterns' from 'django.conf.urls'
pattern is removed from 1.8+ DJango version
You can write
from django.conf.urls import include, url
urlpatterns = [
.
.
.
]
You can write
from django.conf.urls import include, url
urlpatterns = [
.
.
.
]
Subscribe to:
Posts (Atom)
TypeError: argument of type 'WindowsPath' is not iterable
Please make to modify settings.py file: DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.sqlite3...
-
Try running below command in Command prompt pip install django-phonenumber-field
-
Please make to modify settings.py file: DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.sqlite3...
-
Try to install with pip3: pip3 install django-widget-tweaks