Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango admin page error
    primarykey
    data
    text
    <p>I was creating a Django app. Doing so i enabled the Django admin site and i could see it working fine. Then i created some models and inserted data into it through the form in my app. But i am not able to see the entered values through admin panel of Django. I found that its because i havent included an admin.py file in my application folder. Then i created an admin.py file, ran syndb and tried. Now its throwing an error</p> <p><code>ImportError at /admin/<br> No module named UniversityDetails.models</code></p> <p>I will paste my admin.py, models.py and project folder structure. Please help me to solve this.</p> <p><strong>Models.py</strong></p> <pre><code>from django.db import models class UniversityDetails(models.Model): firstName = models.CharField(max_length=200) lastName = models.CharField(max_length=200) email = models.EmailField() password = models.TextField() birthday = models.TextField() sex = models.CharField(max_length=10) </code></pre> <p><strong>admin.py</strong></p> <pre><code>from universityDetails.models import * from django.contrib import admin admin.site.register(UniversityDetails) </code></pre> <p>Project Name :<strong>universityDB</strong><br> Application Name : <strong>universityDetails</strong></p> <p><strong>TRACEBACK</strong></p> <pre><code> Environment: Request Method: GET Request URL: http://10.1.0.90:8080/admin/ Django Version: 1.2.5 Python Version: 2.6.5 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'universityDetails', 'django.contrib.admin'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfResponseMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response 91. request.path_info) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve 215. for pattern in self.url_patterns: File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in _get_url_patterns 244. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in _get_urlconf_module 239. self._urlconf_module = import_module(self.urlconf_name) File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py" in import_module 35. __import__(name) File "/home/rv/Desktop/universityDB/../universityDB/urls.py" in &lt;module&gt; 5. admin.autodiscover() File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/__init__.py" in autodiscover 24. import_module('%s.admin' % app) File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py" in import_module 35. __import__(name) File "/home/rv/Desktop/universityDB/universityDetails/admin.py" in &lt;module&gt; 1. from UniversityDetails.models import * Exception Type: ImportError at /admin/ Exception Value: No module named UniversityDetails.models </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload