tag: views

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

Creating the official Django Polls app Part 1
Maria D. Campbell
In this section, I create a directory to house my Django Polls application, check if I have Django installed, select my Python interpreter, install virtualenv with pip, create a virtual environment for Django Polls, activate and deactivate the virtual environment, install Django, upgrade Django, create a project in Django Polls, initialize git, start up the Django development server, create an app called polls, write a first view, create a URLconf for the index view, and configure the global URL configuration.
#fullstack development, #macOS, #django, #django app, #django project, #development server, #git, #pip, #python 3, #python interpreter, #runserver, #series, #tutorial, #urlconf, #views, #virtualenv, #virtual environment

How to create a fullstack application using Django and Python Part 33
Maria D. Campbell
In this section, I get a custom domain for my Django Boards application from Namecheap, connect the custom domain to Render, configure domain verification with Namecheap for Mailtrap backend email service, add a new app called faqs, create the models for faqs, create a view for faqs, create a URLconf for the faqs_index view, configure the global URL configuration for faqs_index view in django_boards/urls.py, migrate faqs, and make the faqs app modifiable in the admin interface.
#fullstack development, #macOS, #django, #app, #python3, #custom domain, #domain verification, #backend email service, #makemigrations, #migrate, #mailtrap, #namecheap, #series, #views

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