Django Tutorial for Beginners - 5 - Views
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when their urls.py or views.py setup produced 404s, server errors or import problems.
Recommended by 1 people across 1 different months, 2016 to 2016.
What it is
A short beginner tutorial from thenewboston's Django series that covers views: creating an app view, wiring it into the URL configuration, and returning a simple HttpResponse. It is episode 5 of a longer playlist built around a small music app.
What people said
Recommends Arsalon Amini · 2016-10 · Stack Overflow · on “VisualStudio django.conf.urls”
After learning more about the Django framework from this youtube tutorial I was able to fix my code ( [this video] ) What I learned was that each "app" is a segment of the program with associated views. All I had to do was import all the views from my_app or app or whatever else you are calling your new "app" in Django. Besides the slight change to the urlpatterns from () to [] all I did was modify the url call to pull from the app_views I set up above. Here is functional code. I have a "Server error (500)" which is something else I'll figure out but yea please explain things more for devs who are simply new to the django framework. Visualstudio is a good tool. use it for python. Reach out if you
Cites Chris Tope · 2016-04 · Stack Overflow · on “Django Project App Urls Page Not Found (404)”
I still new to Django and I'm following this [this video] tutorial in YouTube. I can't proceed to the next tutorial because I hit an error. When I type [LINK] . I get this error. [LINK] Check my code below: mysite urls.py from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^music/', include('music.urls')), ] music urls.py from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ] music views.py from django.http import HttpResponse def index(request): return HttpResponse("<h1>Hello World</h1>") Please help.
Cites Surbhi · 2016-06 · Stack Overflow · on “Error:while viewing changes in Django”
I am learning Django from [this video] I have did exactly the same things mentioned in it.But still these errors are coming at the end when I restart my server to see changes in music and admin page. These errors are: Here is an image of the command line with the errors show. [LINK]