├── .gitignore ├── LICENSE ├── README.md ├── ch01 ├── .bash_profile ├── my.cnf ├── myproject_docker │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── build_dev_example.sh │ ├── config │ │ └── nginx │ │ │ └── conf.d │ │ │ └── myproject.conf │ ├── docker-compose.yml │ ├── git-hooks │ │ ├── install_hooks.sh │ │ └── pre-commit │ └── src │ │ └── myproject │ │ ├── locale │ │ └── .gitkeep │ │ ├── manage.py │ │ ├── myproject │ │ ├── __init__.py │ │ ├── apps │ │ │ └── __init__.py │ │ ├── settings │ │ │ ├── __init__.py │ │ │ ├── _base.py │ │ │ ├── dev.py │ │ │ ├── last-update.txt │ │ │ ├── production.py │ │ │ ├── staging.py │ │ │ └── test.py │ │ ├── site_static │ │ │ └── site │ │ │ │ ├── css │ │ │ │ └── style.css │ │ │ │ ├── img │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ └── favicon.ico │ │ │ │ ├── js │ │ │ │ └── main.js │ │ │ │ └── scss │ │ │ │ └── style.scss │ │ ├── templates │ │ │ ├── base.html │ │ │ └── index.html │ │ ├── urls.py │ │ └── wsgi.py │ │ └── requirements │ │ ├── _base.txt │ │ ├── dev.txt │ │ ├── production.txt │ │ ├── staging.txt │ │ └── test.txt └── myproject_virtualenv │ ├── commands │ └── .gitkeep │ ├── db_backups │ └── .gitkeep │ ├── mockups │ └── .gitkeep │ ├── src │ └── django-myproject │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── externals │ │ ├── apps │ │ │ └── README.md │ │ └── libs │ │ │ └── README.md │ │ ├── locale │ │ └── .gitkeep │ │ ├── manage.py │ │ ├── myproject │ │ ├── __init__.py │ │ ├── apps │ │ │ ├── __init__.py │ │ │ ├── core │ │ │ │ ├── __init__.py │ │ │ │ └── versioning.py │ │ │ └── magazine │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── app_settings.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ └── signals.py │ │ ├── settings │ │ │ ├── __init__.py │ │ │ ├── _base.py │ │ │ ├── dev.py │ │ │ ├── production.py │ │ │ ├── sample_secrets.json │ │ │ ├── staging.py │ │ │ └── test.py │ │ ├── site_static │ │ │ └── site │ │ │ │ ├── css │ │ │ │ └── style.css │ │ │ │ ├── img │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ └── favicon.ico │ │ │ │ ├── js │ │ │ │ └── main.js │ │ │ │ └── scss │ │ │ │ └── style.scss │ │ ├── templates │ │ │ ├── base.html │ │ │ └── index.html │ │ ├── urls.py │ │ └── wsgi.py │ │ └── requirements │ │ ├── _base.txt │ │ ├── dev.txt │ │ ├── production.txt │ │ ├── staging.txt │ │ └── test.txt │ └── tree.txt ├── ch02 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── categories │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── core │ │ │ │ │ └── includes │ │ │ │ │ └── meta_field.html │ │ │ └── versioning.py │ │ ├── ideas │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_idea_categories.py │ │ │ │ ├── 0003_copy_categories.py │ │ │ │ ├── 0004_remove_idea_category.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ └── ideas2 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ └── models.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ └── favicon.ico │ │ │ ├── js │ │ │ └── main.js │ │ │ └── scss │ │ │ └── style.scss │ ├── templates │ │ ├── base.html │ │ └── index.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch03 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── categories │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── ideas │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── documents.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_idea_rating.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── search │ │ │ ├── __init__.py │ │ │ ├── multilingual_whoosh_backend.py │ │ │ └── search_indexes.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ ├── js │ │ │ ├── inlines.js │ │ │ └── main.js │ │ │ └── scss │ │ │ └── style.scss │ ├── templates │ │ ├── base.html │ │ ├── base_pdf.html │ │ ├── core │ │ │ ├── includes │ │ │ │ └── meta_field.html │ │ │ └── widgets │ │ │ │ └── image.html │ │ ├── ideas │ │ │ ├── forms │ │ │ │ └── translations.html │ │ │ ├── idea_deleting_confirmation.html │ │ │ ├── idea_detail.html │ │ │ ├── idea_form.html │ │ │ ├── idea_handout_pdf.html │ │ │ ├── idea_list.html │ │ │ ├── idea_search.html │ │ │ └── includes │ │ │ │ ├── filters.html │ │ │ │ └── picture_guidelines.html │ │ ├── index.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── filter_all.html │ │ │ │ ├── filter_heading.html │ │ │ │ └── pagination.html │ │ ├── registration │ │ │ └── login.html │ │ └── search │ │ │ └── search.html │ ├── urls.py │ └── wsgi.py │ ├── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt │ └── tmp │ └── .gitkeep ├── ch04 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ ├── versioning.py │ │ │ └── views.py │ │ ├── likes │ │ │ ├── __init__.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── static │ │ │ │ └── likes │ │ │ │ │ └── js │ │ │ │ │ └── widget.js │ │ │ ├── templates │ │ │ │ └── likes │ │ │ │ │ └── includes │ │ │ │ │ └── widget.html │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── likes_tags.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── locations │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── rating.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ ├── js │ │ │ ├── list.js │ │ │ ├── location_detail.js │ │ │ └── picture_upload.js │ │ │ └── vendor │ │ │ └── jQuery-File-Upload-10.2.0 │ │ │ ├── .gitignore │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── VULNERABILITIES.md │ │ │ ├── cors │ │ │ ├── postmessage.html │ │ │ └── result.html │ │ │ ├── css │ │ │ ├── jquery.fileupload-noscript.css │ │ │ ├── jquery.fileupload-ui-noscript.css │ │ │ ├── jquery.fileupload-ui.css │ │ │ └── jquery.fileupload.css │ │ │ ├── docker-compose.yml │ │ │ ├── img │ │ │ ├── loading.gif │ │ │ └── progressbar.gif │ │ │ ├── index.html │ │ │ ├── js │ │ │ ├── cors │ │ │ │ ├── jquery.postmessage-transport.js │ │ │ │ └── jquery.xdr-transport.js │ │ │ ├── demo.js │ │ │ ├── jquery.fileupload-audio.js │ │ │ ├── jquery.fileupload-image.js │ │ │ ├── jquery.fileupload-process.js │ │ │ ├── jquery.fileupload-ui.js │ │ │ ├── jquery.fileupload-validate.js │ │ │ ├── jquery.fileupload-video.js │ │ │ ├── jquery.fileupload.js │ │ │ ├── jquery.iframe-transport.js │ │ │ └── vendor │ │ │ │ └── jquery.ui.widget.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── server │ │ │ ├── gae-go │ │ │ │ ├── app.yaml │ │ │ │ ├── main.go │ │ │ │ └── static │ │ │ │ │ ├── favicon.ico │ │ │ │ │ └── robots.txt │ │ │ ├── gae-python │ │ │ │ ├── app.yaml │ │ │ │ ├── main.py │ │ │ │ └── static │ │ │ │ │ ├── favicon.ico │ │ │ │ │ └── robots.txt │ │ │ └── php │ │ │ │ ├── Dockerfile │ │ │ │ ├── UploadHandler.php │ │ │ │ ├── files │ │ │ │ ├── .gitignore │ │ │ │ └── .htaccess │ │ │ │ └── index.php │ │ │ ├── test │ │ │ ├── index.html │ │ │ ├── unit.js │ │ │ └── vendor │ │ │ │ ├── chai.js │ │ │ │ ├── mocha.css │ │ │ │ └── mocha.js │ │ │ └── wdio │ │ │ ├── .eslintrc.js │ │ │ ├── .prettierrc.js │ │ │ ├── LICENSE.txt │ │ │ ├── assets │ │ │ ├── black-80x60.gif │ │ │ └── white-1x2.jpg │ │ │ ├── bin │ │ │ ├── forward-ports.sh │ │ │ └── safaridriver.sh │ │ │ ├── chrome.js │ │ │ ├── firefox.js │ │ │ ├── hooks │ │ │ └── index.js │ │ │ ├── ie.js │ │ │ ├── reports │ │ │ └── .gitignore │ │ │ ├── safari.js │ │ │ ├── test │ │ │ ├── pages │ │ │ │ └── file-upload.js │ │ │ └── specs │ │ │ │ └── 01-file-upload.js │ │ │ └── wdio.conf.js │ ├── templates │ │ ├── base.html │ │ ├── core │ │ │ └── includes │ │ │ │ ├── file_upload_field.html │ │ │ │ └── picture_preview.html │ │ ├── index.html │ │ ├── locations │ │ │ ├── includes │ │ │ │ └── navigation.html │ │ │ ├── location_deleting_confirmation.html │ │ │ ├── location_detail.html │ │ │ ├── location_detail_modal.html │ │ │ ├── location_form.html │ │ │ └── location_list.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch05 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── example │ │ │ ├── __init__.py │ │ │ └── views.py │ │ └── news │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ └── main.js │ ├── templates │ │ ├── base.html │ │ ├── index.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── news │ │ │ ├── article_detail.html │ │ │ └── article_list.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch06 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── apps.py │ │ │ ├── helpers.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── models1.py │ │ │ └── models2.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── locations │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── products │ │ │ ├── 0002_add-product-data.py │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── admin3.py │ │ │ ├── admin4.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20191105_1814.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ ├── location_change_form.js │ │ │ └── main.js │ ├── templates │ │ ├── admin │ │ │ ├── accounts │ │ │ │ ├── includes │ │ │ │ │ ├── avatar.html │ │ │ │ │ └── download_gravatar.html │ │ │ │ └── user │ │ │ │ │ └── change_list.html │ │ │ ├── locations │ │ │ │ ├── includes │ │ │ │ │ └── map.html │ │ │ │ └── location │ │ │ │ │ └── change_form.html │ │ │ └── products │ │ │ │ └── includes │ │ │ │ └── photo-preview.html │ │ ├── base.html │ │ ├── index.html │ │ ├── locations │ │ │ ├── location_detail.html │ │ │ ├── location_list.html │ │ │ └── location_popup.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch07 ├── myproject_docker │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── build_dev_example.sh │ ├── config │ │ └── nginx │ │ │ └── conf.d │ │ │ └── myproject.conf │ ├── docker-compose.yml │ ├── git-hooks │ │ ├── install_hooks.sh │ │ └── pre-commit │ └── src │ │ └── myproject │ │ ├── locale │ │ └── .gitkeep │ │ ├── manage.py │ │ ├── myproject │ │ ├── __init__.py │ │ ├── apps │ │ │ ├── __init__.py │ │ │ ├── core │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── context_processors.py │ │ │ │ ├── model_fields.py │ │ │ │ ├── models.py │ │ │ │ ├── processors.py │ │ │ │ ├── templatetags │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── utility_tags.py │ │ │ │ └── versioning.py │ │ │ └── viral_videos │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── checks.py │ │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── signals.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ ├── settings │ │ │ ├── __init__.py │ │ │ ├── _base.py │ │ │ ├── dev.py │ │ │ ├── last-update.txt │ │ │ ├── production.py │ │ │ ├── staging.py │ │ │ └── test.py │ │ ├── site_static │ │ │ └── site │ │ │ │ ├── css │ │ │ │ └── style.css │ │ │ │ ├── img │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ └── favicon.ico │ │ │ │ ├── js │ │ │ │ └── main.js │ │ │ │ └── scss │ │ │ │ └── style.scss │ │ ├── templates │ │ │ ├── base.html │ │ │ ├── index.html │ │ │ └── viral_videos │ │ │ │ ├── email │ │ │ │ └── administrator │ │ │ │ │ ├── message.html │ │ │ │ │ ├── message.txt │ │ │ │ │ └── subject.txt │ │ │ │ └── viral_video_detail.html │ │ ├── urls.py │ │ └── wsgi.py │ │ └── requirements │ │ ├── _base.txt │ │ ├── dev.txt │ │ ├── production.txt │ │ ├── staging.txt │ │ └── test.txt └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── deployment │ └── .htaccess │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── admin_honeypot_fix │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ └── apps.py │ │ ├── auth_extra │ │ │ ├── __init__.py │ │ │ └── password_validation.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── processors.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── external_auth │ │ │ ├── __init__.py │ │ │ ├── backends.py │ │ │ ├── context_processors.py │ │ │ └── views.py │ │ ├── ideas │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── viral_videos │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── checks.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── signals.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ ├── logo.svg │ │ │ └── watermark.png │ │ │ └── js │ │ │ ├── inlines.js │ │ │ ├── location_change_form.js │ │ │ └── main.js │ ├── templates │ │ ├── base.html │ │ ├── dashboard.html │ │ ├── ideas │ │ │ ├── forms │ │ │ │ └── translations.html │ │ │ ├── idea_deleting_confirmation.html │ │ │ ├── idea_detail.html │ │ │ ├── idea_form.html │ │ │ ├── idea_list.html │ │ │ └── includes │ │ │ │ └── picture_guidelines.html │ │ ├── index.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── registration │ │ │ └── login.html │ │ └── viral_videos │ │ │ ├── email │ │ │ └── administrator │ │ │ │ ├── message.html │ │ │ │ ├── message.txt │ │ │ │ └── subject.txt │ │ │ └── viral_video_detail.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch08 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── apps.py │ │ │ ├── helpers.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── models1.py │ │ │ └── models2.py │ │ ├── categories1 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ └── views.py │ │ ├── categories2 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ └── models.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── form_fields.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── ideas1 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── ideas2 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ └── main.js │ ├── templates │ │ ├── admin │ │ │ ├── accounts │ │ │ │ ├── includes │ │ │ │ │ ├── avatar.html │ │ │ │ │ └── download_gravatar.html │ │ │ │ └── user │ │ │ │ │ └── change_list.html │ │ │ ├── locations │ │ │ │ ├── includes │ │ │ │ │ └── map.html │ │ │ │ └── location │ │ │ │ │ └── change_form.html │ │ │ └── products │ │ │ │ └── includes │ │ │ │ └── photo-preview.html │ │ ├── base.html │ │ ├── categories1 │ │ │ ├── add_form.html │ │ │ ├── category_list.html │ │ │ ├── includes │ │ │ │ ├── filter_all.html │ │ │ │ └── filter_heading.html │ │ │ ├── movie_list.html │ │ │ └── top_movies.html │ │ ├── core │ │ │ └── includes │ │ │ │ └── checkboxselectmultiple_tree.html │ │ ├── ideas1 │ │ │ ├── forms │ │ │ │ └── translations.html │ │ │ ├── idea_deleting_confirmation.html │ │ │ ├── idea_detail.html │ │ │ ├── idea_form.html │ │ │ ├── idea_list.html │ │ │ └── includes │ │ │ │ ├── filters.html │ │ │ │ └── picture_guidelines.html │ │ ├── index.html │ │ ├── locations │ │ │ ├── location_detail.html │ │ │ ├── location_list.html │ │ │ └── location_popup.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch09 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── data │ ├── music.csv │ └── music.xlsx │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ └── music │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── feeds.py │ │ │ ├── forms.py │ │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── export_music_to_csv.py │ │ │ │ ├── import_music_from_csv.py │ │ │ │ ├── import_music_from_lastfm_json.py │ │ │ │ ├── import_music_from_lastfm_xml.py │ │ │ │ └── import_music_from_xlsx.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ ├── location_change_form.js │ │ │ └── main.js │ ├── templates │ │ ├── base.html │ │ ├── index.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── music │ │ │ ├── feeds │ │ │ │ └── song_description.html │ │ │ ├── song_detail.html │ │ │ └── song_list.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch10 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── middleware.py │ │ │ ├── misc.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── guerrilla_patches │ │ │ ├── __init__.py │ │ │ └── models.py │ │ └── viral_videos │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── checks.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── signals.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ ├── location_change_form.js │ │ │ └── main.js │ ├── templates │ │ ├── base.html │ │ ├── index.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── registration │ │ │ └── login.html │ │ └── viral_videos │ │ │ ├── email │ │ │ └── administrator │ │ │ │ ├── message.html │ │ │ │ ├── message.txt │ │ │ │ └── subject.txt │ │ │ ├── viral_video_detail.html │ │ │ └── viral_video_list.html │ ├── urls.py │ └── wsgi.py │ └── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt ├── ch11 └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── likes │ │ │ ├── __init__.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── static │ │ │ │ └── likes │ │ │ │ │ └── js │ │ │ │ │ └── widget.js │ │ │ ├── templates │ │ │ │ └── likes │ │ │ │ │ └── includes │ │ │ │ │ └── widget.html │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── likes_tags.py │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_views.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── locations │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_frontend.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── music │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── feeds.py │ │ │ ├── forms.py │ │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── export_music_to_csv.py │ │ │ │ ├── import_music_from_csv.py │ │ │ │ ├── import_music_from_lastfm_json.py │ │ │ │ ├── import_music_from_lastfm_xml.py │ │ │ │ └── import_music_from_xlsx.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_api.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ ├── rating.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ ├── list.js │ │ │ ├── location_change_form.js │ │ │ ├── location_detail.js │ │ │ ├── main.js │ │ │ └── picture_upload.js │ ├── templates │ │ ├── base.html │ │ ├── index.html │ │ ├── locations │ │ │ ├── includes │ │ │ │ └── navigation.html │ │ │ ├── location_deleting_confirmation.html │ │ │ ├── location_detail.html │ │ │ ├── location_detail_modal.html │ │ │ ├── location_form.html │ │ │ └── location_list.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── music │ │ │ ├── feeds │ │ │ │ └── song_description.html │ │ │ ├── song_detail.html │ │ │ └── song_list.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ ├── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt │ ├── run_tests_with_coverage.sh │ └── setup.cfg ├── ch12 ├── likes_app_virtualenv │ └── src │ │ └── django-likes │ │ ├── .coveragerc │ │ ├── .editorconfig │ │ ├── .github │ │ └── ISSUE_TEMPLATE.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS.rst │ │ ├── CONTRIBUTING.rst │ │ ├── HISTORY.rst │ │ ├── LICENSE │ │ ├── MANIFEST.in │ │ ├── Makefile │ │ ├── README.rst │ │ ├── docs │ │ ├── Makefile │ │ ├── authors.rst │ │ ├── conf.py │ │ ├── contributing.rst │ │ ├── history.rst │ │ ├── index.rst │ │ ├── installation.rst │ │ ├── make.bat │ │ ├── readme.rst │ │ └── usage.rst │ │ ├── likes │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── static │ │ │ ├── css │ │ │ │ └── likes.css │ │ │ ├── img │ │ │ │ └── .gitignore │ │ │ ├── js │ │ │ │ └── likes.js │ │ │ └── likes │ │ │ │ └── js │ │ │ │ └── widget.js │ │ ├── templates │ │ │ └── likes │ │ │ │ ├── base.html │ │ │ │ └── includes │ │ │ │ └── widget.html │ │ ├── templatetags │ │ │ ├── __init__.py │ │ │ └── likes_tags.py │ │ ├── test_utils │ │ │ ├── __init__.py │ │ │ └── test_app │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ │ └── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ │ ├── manage.py │ │ ├── requirements.txt │ │ ├── requirements_dev.txt │ │ ├── requirements_test.txt │ │ ├── runtests.py │ │ ├── setup.cfg │ │ ├── setup.py │ │ ├── tests │ │ ├── README.md │ │ ├── __init__.py │ │ ├── requirements.txt │ │ ├── settings.py │ │ ├── test_models.py │ │ └── urls.py │ │ └── tox.ini └── myproject_virtualenv │ └── src │ └── django-myproject │ ├── .gitignore │ ├── LICENSE │ ├── deployment-apache │ ├── ansible_templates │ │ ├── apache_site-pre.conf.j2 │ │ ├── apache_site.conf.j2 │ │ ├── memcached.j2 │ │ ├── pg_hba.j2 │ │ ├── postfix.j2 │ │ ├── postgresql.j2 │ │ ├── secrets.json.j2 │ │ ├── timezone.j2 │ │ └── virtual.j2 │ ├── production │ │ └── ansible │ │ │ ├── deploy.yml │ │ │ ├── deploy_remotely.sh │ │ │ ├── hosts │ │ │ └── remote │ │ │ ├── sample_secrets.yml │ │ │ ├── setup.yml │ │ │ ├── setup_remotely.sh │ │ │ └── vars.yml │ └── staging │ │ └── ansible │ │ ├── Vagrantfile │ │ ├── deploy.yml │ │ ├── hosts │ │ └── vagrant │ │ ├── sample_secrets.yml │ │ ├── setup.yml │ │ ├── setup_on_virtualbox.sh │ │ └── vars.yml │ ├── deployment-nginx │ ├── ansible_templates │ │ ├── gunicorn.j2 │ │ ├── memcached.j2 │ │ ├── nginx-pre.j2 │ │ ├── nginx.j2 │ │ ├── pg_hba.j2 │ │ ├── postfix.j2 │ │ ├── postgresql.j2 │ │ ├── secrets.json.j2 │ │ ├── timezone.j2 │ │ └── virtual.j2 │ ├── production │ │ └── ansible │ │ │ ├── deploy.yml │ │ │ ├── deploy_remotely.sh │ │ │ ├── hosts │ │ │ └── remote │ │ │ ├── sample_secrets.yml │ │ │ ├── setup.yml │ │ │ ├── setup_remotely.sh │ │ │ └── vars.yml │ └── staging │ │ └── ansible │ │ ├── Vagrantfile │ │ ├── deploy.yml │ │ ├── hosts │ │ └── vagrant │ │ ├── sample_secrets.yml │ │ ├── setup.yml │ │ ├── setup_on_virtualbox.sh │ │ └── vars.yml │ ├── locale │ └── .gitkeep │ ├── manage.py │ ├── myproject │ ├── __init__.py │ ├── apps │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── model_fields.py │ │ │ ├── models.py │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── utility_tags.py │ │ │ └── versioning.py │ │ ├── likes │ │ │ ├── __init__.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── static │ │ │ │ └── likes │ │ │ │ │ └── js │ │ │ │ │ └── widget.js │ │ │ ├── templates │ │ │ │ └── likes │ │ │ │ │ └── includes │ │ │ │ │ └── widget.html │ │ │ ├── templatetags │ │ │ │ ├── __init__.py │ │ │ │ └── likes_tags.py │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_views.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── locations │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── admin1.py │ │ │ ├── admin2.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_frontend.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── music │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── apps.py │ │ │ ├── feeds.py │ │ │ ├── forms.py │ │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── export_music_to_csv.py │ │ │ │ ├── import_music_from_csv.py │ │ │ │ ├── import_music_from_lastfm_json.py │ │ │ │ ├── import_music_from_lastfm_xml.py │ │ │ │ └── import_music_from_xlsx.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_api.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── settings │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── dev.py │ │ ├── production.py │ │ ├── sample_secrets.json │ │ ├── staging.py │ │ └── test.py │ ├── site_static │ │ └── site │ │ │ ├── css │ │ │ ├── location_map.css │ │ │ ├── rating.css │ │ │ └── style.css │ │ │ ├── img │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ │ │ └── js │ │ │ ├── list.js │ │ │ ├── location_change_form.js │ │ │ ├── location_detail.js │ │ │ ├── main.js │ │ │ └── picture_upload.js │ ├── templates │ │ ├── base.html │ │ ├── index.html │ │ ├── locations │ │ │ ├── includes │ │ │ │ └── navigation.html │ │ │ ├── location_deleting_confirmation.html │ │ │ ├── location_detail.html │ │ │ ├── location_detail_modal.html │ │ │ ├── location_form.html │ │ │ └── location_list.html │ │ ├── misc │ │ │ └── includes │ │ │ │ ├── example.html │ │ │ │ ├── favicons.html │ │ │ │ ├── footer.html │ │ │ │ ├── header.html │ │ │ │ └── pagination.html │ │ ├── music │ │ │ ├── feeds │ │ │ │ └── song_description.html │ │ │ ├── song_detail.html │ │ │ └── song_list.html │ │ └── registration │ │ │ └── login.html │ ├── urls.py │ └── wsgi.py │ ├── requirements │ ├── _base.txt │ ├── dev.txt │ ├── production.txt │ ├── staging.txt │ └── test.txt │ ├── run_tests_with_coverage.sh │ ├── scripts │ ├── backup_mysql_db.sh │ ├── backup_postgresql_db.sh │ ├── clear_sessions.sh │ ├── crontab.txt │ ├── restore_mysql_db.sh │ └── restore_postgresql_db.sh │ └── setup.cfg └── ch13 └── myproject_virtualenv └── src └── django-myproject ├── .gitignore ├── LICENSE ├── locale └── .gitkeep ├── manage.py ├── myproject ├── __init__.py ├── apps │ ├── __init__.py │ ├── core │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── context_processors.py │ │ ├── model_fields.py │ │ ├── models.py │ │ ├── templatetags │ │ │ ├── __init__.py │ │ │ └── utility_tags.py │ │ └── versioning.py │ ├── likes │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── static │ │ │ └── likes │ │ │ │ └── js │ │ │ │ └── widget.js │ │ ├── templates │ │ │ └── likes │ │ │ │ └── includes │ │ │ │ └── widget.html │ │ ├── templatetags │ │ │ ├── __init__.py │ │ │ └── likes_tags.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ ├── locations │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── admin1.py │ │ ├── admin2.py │ │ ├── apps.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_frontend.py │ │ ├── urls.py │ │ └── views.py │ └── music │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── api.py │ │ ├── apps.py │ │ ├── feeds.py │ │ ├── forms.py │ │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ ├── export_music_to_csv.py │ │ │ ├── import_music_from_csv.py │ │ │ ├── import_music_from_lastfm_json.py │ │ │ ├── import_music_from_lastfm_xml.py │ │ │ └── import_music_from_xlsx.py │ │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ │ ├── models.py │ │ ├── serializers.py │ │ ├── tests │ │ ├── __init__.py │ │ └── test_api.py │ │ ├── urls.py │ │ └── views.py ├── settings │ ├── __init__.py │ ├── _base.py │ ├── dev.py │ ├── production.py │ ├── sample_secrets.json │ ├── staging.py │ └── test.py ├── site_static │ └── site │ │ ├── css │ │ ├── location_map.css │ │ ├── rating.css │ │ └── style.css │ │ ├── img │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ └── logo.svg │ │ └── js │ │ ├── list.js │ │ ├── location_change_form.js │ │ ├── location_detail.js │ │ ├── main.js │ │ └── picture_upload.js ├── templates │ ├── base.html │ ├── index.html │ ├── locations │ │ ├── includes │ │ │ └── navigation.html │ │ ├── location_deleting_confirmation.html │ │ ├── location_detail.html │ │ ├── location_detail_modal.html │ │ ├── location_form.html │ │ └── location_list.html │ ├── misc │ │ └── includes │ │ │ ├── example.html │ │ │ ├── favicons.html │ │ │ ├── footer.html │ │ │ ├── header.html │ │ │ └── pagination.html │ ├── music │ │ ├── feeds │ │ │ └── song_description.html │ │ ├── song_detail.html │ │ └── song_list.html │ └── registration │ │ └── login.html ├── urls.py └── wsgi.py ├── requirements ├── _base.txt ├── dev.txt ├── production.txt ├── staging.txt └── test.txt ├── run_tests_with_coverage.sh ├── scripts ├── backup_mysql_db.sh ├── backup_postgresql_db.sh ├── clear_sessions.sh ├── crontab.txt ├── restore_mysql_db.sh └── restore_postgresql_db.sh └── setup.cfg /ch01/.bash_profile: -------------------------------------------------------------------------------- 1 | alias delpyc=' 2 | find . -name "*.py[co]" -delete 3 | find . -type d -name "__pycache__" -delete' -------------------------------------------------------------------------------- /ch01/my.cnf: -------------------------------------------------------------------------------- 1 | [client] 2 | default-character-set = utf8 3 | [mysql] 4 | default-character-set = utf8 5 | [mysqld] 6 | collation-server = utf8_unicode_ci 7 | init-connect = 'SET NAMES utf8' 8 | character-set-server = utf8 -------------------------------------------------------------------------------- /ch01/myproject_docker/git-hooks/install_hooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cp pre-commit ../.git/hooks/ -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/locale/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/locale/.gitkeep -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/__init__.py -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/apps/__init__.py -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/settings/__init__.py -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/dev.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = True 4 | -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/last-update.txt: -------------------------------------------------------------------------------- 1 | 20190817031425 -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/production.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = False 4 | -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/staging.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = False 4 | -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/settings/test.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = True 4 | -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/css/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/css/style.css -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon-16x16.png -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon-32x32.png -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/img/favicon.ico -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/js/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/js/main.js -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/site_static/site/scss/style.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch01/myproject_docker/src/myproject/myproject/site_static/site/scss/style.scss -------------------------------------------------------------------------------- /ch01/myproject_docker/src/myproject/myproject/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |
3 | {% trans "Available formats are JPG, GIF, and PNG." %} 4 | {% trans "Minimal size is 800 × 800 px." %} 5 |
6 | -------------------------------------------------------------------------------- /ch03/myproject_virtualenv/src/django-myproject/myproject/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |A new viral video called "{{ title }}" has been created.
2 |You can preview it here.
3 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/myproject/templates/viral_videos/email/administrator/message.txt: -------------------------------------------------------------------------------- 1 | A new viral video called "{{ title }}" has been created. 2 | You can preview it at {{ link }}. 3 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/myproject/templates/viral_videos/email/administrator/subject.txt: -------------------------------------------------------------------------------- 1 | New Viral Video Added 2 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/requirements/_base.txt: -------------------------------------------------------------------------------- 1 | Django~=3.0.3 2 | gunicorn==19.9.0 3 | psycopg2-binary==2.8.3 4 | pytz==2019.1 5 | sqlparse==0.3.0 6 | python-memcached==1.59 -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/requirements/dev.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/requirements/production.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/requirements/staging.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | -------------------------------------------------------------------------------- /ch07/myproject_docker/src/myproject/requirements/test.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/deployment/.htaccess: -------------------------------------------------------------------------------- 1 | Require all denied -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/locale/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/locale/.gitkeep -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/admin_honeypot_fix/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/admin_honeypot_fix/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/admin_honeypot_fix/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class AdminHoneypotConfig(AppConfig): 6 | name = "admin_honeypot" 7 | verbose_name = _("Admin Honeypot") 8 | 9 | def ready(self): 10 | from .admin import FixedLoginAttemptAdmin 11 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/auth_extra/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/auth_extra/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/core/context_processors.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | def website_url(request): 4 | return { 5 | "WEBSITE_URL": settings.WEBSITE_URL, 6 | } 7 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/external_auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/external_auth/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/external_auth/context_processors.py: -------------------------------------------------------------------------------- 1 | 2 | def auth0(request): 3 | data = {} 4 | if request.user.is_authenticated: 5 | auth0_user = request.user.social_auth.filter(provider="auth0").first() 6 | data = { 7 | "auth0_user": auth0_user, 8 | } 9 | return data -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/ideas/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.ideas.apps.IdeasAppConfig" -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/ideas/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class IdeasAppConfig(AppConfig): 6 | name = "myproject.apps.ideas" 7 | verbose_name = _("Ideas") 8 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/ideas/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/ideas/migrations/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.viral_videos.apps.ViralVideosAppConfig" 2 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import ViralVideo 4 | 5 | admin.site.register(ViralVideo) 6 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/migrations/__init__.py -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import viral_video_detail 4 | 5 | 6 | urlpatterns = [ 7 | path('3 | {% trans "Available formats are JPG, GIF, and PNG." %} 4 | {% trans "Minimal size is 800 × 800 px." %} 5 |
6 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/templates/misc/includes/example.html: -------------------------------------------------------------------------------- 1 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |A new viral video called "{{ title }}" has been created.
2 |You can preview it here.
3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/templates/viral_videos/email/administrator/message.txt: -------------------------------------------------------------------------------- 1 | A new viral video called "{{ title }}" has been created. 2 | You can preview it at {{ link }}. 3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/myproject/templates/viral_videos/email/administrator/subject.txt: -------------------------------------------------------------------------------- 1 | New Viral Video Added 2 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/requirements/dev.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/requirements/production.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | gunicorn==19.7.1 3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/requirements/staging.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | gunicorn==19.7.1 3 | -------------------------------------------------------------------------------- /ch07/myproject_virtualenv/src/django-myproject/requirements/test.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/locale/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/locale/.gitkeep -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/accounts/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.accounts.apps.AccountsConfig" 2 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from .admin2 import * -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/accounts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/accounts/migrations/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/accounts/models.py: -------------------------------------------------------------------------------- 1 | from .models2 import * -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.categories1.apps.Categories1AppConfig" -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django_mptt_admin.admin import DjangoMpttAdmin 3 | 4 | from .models import Category 5 | 6 | 7 | @admin.register(Category) 8 | class CategoryAdmin(DjangoMpttAdmin): 9 | list_display = ["title", "created", "modified"] 10 | list_filter = ["created"] 11 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class Categories1AppConfig(AppConfig): 6 | name = "myproject.apps.categories1" 7 | verbose_name = _("Categories using MPTT") 8 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/migrations/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories1/views.py: -------------------------------------------------------------------------------- 1 | from django.views.generic import ListView 2 | 3 | from .models import Category 4 | 5 | 6 | class IdeaCategoryList(ListView): 7 | model = Category 8 | template_name = "categories1/category_list.html" 9 | context_object_name = "categories" 10 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories2/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.categories2.apps.Categories2AppConfig" -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories2/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class Categories2AppConfig(AppConfig): 6 | name = "myproject.apps.categories2" 7 | verbose_name = _("Categories using TreeBeard") 8 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories2/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/categories2/migrations/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/context_processors.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | def website_url(request): 4 | return { 5 | "WEBSITE_URL": settings.WEBSITE_URL, 6 | } 7 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/form_fields.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | 4 | class MultipleChoiceTreeField(forms.ModelMultipleChoiceField): 5 | widget = forms.CheckboxSelectMultiple 6 | 7 | def label_from_instance(self, obj): 8 | return obj 9 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas1/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.ideas1.apps.Ideas1AppConfig" -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas1/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class Ideas1AppConfig(AppConfig): 6 | name = "myproject.apps.ideas1" 7 | verbose_name = _("Ideas with Categories using MPTT") 8 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas1/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas1/migrations/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas2/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.ideas2.apps.Ideas2AppConfig" -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas2/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class Ideas2AppConfig(AppConfig): 6 | name = "myproject.apps.ideas2" 7 | verbose_name = _("Ideas with Categories using TreeBeard") 8 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas2/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/apps/ideas2/migrations/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/settings/__init__.py -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/dev.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = True 4 | 5 | WEBSITE_URL = "http://127.0.0.1:8000" # without trailing slash 6 | MEDIA_URL = f"{WEBSITE_URL}/media/" 7 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/production.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = False 4 | 5 | WEBSITE_URL = "https://example.com" # without trailing slash 6 | MEDIA_URL = f"{WEBSITE_URL}/media/" 7 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/sample_secrets.json: -------------------------------------------------------------------------------- 1 | { 2 | "DATABASE_NAME": "", 3 | "DATABASE_USER": "", 4 | "DATABASE_PASSWORD": "", 5 | "DJANGO_SECRET_KEY": "change-this-to-50-characters-long-random-string", 6 | "GOOGLE_MAPS_API_KEY": "" 7 | } 8 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/staging.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = False 4 | 5 | WEBSITE_URL = "https://staging.myproject.com" # without trailing slash 6 | MEDIA_URL = f"{WEBSITE_URL}/media/" 7 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/settings/test.py: -------------------------------------------------------------------------------- 1 | from ._base import * 2 | 3 | DEBUG = True 4 | 5 | WEBSITE_URL = "http://127.0.0.1:8000" # without trailing slash 6 | MEDIA_URL = f"{WEBSITE_URL}/media/" 7 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/css/style.css: -------------------------------------------------------------------------------- 1 | .level-0 { 2 | margin-left: 0; 3 | } 4 | 5 | .level-1 { 6 | margin-left: 20px; 7 | } 8 | 9 | .level-2 { 10 | margin-left: 40px; 11 | } -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon-16x16.png -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon-32x32.png -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/img/favicon.ico -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/js/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch08/myproject_virtualenv/src/django-myproject/myproject/site_static/site/js/main.js -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/templates/admin/accounts/includes/avatar.html: -------------------------------------------------------------------------------- 1 | {% if obj.avatar %} 2 |3 | {% trans "Available formats are JPG, GIF, and PNG." %} 4 | {% trans "Minimal size is 800 × 800 px." %} 5 |
6 | -------------------------------------------------------------------------------- /ch08/myproject_virtualenv/src/django-myproject/myproject/templates/misc/includes/example.html: -------------------------------------------------------------------------------- 1 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |A new viral video called "{{ title }}" has been created.
2 |You can preview it here.
3 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/myproject/templates/viral_videos/email/administrator/message.txt: -------------------------------------------------------------------------------- 1 | A new viral video called "{{ title }}" has been created. 2 | You can preview it at {{ link }}. 3 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/myproject/templates/viral_videos/email/administrator/subject.txt: -------------------------------------------------------------------------------- 1 | New Viral Video Added 2 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/requirements/dev.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/requirements/production.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | gunicorn==19.7.1 3 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/requirements/staging.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | gunicorn==19.7.1 3 | -------------------------------------------------------------------------------- /ch10/myproject_virtualenv/src/django-myproject/requirements/test.txt: -------------------------------------------------------------------------------- 1 | -r _base.txt 2 | coverage==4.5.3 3 | -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/locale/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/locale/.gitkeep -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/core/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/core/context_processors.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | def website_url(request): 4 | return { 5 | "WEBSITE_URL": settings.WEBSITE_URL, 6 | } 7 | -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/core/templatetags/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "myproject.apps.likes.apps.LikesAppConfig" -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class LikesAppConfig(AppConfig): 6 | name = "myproject.apps.likes" 7 | verbose_name = _("Likes") 8 | -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/migrations/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/templatetags/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition/9371e0ea6f4dc61567bf28299cf57146519e274c/ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/tests/__init__.py -------------------------------------------------------------------------------- /ch11/myproject_virtualenv/src/django-myproject/myproject/apps/likes/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import json_set_like 3 | 4 | app_name = "likes" 5 | 6 | 7 | urlpatterns = [ 8 | path("I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |I am included.
2 | {% load static utility_tags %} 3 | {% get_static_prefix as STATIC_URL %} 4 | {% parse "{{ STATIC_URL }}site/img/" as image_directory %} 5 |