admin site not available after modifying base_site.html

76 views
Skip to first unread message

Eric G

unread,
Aug 6, 2014, 4:43:34 AM8/6/14
to django...@googlegroups.com
Hey everyone,

I was doing the "Writing your first Django App, part 2" tutorial when I got to the portion where I customize the project's template. I must have screwed up by overriding the base_site.html code in the source file with the default file. Now the 127.0.0.1:8000/admin/ site isn't available. How can I make the admin site accessible again? I changed the source file's base_site.html code to the one shown in here https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base_site.html 

Collin Anderson

unread,
Aug 6, 2014, 8:27:12 AM8/6/14
to django...@googlegroups.com
Now the 127.0.0.1:8000/admin/ site isn't available.

What happens when you try? 

juantonio v

unread,
Aug 6, 2014, 9:26:50 AM8/6/14
to django...@googlegroups.com
No estás haciendo la referencia al archivo por el nombre. Renombrado tu archivo HTML a base.html

Eric G

unread,
Aug 6, 2014, 2:30:40 PM8/6/14
to django...@googlegroups.com
I'm on Google Chrome, so it reads, "This webpage is not available."

Collin Anderson

unread,
Aug 6, 2014, 2:33:57 PM8/6/14
to django...@googlegroups.com
is your dev server (runserver) still running?

François Schiettecatte

unread,
Aug 6, 2014, 2:34:07 PM8/6/14
to django...@googlegroups.com
This suggests the server is not running, can you get to http://127.0.0.1:8000/ ?
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/47004884-88cc-47ee-8416-ee384e3d1b3f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Amol

unread,
Aug 6, 2014, 5:55:03 PM8/6/14
to django...@googlegroups.com
Did you make sure to uncomment the admin auto discover in urls.py and installed apps in settings? I find it easy to overlook those things and causes major headache. 

Eric G

unread,
Aug 6, 2014, 6:26:37 PM8/6/14
to django...@googlegroups.com


On Wednesday, August 6, 2014 6:26:50 AM UTC-7, juantonio v wrote:
No estás haciendo la referencia al archivo por el nombre. Renombrado tu archivo HTML a base.html

So I'm supposed to modify the base.html file instead of the base-site.html file? 

On Wednesday, August 6, 2014 11:34:07 AM UTC-7, François Schiettecatte wrote:
This suggests the server is not running, can you get to http://127.0.0.1:8000/  ? 

No, I can't get to that either. 

On Wednesday, August 6, 2014 11:33:57 AM UTC-7, Collin Anderson wrote:
is your dev server (runserver) still running? 

I don't think so. The server was okay right until I made changes the base_site.html file. 

On Wednesday, August 6, 2014 2:55:03 PM UTC-7, Amol wrote:
Did you make sure to uncomment the admin auto discover in urls.py and installed apps in settings? I find it easy to overlook those things and causes major headache. 

Yeah, I checked, and those are uncommented. 
 
 

Collin Anderson

unread,
Aug 6, 2014, 8:41:55 PM8/6/14
to django...@googlegroups.com
Is there an error message on the runserver console? Or is it possible to start a new one?

Eric G

unread,
Aug 6, 2014, 10:10:44 PM8/6/14
to django...@googlegroups.com
Yeah, I tried running the runserver.py script from the django-trunk file, and the error message was:

ImportError: Could not import settings 'myproject.settings.admin' (Is it on sys.path? Is there an import error in the settings file?): No module named myproject.settings.admin

Lee

unread,
Aug 7, 2014, 4:51:38 AM8/7/14
to django...@googlegroups.com
You shouldn't need to run runserver.py directly. You should change into your project directory (where manage.py lives) and use:

python manage.py runserver

Collin Anderson

unread,
Aug 7, 2014, 8:38:56 AM8/7/14
to django...@googlegroups.com
seems to me it should be 'myproject.settings' instead of 'myproject.settings.admin'. what does it say in manage.py?
Reply all
Reply to author
Forward
0 new messages