In-Class Activity 2: Create an App:
Objective: Learn how to create a Django Python app. Define and activate a model. Discover how to set up a superuser and add topics to your database.
Description: Starting with the project called code_journal you created in Activity 1, create an app called code_journals.
- Make a copy of your Activity1 folder and name the folder Activity2-CreateAnApp. After the activity is completed, take two screenshots matching the solution images below and submit it to the first quiz question on Canvas.
- Navigate to the directory that contains manage.py. Be sure to be running runserver in the VS Code terminal window.
- Define a model,
Topicwith a field (attribute) calledtextand another calleddate_added.- The
textattribute should have a CharField datatype. - The
date_addedattribute should have a DateTimeField datatype.
- The
- Setup the Django Admin Site and create a superuser.
- The username should be: cj_admin. Use your school email address for the email. Use the following password: a12345678.
- Register your model named,
Topicwith the Admin site - Login to the admin site (http://localhost:8000/admin) and you should see a screen like the one listed below.

- Finally, add the two Topics: Data_Types & Lists. You should see the following screen after adding the two topics.
