No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Nostaldja is an app for tracking fads across decades.


Read through the setup instructions from the Django Models and Views and Templates

The goal of this app is to have a full-CRUD application with multiple views.


  1. Fork this repository, then clone it.
  2. Set up your virtual environment and activate it.
  3. Install django in that activated environment.
  4. Create a project named nostaldja_project and an app named nostaldja.
  5. Set up (create a new) psql database.
  6. Do the Models and Migrations portions of the lab
  7. Then do URLs, Views, and Templates


Create two models: Decade and Fad.

A Decade will have Fads, or in other words a fad will have a foreign key for a decade.

  • Decades
    • start_year
  • Fads
    • name
    • image_url
    • description
    • decade


After you've run makemigrations and migrate, you can then run the following to create a new, empty migration...

 $ python makemigrations --empty nostaldja

Then, paste into the newly generated file the code below...

from django.db import migrations

def seed(apps, schema_editor):
    Fad = apps.get_model('nostaldja', 'Fad')
    Decade = apps.get_model('nostaldja', 'Decade')
    eighties = Decade(start_year="1980s")
    nineties = Decade(start_year="1990s")
    oughts = Decade(start_year="2000s")
    tens = Decade(start_year="2010s")

    Fad(decade = tens, name='Fidget Spinners', description='A fidget spinner is a toy that consists of a ball bearing in the center of a multi-lobed (typically two or three) flat structure made from metal or plastic designed to spin along its axis with little effort. Fidget spinners became popular toys in April 2017, although similar devices had been invented as early as 1993. ', image_url='').save()
    Fad(decade = tens, name='Block Chain', description='A blockchain, originally block chain, is a continuously growing list of records, called blocks, which are linked and secured using cryptography. Each block typically contains a cryptographic hash of the previous block, a timestamp and transaction data. By design, a blockchain is inherently resistant to modification of the data.', image_url='').save()
    Fad(decade = oughts, name='Silly Bandz', description='Silly Bandz are rubber bands made of silicone rubber formed into shapes including animals, objects, numbers, and letters. ', image_url='').save()
    Fad(decade = oughts, name='iPods', description='iPhone - Phone = iPod', image_url='').save()
    Fad(decade = oughts, name='Myspace', description='Myspace (stylized as MySpace) is a social networking website offering an interactive, user-submitted network of friends, personal profiles, blogs, groups, photos, music, and videos. Myspace was the largest social networking site in the world, from 2004 to 2010.', image_url='').save()

    Fad(decade = nineties, name='JNCOs', description='JNCO, short for "Judge None Choose One", is a Los Angeles, California based clothing company specializing in boys\' and men\'s jeans.', image_url='*&output-format=auto&output-quality=auto').save()

def fallow(apps, schema_editor):
    Fad = apps.get_model('nostaldja', 'Fad')
    Decade = apps.get_model('nostaldja', 'Decade')

Then below, add only the line highlighted in green...

class Migration(migrations.Migration):

    dependencies = [
        ('nostaldja', '0006_auto_20180504_1246'),

    operations = [
+       migrations.RunPython(seed, fallow)


Think about the URLs you will need for each resource (Decades and Fads). Hint: both resources will need at least 4 URLs, one for each CRUD action.

Add these URLs to your file.


Build out some function in your views file to perform actions corresponding to each URL. Again, you'll want full CRUD for each resource.


Using your URLs and view functions, also build out some templates!

Aside from the base/layout template, you'll want templates like:

Resource Action
Fad Display all
Fad Display detail
Fad Edit detail
Decade Display all
Decade Display detail
Decade Edit detail