Learn Django

Create the Subscribers App

The first step in creating the signup form is to create the subscribers app. This app will be used for all resources related to customers purchasing services from the CRM Easy company. Follow the steps below to create the app.

Step 1: Create the Subscribers App

With your terminal or command prompt open, execute these commands.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# navigate to crmeasy directory
$ cd /<your_path_here>/crmeasy

# activate the virtual environment
$ source venv/bin/activate

#  navigate to the crmapp directory 
(venv)$ cd crmapp/

# create the subscribers app
(venv)$ django-admin.py startapp subscribers

Step 2: Update the Settings File

The next step is to add the app to the INSTALLED_APPS list in the settings file.

  1. Open the /.../crmeasy/crmapp/settings.py file
  2. Locate INSTALLED_APPS
  3. Add 'crmapp.subscribers', to the end of the list

The INSTALLED_APPS should look like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'crmapp.marketing',
    'crmapp.subscribers',
)

Step 3: Commit Changes

Execute these commands to commit your changes in Git.

1
2
3
4
5
# add files
(venv)$ git add .

# commit files
(venv)$ git commit -m "created the subscribers app"

Track your progress with a free account