tag: urlpatterns

  • Creating the official Django Polls app Part 3

    Creating the official Django Polls app Part 3

    Maria D. campbell

    In this section, we write our first Django app, discuss URL patterns, write more views in polls/views.py, write views that actually work, re-write the index view, create a templates directory in the polls directory, implement template namespacing, add Django code to index.html, update the index view to use the new index.html template, implement the render() shortcut, implement raising a 404 error in the detail view, use get_object_or_404() in the detail view, discuss Model's manager in Django, discuss Manager names, use template tags in the template engining system, remove the hardcoded URL in the template in polls/index.html, and namespace our URL names.

    #fullstack development, #macOS, #django, #python3, #404, #model manager, #render shortcut, #series, #templates, #template namespacing, #tutorial, #urlpatterns, #views

  • How to create a fullstack application using Django and Python Part 3

    How to create a fullstack application using Django and Python Part 3

    Maria D. Campbell

    In this section, I compare Django projects vs apps, create my first app in the Django project, configure the boards app in the django_boards project, write the first boards app view, tell the Django project when to serve the view, break down the code in urls.py, and run the development server to view the results of the changes made to views.py and urls.py.

    #macOS, #fullstack development, #django, #admin site, #migrations, #models, #views, #python3, #django project, #django app, #urlpatterns, #series