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, 2020 in Python by kartik
• 37,520 points
3,180 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, 2020 by Niroj
• 82,840 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,300 points
1,581 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
2,655 views
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, 2020 in Python by Niroj
• 82,840 points
15,492 views
0 votes
1 answer

Error:django MultiValueDictKeyError

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

answered May 20, 2020 in Python by Niroj
• 82,840 points
35,780 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, 2020 in Python by Niroj
• 82,840 points
2,437 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, 2020 in Python by Niroj
• 82,840 points
1,555 views
0 votes
1 answer
0 votes
1 answer

Error: No module named 'django.core.urlresolvers'

Hello @kartik, If you want to import reverse, ...READ MORE

answered Aug 5, 2020 in Python by Niroj
• 82,840 points
9,690 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP