Error:django.core.exceptions.ImproperlyConfigured

0 votes

I have tried to sync my db with the code to create the necessary tables but I get the following error.

C:\Users\jont\Documents\ATP\Webapp>manage.py syncdb
C:\Python27\lib\site-packages\admin_tools\utils.py:9: RemovedInDjango19Warning:      
django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module

c:\users\jont\documents\django-trunk\django\contrib\contenttypes\models.py:148:  
RemovedInDjango19Warning: Model class django.contrib.contenttypes.models.ContentType doesn't de
her isn't in an application in INSTALLED_APPS or else was imported before its application was  
loaded. This will no longer be supported in Django 1.9.
class ContentType(models.Model):

C:\Python27\lib\site-packages\admin_tools\dashboard\modules.py:8: RemovedInDjango19Warning: The 
django.forms.util module has been renamed. Use django.forms.utils instead.
from django.forms.util import flatatt

C:\Python27\lib\site-packages\django_tables2\tables.py:171: RemovedInDjango19Warning: SortedDict
is deprecated and will be removed in Django 1.9. attrs["base_columns"] =  
SortedDict(parent_columns)

C:\Python27\lib\site-packages\django_tables2\tables.py:193: RemovedInDjango19Warning: SortedDict 
is deprecated and will be removed in Django 1.9.
attrs["base_columns"].update(SortedDict(cols))

Traceback (most recent call last):
File "C:\Users\jont\Documents\ATP\Webapp\manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "c:\users\jont\documents\django-trunk\django\core\management\__init__.py", line 336, in
execute_from_command_line
utility.execute()
File "c:\users\jont\documents\django-trunk\django\core\management\__init__.py", line 310, in 
execute
django.setup()
File "c:\users\jont\documents\django-trunk\django\__init__.py", line 23, in setup
apps.populate(settings.INSTALLED_APPS)
File "c:\users\jont\documents\django-trunk\django\apps\registry.py", line 115, in populate
app_config.ready()

How to fix this error?

Jul 3 in Python by kartik
• 19,630 points
82 views

1 answer to this question.

0 votes

Hello @kartik,

You can set fields or exclude in the ModelForm in Django 1.7. It changes in 1.8, you should set fields or exclude in the Meta class within ModelForm.

class JobForm(models.ModelForm):
#fields

class Meta:
    model = Job
    fields = "__all__" 

Hope it helps!!

answered Jul 3 by Niroj
• 41,480 points

Related Questions In Python

0 votes
1 answer

Django Postgresql syncdb error

If you're trying to connect to a ...READ MORE

answered May 27, 2019 in Python by SDeb
• 13,250 points
237 views
+1 vote
1 answer

Django not found error

Before installing Django make sure you have ...READ MORE

answered Jun 24, 2019 in Python by Fata
• 1,050 points
254 views
0 votes
1 answer

Error:django MultiValueDictKeyError

Hello @kartik, Use the MultiValueDict's get method. This is also ...READ MORE

answered May 20 in Python by Niroj
• 41,480 points
444 views
0 votes
1 answer

Error:django-debug-toolbar breaking on admin while getting sql stats

Hello @kartik, You just need to be able ...READ MORE

answered Jun 12 in Python by Niroj
• 41,480 points
68 views
0 votes
1 answer

How to temporarily disable a foreign key constraint in MySQL?

Hello @kartik, To turn off foreign key constraint ...READ MORE

answered Jun 23 in Python by Niroj
• 41,480 points
58 views
0 votes
1 answer

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

answered Jun 23 in Python by Niroj
• 41,480 points
40 views
0 votes
1 answer
0 votes
1 answer

Error: port is already in use of Django Server

Hii @kartik, Just type sudo fuser -k 8000/tcp. This ...READ MORE

answered May 6 in Python by Niroj
• 41,480 points
205 views