Custom Search

Thursday, July 4, 2013

Django How to make entries into ContentType for new app

Django How to make entries into ContentType for new app
 

How to fix following errors
---------------------------

a) 
DoesNotExist: ContentType matching query does not exist. Lookup parameters were {'model': 'years', 'app_label': 'setting'}

b)

DoesNotExist: Permission matching query does not exist. Lookup parameters were {'codename': 'add_years', 'content_type': }

Solution
======

1)
Goto "settings.py" and keep only following lines in "INSTALLED_APPS".
INSTALLED_APPS = ['django.contrib.auth',
'django.contrib.contenttypes',
'iekb.mynewapp']

2)
Run syncdb
#python manage.py syncdb

No comments:

Post a Comment