4.1.1. FPIDjango package

Submodules

FPIDjango.settings module

Django settings for FPIDjango project.


Unfortunately, the modified import statement of

from FPIDjango.private.settings_private import *

is required for the PyCharm Python Console and the PyCharm manage.py to work properly. It obviously knows better than I do. It cannot pay attention to some silly environment variable that I set in Preferences like we were able to do in the run settings.

This will work – and not reveal our credentials – as long as the private directory is included in our .gitignore file.


(Comments autogenerated by Django ) Generated by ‘django-admin startproject’ using Django 2.1.7.

For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/

For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/

FPIDjango.settings_private module

settings_private.py - Shadow or pseudo-private file.

This file has dummy settings in it. The purpose is to show the format of your real settings_private file in the private subdirectory.

The files at this level are dummy files that are safe to upload to GitHub. The equivalent files in the private subdirectory are ignored by git so it is safe to put your sensitive (and really private) parameters in those files.

When you run Django on your system for real, change the environment variable for DJANGO_SETTINGS_MODULE from FPIDjango.settings to FPIDjango.private.settings.

FPIDjango.urls module

FPIDjango URL Configuration

The urlpatterns list routes URLs to views. For more information please see:

https://docs.djangoproject.com/en/2.1/topics/http/urls/

Examples: Function views

  1. Add an import: from my_app import views

  2. Add a URL to urlpatterns: path(‘’, views.home, name=’home’)

Class-based views

  1. Add an import: from other_app.views import Home

  2. Add a URL to urlpatterns: path(‘’, Home.as_view(), name=’home’)

Including another URLconf
  1. Import the include() function: from django.urls import include, path

  2. Add a URL to urlpatterns: path(‘blog/’, include(‘blog.urls’))

FPIDjango.wsgi module

WSGI config for FPIDjango project.

It exposes the WSGI callable as a module-level variable named application.

For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/