├── chapter02 └── Alexandria │ ├── tests │ ├── __init__.py │ └── test_primer.py │ ├── Alexandria │ ├── __init__.py │ ├── urls.py │ ├── asgi.py │ └── wsgi.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── runserver.sh │ ├── resetdb.sh │ ├── credits.md │ └── manage.py ├── chapter03 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── tests │ ├── __init__.py │ ├── test_primer.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── runserver.sh │ ├── resetdb.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── templates │ ├── home.html │ ├── about.html │ ├── book_listing.html │ └── sample.html │ ├── credits.md │ └── manage.py ├── chapter04 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── tests │ ├── __init__.py │ ├── test_primer.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py │ ├── catalog │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── admin.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── views.py │ └── models.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── resetdb.sh │ ├── templates │ ├── about.html │ ├── home.html │ ├── book_listing.html │ └── sample.html │ ├── credits.md │ └── manage.py ├── chapter05 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── tests │ ├── __init__.py │ ├── test_primer.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py │ ├── catalog │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── resetdb.sh │ ├── templates │ ├── about.html │ ├── home.html │ ├── book_listing.html │ └── sample.html │ ├── credits.md │ └── manage.py ├── chapter06 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── tests │ ├── __init__.py │ ├── test_primer.py │ ├── test_people.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py │ ├── catalog │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── people │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ └── admin.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── templates │ ├── registration │ │ ├── password_change_done.html │ │ ├── password_reset_complete.html │ │ ├── login.html │ │ ├── password_reset_email.html │ │ └── password_reset_done.html │ ├── about.html │ ├── profile.html │ ├── home.html │ ├── profile_listing.html │ ├── book_listing.html │ ├── 404.html │ └── sample.html │ ├── resetdb.sh │ ├── credits.md │ └── manage.py ├── chapter07 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── tests │ ├── __init__.py │ ├── test_primer.py │ ├── test_people.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py │ ├── catalog │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ └── views.py │ ├── people │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ └── urls.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── review │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── forms.py │ └── models.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── templates │ ├── registration │ │ ├── password_change_done.html │ │ ├── password_reset_complete.html │ │ ├── login.html │ │ ├── password_reset_email.html │ │ └── password_reset_done.html │ ├── about.html │ ├── profile.html │ ├── home.html │ ├── profile_listing.html │ ├── 404.html │ ├── book_listing.html │ └── sample.html │ ├── resetdb.sh │ ├── credits.md │ └── manage.py ├── chapter08 ├── Alexandria │ ├── home │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── tests │ │ ├── __init__.py │ │ ├── data │ │ │ └── Michael.jpg │ │ ├── test_primer.py │ │ ├── test_people.py │ │ └── test_home.py │ ├── Alexandria │ │ ├── __init__.py │ │ ├── asgi.py │ │ └── wsgi.py │ ├── catalog │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ └── urls.py │ ├── people │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ └── urls.py │ ├── primer │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ └── views.py │ ├── review │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── forms.py │ │ └── models.py │ ├── runserver.sh │ ├── static │ │ ├── logo.png │ │ ├── favicon.ico │ │ └── css │ │ │ └── site.css │ ├── templates │ │ ├── registration │ │ │ ├── password_change_done.html │ │ │ ├── password_reset_complete.html │ │ │ ├── login.html │ │ │ ├── password_reset_email.html │ │ │ └── password_reset_done.html │ │ ├── about.html │ │ ├── profile.html │ │ ├── profile_listing.html │ │ ├── home.html │ │ ├── 404.html │ │ ├── author_listing.html │ │ ├── book_listing.html │ │ ├── sample.html │ │ ├── pages.html │ │ └── upload_author_photo.html │ ├── README_NOW_FIX_FIXTURE.txt │ ├── credits.md │ ├── resetdb.sh │ └── manage.py └── uploads │ └── Alexandria │ ├── Hemingway.jpg │ └── 1_Conan_Doyle.jpg ├── chapter09 ├── Alexandria │ ├── home │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── tests │ │ ├── __init__.py │ │ ├── data │ │ │ └── Michael.jpg │ │ ├── test_primer.py │ │ ├── test_people.py │ │ └── test_home.py │ ├── Alexandria │ │ ├── __init__.py │ │ ├── asgi.py │ │ └── wsgi.py │ ├── catalog │ │ ├── __init__.py │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ └── authors.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ └── urls.py │ ├── people │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ └── urls.py │ ├── primer │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ └── views.py │ ├── review │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── forms.py │ │ └── models.py │ ├── runserver.sh │ ├── static │ │ ├── logo.png │ │ ├── favicon.ico │ │ └── css │ │ │ └── site.css │ ├── templates │ │ ├── registration │ │ │ ├── password_change_done.html │ │ │ ├── password_reset_complete.html │ │ │ ├── login.html │ │ │ ├── password_reset_email.html │ │ │ └── password_reset_done.html │ │ ├── about.html │ │ ├── profile.html │ │ ├── profile_listing.html │ │ ├── home.html │ │ ├── 404.html │ │ ├── author_listing.html │ │ ├── book_listing.html │ │ ├── sample.html │ │ ├── pages.html │ │ └── upload_author_photo.html │ ├── credits.md │ ├── resetdb.sh │ └── manage.py └── uploads │ └── Alexandria │ ├── Hemingway.jpg │ └── 1_Conan_Doyle.jpg ├── chapter10 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── urls.py │ ├── music │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0002_song_artist_name.py │ │ ├── 0001_initial.py │ │ └── 0001_initial_squashed_0002_song_artist_name.py │ ├── tests.py │ ├── admin.py │ ├── views.py │ ├── apps.py │ └── models.py │ ├── tests │ ├── __init__.py │ ├── data │ │ └── Michael.jpg │ ├── test_primer.py │ ├── test_people.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ └── wsgi.py │ ├── catalog │ ├── __init__.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── authors.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ └── urls.py │ ├── people │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ └── urls.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── review │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── forms.py │ └── models.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── templates │ ├── registration │ │ ├── password_change_done.html │ │ ├── password_reset_complete.html │ │ ├── login.html │ │ ├── password_reset_email.html │ │ └── password_reset_done.html │ ├── about.html │ ├── profile.html │ ├── profile_listing.html │ ├── home.html │ ├── 404.html │ ├── author_listing.html │ ├── book_listing.html │ ├── sample.html │ ├── pages.html │ └── upload_author_photo.html │ ├── credits.md │ ├── resetdb.sh │ └── manage.py ├── chapter12 └── Alexandria │ ├── home │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── urls.py │ ├── music │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0002_song_artist_name.py │ │ ├── 0001_initial.py │ │ └── 0001_initial_squashed_0002_song_artist_name.py │ ├── tests.py │ ├── admin.py │ ├── views.py │ ├── apps.py │ └── models.py │ ├── tests │ ├── __init__.py │ ├── data │ │ └── Michael.jpg │ ├── test_primer.py │ ├── test_people.py │ └── test_home.py │ ├── Alexandria │ ├── __init__.py │ ├── asgi.py │ └── wsgi.py │ ├── catalog │ ├── __init__.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── authors.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── serializers.py │ └── urls.py │ ├── people │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ └── urls.py │ ├── primer │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ └── views.py │ ├── review │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── forms.py │ └── models.py │ ├── runserver.sh │ ├── static │ ├── logo.png │ ├── favicon.ico │ └── css │ │ └── site.css │ ├── templates │ ├── registration │ │ ├── password_change_done.html │ │ ├── password_reset_complete.html │ │ ├── login.html │ │ ├── password_reset_email.html │ │ └── password_reset_done.html │ ├── about.html │ ├── profile.html │ ├── profile_listing.html │ ├── home.html │ ├── 404.html │ ├── author_listing.html │ ├── book_listing.html │ ├── sample.html │ ├── pages.html │ └── upload_author_photo.html │ ├── credits.md │ ├── resetdb.sh │ └── manage.py ├── data ├── logo.png ├── Homer.jpg ├── favicon.ico ├── Hemingway.jpg ├── Conan_Doyle.jpg └── ch04.json ├── assets ├── logo.png └── favicon.ico └── requirements.txt /chapter02/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter02/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/review/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/review/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/review/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/review/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/Alexandria/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/people/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/primer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/review/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter07/Alexandria/review/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter08/Alexandria/review/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/catalog/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/review/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/catalog/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/review/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/catalog/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/catalog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/people/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/primer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/review/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter09/Alexandria/catalog/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter10/Alexandria/catalog/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter12/Alexandria/catalog/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter02/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 0.0.0.0:8000 4 | -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/review/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/review/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/review/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/review/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/people/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/primer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/primer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/review/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /data/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/data/logo.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/assets/logo.png -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/catalog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter07/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter08/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter09/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /chapter10/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/catalog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /chapter12/Alexandria/primer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /data/Homer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/data/Homer.jpg -------------------------------------------------------------------------------- /data/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/data/favicon.ico -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/assets/favicon.ico -------------------------------------------------------------------------------- /data/Hemingway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/data/Hemingway.jpg -------------------------------------------------------------------------------- /data/Conan_Doyle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/data/Conan_Doyle.jpg -------------------------------------------------------------------------------- /chapter03/Alexandria/resetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name "*.pyc" -exec rm {} \; 4 | rm db.sqlite3 5 | python manage.py migrate 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==4.0.10 2 | django-debug-toolbar==3.2.4 3 | django-grappelli==3.0.2 4 | djangorestframework==3.13.1 5 | Pillow==9.3.0 6 | -------------------------------------------------------------------------------- /chapter03/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter03/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter04/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter04/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter05/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter05/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter06/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter06/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter07/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter07/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter08/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter08/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter09/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter09/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter10/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter10/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter12/Alexandria/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter12/Alexandria/static/logo.png -------------------------------------------------------------------------------- /chapter03/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter03/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter04/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter04/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter05/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter05/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter06/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter06/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter07/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter07/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter08/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter08/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter09/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter09/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter10/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter10/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter12/Alexandria/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter12/Alexandria/static/favicon.ico -------------------------------------------------------------------------------- /chapter08/Alexandria/tests/data/Michael.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter08/Alexandria/tests/data/Michael.jpg -------------------------------------------------------------------------------- /chapter08/uploads/Alexandria/Hemingway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter08/uploads/Alexandria/Hemingway.jpg -------------------------------------------------------------------------------- /chapter09/Alexandria/tests/data/Michael.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter09/Alexandria/tests/data/Michael.jpg -------------------------------------------------------------------------------- /chapter09/uploads/Alexandria/Hemingway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter09/uploads/Alexandria/Hemingway.jpg -------------------------------------------------------------------------------- /chapter10/Alexandria/tests/data/Michael.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter10/Alexandria/tests/data/Michael.jpg -------------------------------------------------------------------------------- /chapter12/Alexandria/tests/data/Michael.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter12/Alexandria/tests/data/Michael.jpg -------------------------------------------------------------------------------- /chapter08/uploads/Alexandria/1_Conan_Doyle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter08/uploads/Alexandria/1_Conan_Doyle.jpg -------------------------------------------------------------------------------- /chapter09/uploads/Alexandria/1_Conan_Doyle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/talkpython/getting-started-with-django-course/HEAD/chapter09/uploads/Alexandria/1_Conan_Doyle.jpg -------------------------------------------------------------------------------- /chapter03/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter04/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter05/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter06/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter07/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter08/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter09/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter10/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter12/Alexandria/home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'home' 7 | -------------------------------------------------------------------------------- /chapter02/Alexandria/primer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PrimerConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'primer' 7 | -------------------------------------------------------------------------------- /chapter03/Alexandria/primer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PrimerConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'primer' 7 | -------------------------------------------------------------------------------- /chapter04/Alexandria/primer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PrimerConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'primer' 7 | -------------------------------------------------------------------------------- /chapter05/Alexandria/primer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PrimerConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'primer' 7 | -------------------------------------------------------------------------------- /chapter06/Alexandria/people/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PeopleConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'people' 7 | -------------------------------------------------------------------------------- /chapter06/Alexandria/primer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PrimerConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'primer' 7 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/registration/password_change_done.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |
7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 | {% endblock content %} 11 | -------------------------------------------------------------------------------- /chapter07/Alexandria/review/forms.py: -------------------------------------------------------------------------------- 1 | # Alexandria/review/forms.py 2 | from django.forms import ModelForm 3 | 4 | from review.models import Review 5 | 6 | class ReviewForm(ModelForm): 7 | class Meta: 8 | model = Review 9 | fields = ('rating', 'text') 10 | -------------------------------------------------------------------------------- /chapter08/Alexandria/review/forms.py: -------------------------------------------------------------------------------- 1 | # Alexandria/review/forms.py 2 | from django.forms import ModelForm 3 | 4 | from review.models import Review 5 | 6 | class ReviewForm(ModelForm): 7 | class Meta: 8 | model = Review 9 | fields = ('rating', 'text') 10 | -------------------------------------------------------------------------------- /chapter09/Alexandria/review/forms.py: -------------------------------------------------------------------------------- 1 | # Alexandria/review/forms.py 2 | from django.forms import ModelForm 3 | 4 | from review.models import Review 5 | 6 | class ReviewForm(ModelForm): 7 | class Meta: 8 | model = Review 9 | fields = ('rating', 'text') 10 | -------------------------------------------------------------------------------- /chapter10/Alexandria/review/forms.py: -------------------------------------------------------------------------------- 1 | # Alexandria/review/forms.py 2 | from django.forms import ModelForm 3 | 4 | from review.models import Review 5 | 6 | class ReviewForm(ModelForm): 7 | class Meta: 8 | model = Review 9 | fields = ('rating', 'text') 10 | -------------------------------------------------------------------------------- /chapter12/Alexandria/review/forms.py: -------------------------------------------------------------------------------- 1 | # Alexandria/review/forms.py 2 | from django.forms import ModelForm 3 | 4 | from review.models import Review 5 | 6 | class ReviewForm(ModelForm): 7 | class Meta: 8 | model = Review 9 | fields = ('rating', 'text') 10 | -------------------------------------------------------------------------------- /chapter06/Alexandria/resetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name "*.pyc" -exec rm {} \; 4 | rm db.sqlite3 5 | rm -rf catalog/migrations people/migrations 6 | python manage.py makemigrations people catalog 7 | python manage.py migrate 8 | python manage.py loaddata ../../data/ch06.json 9 | -------------------------------------------------------------------------------- /chapter06/Alexandria/people/urls.py: -------------------------------------------------------------------------------- 1 | # Alexandria/people/urls.py 2 | 3 | from django.urls import path 4 | 5 | from people import views 6 | 7 | urlpatterns = [ 8 | path('profile_listing/', views.profile_listing), 9 | path('profile/9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter04/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter05/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter07/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter08/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter09/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter10/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter12/Alexandria/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - About {% endblock title %} 4 | 5 | {% block content %} 6 |9 | Alexandria is both a digital library and a sample Django application 10 |
11 | {% endblock content %} 12 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/models.py: -------------------------------------------------------------------------------- 1 | # Alexandria/music/models.py 2 | from django.db import models 3 | 4 | class Song(models.Model): 5 | title = models.CharField(max_length=50) 6 | artist_name = models.CharField(max_length=50) 7 | 8 | def __str__(self): 9 | return f"Song(id={self.id}, title={self.title})" 10 | -------------------------------------------------------------------------------- /chapter02/Alexandria/resetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name "*.pyc" -exec rm {} \; 4 | rm db.sqlite3 5 | #rm -rf ../outside/Vye/account_uploads 6 | #rm -rf ../outside/Vye/thumbnails 7 | rm -rf catalog/migrations 8 | 9 | # django db and test data process 10 | python manage.py makemigrations catalog 11 | python manage.py migrate 12 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/profile.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | ID: {{profile.id}}
8 | First name: {{profile.first_name}}
9 | Last name: {{profile.last_name}}
10 |
7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 |
13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /chapter05/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 |
13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 |
13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /chapter07/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 |
13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /chapter04/Alexandria/catalog/views.py: -------------------------------------------------------------------------------- 1 | # Alexandria/catalog/views.py 2 | 3 | from django.shortcuts import render 4 | 5 | from catalog.models import Book 6 | 7 | def book_listing(request): 8 | data = { 9 | 'books':Book.objects.order_by('author__last_name', 'title'), 10 | } 11 | 12 | return render(request, 'book_listing.html', data) 13 | -------------------------------------------------------------------------------- /chapter05/Alexandria/catalog/views.py: -------------------------------------------------------------------------------- 1 | # Alexandria/catalog/views.py 2 | 3 | from django.shortcuts import render 4 | 5 | from catalog.models import Book 6 | 7 | def book_listing(request): 8 | data = { 9 | 'books':Book.objects.order_by('author__last_name', 'title'), 10 | } 11 | 12 | return render(request, 'book_listing.html', data) 13 | -------------------------------------------------------------------------------- /chapter06/Alexandria/catalog/views.py: -------------------------------------------------------------------------------- 1 | # Alexandria/catalog/views.py 2 | 3 | from django.shortcuts import render 4 | 5 | from catalog.models import Book 6 | 7 | def book_listing(request): 8 | data = { 9 | 'books':Book.objects.order_by('author__last_name', 'title'), 10 | } 11 | 12 | return render(request, 'book_listing.html', data) 13 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/models.py: -------------------------------------------------------------------------------- 1 | # Alexandria/music/models.py 2 | from django.db import models 3 | 4 | class Song(models.Model): 5 | title = models.CharField(max_length=50) 6 | 7 | # uncomment during Chapter 10 8 | # artist_name = models.CharField(max_length=50) 9 | 10 | def __str__(self): 11 | return f"Song(id={self.id}, title={self.title})" 12 | -------------------------------------------------------------------------------- /chapter03/Alexandria/tests/test_primer.py: -------------------------------------------------------------------------------- 1 | # Alexandria/test/test_primer.py 2 | from django.test import TestCase 3 | from django.test import Client 4 | 5 | class PrimerTestCase(TestCase): 6 | def test_say_hello(self): 7 | response = self.client.get('/say_hello/') 8 | self.assertEqual(200, response.status_code) 9 | self.assertIn("Hello", str(response.content)) 10 | -------------------------------------------------------------------------------- /chapter04/Alexandria/tests/test_primer.py: -------------------------------------------------------------------------------- 1 | # Alexandria/test/test_primer.py 2 | from django.test import TestCase 3 | from django.test import Client 4 | 5 | class PrimerTestCase(TestCase): 6 | def test_say_hello(self): 7 | response = self.client.get('/say_hello/') 8 | self.assertEqual(200, response.status_code) 9 | self.assertIn("Hello", str(response.content)) 10 | -------------------------------------------------------------------------------- /chapter05/Alexandria/tests/test_primer.py: -------------------------------------------------------------------------------- 1 | # Alexandria/test/test_primer.py 2 | from django.test import TestCase 3 | from django.test import Client 4 | 5 | class PrimerTestCase(TestCase): 6 | def test_say_hello(self): 7 | response = self.client.get('/say_hello/') 8 | self.assertEqual(200, response.status_code) 9 | self.assertIn("Hello", str(response.content)) 10 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 | 13 | View Authors 14 |
15 | {% endblock content %} 16 | -------------------------------------------------------------------------------- /chapter09/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 | 13 | View Authors 14 |
15 | {% endblock content %} 16 | -------------------------------------------------------------------------------- /chapter10/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 | 13 | View Authors 14 |
15 | {% endblock content %} 16 | -------------------------------------------------------------------------------- /chapter12/Alexandria/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |7 | Welcome to Alexandria! This is a sample site for the "Getting Started with 8 | Django" Course. 9 |
10 |11 | View Books 12 | 13 | View Authors 14 |
15 | {% endblock content %} 16 | -------------------------------------------------------------------------------- /chapter06/Alexandria/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Alexandria - Page Not Found {% endblock title %} 4 | 5 | {% block content %} 6 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
9 |
10 | The pages are still blank,
11 | But there is a miraculous feeling of the words being there,
12 | Written in invisible ink
13 | and clamoring to become visible.
14 |
15 |
16 | -- V. Nabokov
17 |
7 | {% for author in authors %}
8 | {{author.last_name}}{% if author.first_name %}, {{author.first_name}}{% endif %}
10 |
11 |
12 | {% empty %}
13 | There were no authors
14 | {% endfor %}
15 |
16 |
7 | {% for author in authors %}
8 | {{author.last_name}}{% if author.first_name %}, {{author.first_name}}{% endif %}
10 |
11 |
12 | {% empty %}
13 | There were no authors
14 | {% endfor %}
15 |
16 |
7 | {% for author in authors %}
8 | {{author.last_name}}{% if author.first_name %}, {{author.first_name}}{% endif %}
10 |
11 |
12 | {% empty %}
13 | There were no authors
14 | {% endfor %}
15 |
16 |
7 | {% for author in authors %}
8 | {{author.last_name}}{% if author.first_name %}, {{author.first_name}}{% endif %}
10 |
11 |
12 | {% empty %}
13 | There were no authors
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
7 | {% for book in books %}
8 | {{book.title}};
9 | {{book.author.last_name}}{% if book.author.first_name %}, {{book.author.first_name}}{% endif %}.
10 |
11 |
12 | {% empty %}
13 | There were no books
14 | {% endfor %}
15 |
16 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
6 | Welcome to the Alexandria sample page. Here are some books: 7 | 8 |
{{pages.text|linebreaksbr}}
9 | 10 |{{pages.text|linebreaksbr}}
9 | 10 |{{pages.text|linebreaksbr}}
9 | 10 |{{pages.text|linebreaksbr}}
9 | 10 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter07/Alexandria/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter08/Alexandria/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter09/Alexandria/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter10/Alexandria/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter12/Alexandria/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |17 | Lost password? 18 |
19 | 20 | {% comment %} 21 | {% endcomment %} 22 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /chapter03/Alexandria/tests/test_home.py: -------------------------------------------------------------------------------- 1 | # Alexandria/test/test_home.py 2 | from django.test import TestCase 3 | 4 | class HomeTestCase(TestCase): 5 | def test_home(self): 6 | response = self.client.get('/home/sample/') 7 | self.assertEqual(200, response.status_code) 8 | self.assertIn("books", response.context) 9 | 10 | response = self.client.get('/home/about/') 11 | self.assertEqual(200, response.status_code) 12 | 13 | response = self.client.get('/') 14 | self.assertEqual(200, response.status_code) 15 | -------------------------------------------------------------------------------- /chapter10/Alexandria/resetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name "*.pyc" -exec rm {} \; 4 | rm db.sqlite3 5 | rm -rf catalog/migrations people/migrations review/migrations shelf/migrations 6 | 7 | rm ../uploads/Alexandria/* 8 | cp ../../data/Conan_Doyle.jpg ../uploads/Alexandria/1_Conan_Doyle.jpg 9 | cp ../../data/Hemingway.jpg ../uploads/Alexandria/Hemingway.jpg 10 | 11 | # django db and test data process 12 | python manage.py makemigrations people catalog review shelf 13 | python manage.py migrate 14 | 15 | python manage.py loaddata ../../data/ch07.json 16 | -------------------------------------------------------------------------------- /chapter12/Alexandria/resetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name "*.pyc" -exec rm {} \; 4 | rm db.sqlite3 5 | rm -rf catalog/migrations people/migrations review/migrations shelf/migrations 6 | 7 | rm ../uploads/Alexandria/* 8 | cp ../../data/Conan_Doyle.jpg ../uploads/Alexandria/1_Conan_Doyle.jpg 9 | cp ../../data/Hemingway.jpg ../uploads/Alexandria/Hemingway.jpg 10 | 11 | # django db and test data process 12 | python manage.py makemigrations people catalog review shelf 13 | python manage.py migrate 14 | 15 | python manage.py loaddata ../../data/ch07.json 16 | -------------------------------------------------------------------------------- /chapter10/Alexandria/music/migrations/0002_song_artist_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.7 on 2021-11-30 18:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('music', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='song', 15 | name='artist_name', 16 | field=models.CharField(default='unknown', max_length=50), 17 | preserve_default=False, 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /chapter12/Alexandria/music/migrations/0002_song_artist_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.7 on 2021-11-30 18:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('music', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='song', 15 | name='artist_name', 16 | field=models.CharField(default='unknown', max_length=50), 17 | preserve_default=False, 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /chapter06/Alexandria/tests/test_people.py: -------------------------------------------------------------------------------- 1 | # Alexandria/tests/test_people.py 2 | from django.contrib.auth.models import User 3 | from django.test import TestCase, Client 4 | 5 | class PeopleTestCase(TestCase): 6 | def test_reader_signal(self): 7 | user = User.objects.create(username="foo", password="asdfasdf33") 8 | self.assertIsNotNone(user.reader) 9 | 10 | def test_404(self): 11 | response = self.client.get('/not_a_valid_url/') 12 | expected = 'The pages are still blank,' 13 | self.assertIn(expected, str(response.content)) 14 | -------------------------------------------------------------------------------- /chapter07/Alexandria/tests/test_people.py: -------------------------------------------------------------------------------- 1 | # Alexandria/tests/test_people.py 2 | from django.contrib.auth.models import User 3 | from django.test import TestCase, Client 4 | 5 | class PeopleTestCase(TestCase): 6 | def test_reader_signal(self): 7 | user = User.objects.create(username="foo", password="asdfasdf33") 8 | self.assertIsNotNone(user.reader) 9 | 10 | def test_404(self): 11 | response = self.client.get('/not_a_valid_url/') 12 | expected = 'The pages are still blank,' 13 | self.assertIn(expected, str(response.content)) 14 | -------------------------------------------------------------------------------- /chapter08/Alexandria/catalog/urls.py: -------------------------------------------------------------------------------- 1 | # Alexandria/catalog/urls.py 2 | 3 | from django.urls import path 4 | 5 | from catalog import views 6 | 7 | urlpatterns = [ 8 | path('book_listing/', views.book_listing, name="book_listing"), 9 | path('book/8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |8 | We've emailed you instructions for setting your password, if an account 9 | exists with the email you entered. You should receive them shortly. 10 | 11 |
12 | 13 |14 | If you don't receive an email, please make sure you've entered the address 15 | you registered with and check your spam folder. 16 | 17 |
18 | 19 |