Django Views

Django Views Each Django view is responsible for doing one of two things: returning an HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Your view can read records from a database, or...

Django Tutorial – models, database, admin

Django Tutorial – models, database, admin Code / Syntax stuff from the tutorial that I’m definitely going to forget, so putting it here for easy reference: Question.objects.all() Question.objects.filter(id=1)...

Django – Useful manage.py Commands

Django – Useful manage.py Commands Manage.py is created in each Django project. Here are some useful commands to have at your fingertips.  runserverThis launches the webserver.  startapp “application name”This creates a new...

Django 1.11.17 Tutorial (part2) – Create Polls App

Django 1.11.17 Tutorial (part2) – Create Polls App In part 1 (Create a Django 1.11.17 Environment) of this django tutorial how to create a django webapp, I set up a Django 1.11.17 project in PyCharm. In this post, I will set up and configure the polls...
Django 1.11.17 Tutorial (part 1) – Create Environment

Django 1.11.17 Tutorial (part 1) – Create Environment

Django 1.11.17 Tutorial (part 1) – Create Environment The Django Polls tutorial is the ideal way to learn Django. It is an excellent tutorial and covers most bases. This post series summarizes the tutorial. The purpose of the summary to allow me to revise what I...

Python -m (and other command line switches)

Python -m (and other command line switches) In the process of learning Django, I encountered the following instruction pretty much on the first page of the Django tutorial: python -m django –version I became interested in what the “-m” meant and then...

django-admin runserver vs manage.py runserver

django-admin runserver vs manage.py runserver You should use manage.py, as manage.py is actually a wrapper around django-admin. Manage.py provides additional functionality to handle things like setting DJANGO_SETTINGS_MODULE environment variable, and putting the...

Pin It on Pinterest