Django Admin on Microsoft Visual Studio Problem

175 views
Skip to first unread message

Jose

unread,
Jul 23, 2016, 9:38:50 PM7/23/16
to Django users
Hi all,

After I built my classes on Django how can I access the admin site when running it on the local server online. I was reading the django documentations and they only say  http://127.0.0.1:8000/admin/ and that forwards them to the admin site without having to make an url. I get an URL error since I never specified an URL on urls.py. I then tried to make an url and used the code on the documentation for making the polls app on an admin.py file under polls. This also did not work. Could someone tell me how I could access that admin page using Visual Studio. These are pictures of the code.

Thanks
IMG_1771.JPG

Jose

unread,
Jul 23, 2016, 9:39:52 PM7/23/16
to Django users
IMG_1772.JPG

Jose

unread,
Jul 23, 2016, 9:40:44 PM7/23/16
to Django users


On Saturday, July 23, 2016 at 9:38:50 PM UTC-4, Jose wrote:
IMG_1773.JPG

James Schneider

unread,
Jul 24, 2016, 3:02:18 PM7/24/16
to django...@googlegroups.com

On Jul 23, 2016 6:39 PM, "Jose" <narutogl...@gmail.com> wrote:
>
> Hi all,
>
> After I built my classes on Django how can I access the admin site when running it on the local server online. I was reading the django documentations and they only say  http://127.0.0.1:8000/admin/ and that forwards them to the admin site without having to make an url. I get an URL error since I never specified an URL on urls.py. I then tried to make an url and used the code on the documentation for making the polls app on an admin.py file under polls. This also did not work. Could someone tell me how I could access that admin page using Visual Studio. These are pictures of the code.
>

Accessing the admin site is separate from Visual Studio. Are you running the Django development server? What errors are you getting when you try to access the site?

-James

Siddharth Ghumre

unread,
Jul 25, 2016, 4:35:17 AM7/25/16
to django...@googlegroups.com
To access Django's admin site, your admin url should look like url(r'^admin/', include(admin.site.urls)) which says whenever u hit rather http://127.0.0.1:8000/admin would include admin urls from "admin.site.urls" rather than "polls.views" unless you have all the admin login there in "polls.views".

Hope this helps.
Also Visual studio has nothing to do with this error as its just an editor.

-Sid

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVEGp_GuybQvYexwCYsc3RtVq27vmhy%3DBVTRRDUnvmaUA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages