Code

Opened 2 years ago

Closed 2 years ago

#18138 closed Uncategorized (invalid)

Django admin site not working

Reported by: melsebaey@… Owned by: nobody
Component: Uncategorized Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by kmtracey)

Hi,
I'm a new user for django, I started using the tutorial for ver 1.4 with python 2.7.1 on mac 10.7.3
when i try to open the admin site it' gives me the following error

DoesNotExist at /admin/
Site matching query does not exist.
Request Method:	GET
Request URL:	http://127.0.0.1:8000/admin/
Django Version:	1.4
Exception Type:	DoesNotExist
Exception Value:	
Site matching query does not exist.
Exception Location:	/Library/Python/2.7/site-packages/Django-1.4-py2.7.egg/django/db/models/query.py in get, line 366
Python Executable:	/usr/bin/python
Python Version:	2.7.1
Python Path:	
['/Users/mohammedelsebaey/a/mysite1',
 '/Library/Python/2.7/site-packages/Django-1.4-py2.7.egg',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages']
Server time:	Sun, 15 Apr 2012 07:08:37 -0500

This is the installed applications part in the settings.py

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'polls',
    # Uncomment the next line to enable the admin:
     'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
     #'django.contrib.admindocs',
)

and this is the urls.py

from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'mysite1.views.home', name='home'),
    # url(r'^mysite1/', include('mysite1.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

thanks

Attachments (1)

Screen Shot 2012-04-15 at 3.17.12 PM.png (172.1 KB) - added by melsebaey@… 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by melsebaey@…

comment:1 Changed 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

If you need help using Django, please see TicketClosingReasons/UseSupportChannels.

comment:2 Changed 2 years ago by melsebaey

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:3 Changed 2 years ago by kmtracey

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from reopened to closed

Please follow the link above to find appropriate places to get help with resolving this issue. This is not a bug in Django, and Trac is not the right place to be asking for help. Also please use WikiFormatting and preview before posting so that your report can be read properly.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.