├── README.md ├── django101 ├── django101 │ ├── __init__.py │ ├── tasks │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0002_task_done.py │ │ │ └── 0001_initial.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── admin.py │ │ ├── models.py │ │ ├── middlewares.py │ │ ├── urls.py │ │ └── views.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py ├── .idea │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── django101.iml ├── manage.py └── templates │ └── tasks │ └── index.html ├── form_basics ├── form_basics │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0001_initial.py │ │ │ └── 0002_department_alter_employee_first_name_and_more.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── models.py │ │ ├── views.py │ │ └── forms.py │ ├── urls.py │ ├── wsgi.py │ └── asgi.py ├── templates │ └── web │ │ ├── index.html │ │ ├── employee_details.html │ │ ├── modelform_index.html │ │ └── index_old.html ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── form_basics.iml └── manage.py ├── forms_advanced ├── forms_advanced │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0004_person_profile_image.py │ │ │ ├── 0003_person_created_by.py │ │ │ ├── 0001_initial.py │ │ │ └── 0002_person_age_person_last_name_alter_person_first_name.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── validators.py │ │ ├── views.py │ │ ├── models.py │ │ └── forms.py │ ├── urls.py │ ├── asgi.py │ └── wsgi.py ├── non_django_demos │ ├── __init__.py │ └── callables.py ├── templates │ └── web │ │ ├── formsets.html │ │ └── index.html ├── requirements.txt ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── forms_advanced.iml └── manage.py ├── templates_static_files ├── staticfiles │ ├── js │ │ └── site.js │ ├── imgs │ │ └── cat.jpg │ └── css │ │ └── site.css ├── templates_static_files │ ├── __init__.py │ ├── employees │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── urls.py │ ├── asgi.py │ ├── wsgi.py │ └── settings.py ├── templates │ ├── employees │ │ ├── details.html │ │ └── index.html │ ├── demo.html │ └── base.html ├── .idea │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ └── templates_static_files.iml └── manage.py ├── templates_advanced ├── templates_advanced │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── templatetags │ │ │ ├── __init__.py │ │ │ ├── user_tags.py │ │ │ ├── list_tags.py │ │ │ └── number_filters.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── urls.py │ ├── asgi.py │ └── wsgi.py ├── staticfiles │ ├── about.css │ ├── sidebar.css │ └── main.css ├── templates │ ├── tags │ │ └── profile_avatar.html │ ├── web │ │ ├── about.html │ │ ├── bootstrap.html │ │ └── index.html │ ├── partials │ │ ├── footer.html │ │ └── header.html │ ├── master_with_sidebar.html │ └── master.html ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── jsLibraryMappings.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── templates_advanced.iml └── manage.py ├── urls_and_views_demos ├── urls_and_views_demos │ ├── __init__.py │ ├── core │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── departments │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py ├── staticfiles │ ├── main.js │ └── main.css ├── templates │ ├── 404.html │ └── core │ │ └── index.html ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ └── urls_and_views_demos.iml └── manage.py ├── exam_prep_my_music_app ├── exam_prep_my_music_app │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── forms.py │ │ └── views.py │ ├── albums │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0003_alter_album_genre.py │ │ │ ├── 0002_alter_album_artist_name_alter_album_image_url_and_more.py │ │ │ └── 0001_initial.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── models.py │ │ └── views.py │ ├── common │ │ ├── __init__.py │ │ └── profile_helpers.py │ ├── profiles │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0002_alter_profile_username.py │ │ │ └── 0001_initial.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── validators.py │ │ ├── urls.py │ │ ├── views.py │ │ └── models.py │ ├── urls.py │ ├── asgi.py │ └── wsgi.py ├── staticfiles │ ├── images │ │ ├── Lorde.jpg │ │ ├── back.jpg │ │ ├── headphones.png │ │ ├── pinkFloyd.jpg │ │ ├── musicIcons.webp │ │ └── BrandiCarlile.png │ └── css │ │ ├── style.css │ │ ├── typography.css │ │ ├── home.css │ │ ├── details.css │ │ ├── login.css │ │ └── create.css ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── exam_prep_my_music_app.iml ├── templates │ ├── albums │ │ ├── album-edit.html │ │ ├── album-add.html │ │ ├── album-delete.html │ │ └── album-details.html │ ├── profiles │ │ ├── profile-delete.html │ │ └── profile-details.html │ ├── web │ │ ├── home-no-profile.html │ │ └── home-with-profile.html │ └── base.html └── manage.py ├── class_based_views_basics ├── class_based_views_basics │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0003_alter_todo_category.py │ │ │ ├── 0001_initial.py │ │ │ └── 0002_category_todo_category.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── forms.py │ │ ├── urls.py │ │ └── models.py │ ├── custom_class_base_views │ │ ├── __init__.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── views.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py ├── templates │ └── web │ │ ├── list_todos.html │ │ ├── details_todo.html │ │ ├── create_todo.html │ │ └── index.html ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── class_based_views_basics.iml └── manage.py ├── class_based_views_advanced ├── class_based_views_advanced │ ├── __init__.py │ ├── web │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0002_todo_slug.py │ │ │ ├── 0003_todo_tenant_alter_todo_slug.py │ │ │ └── 0001_initial.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── models.py │ ├── asgi.py │ ├── wsgi.py │ └── urls.py ├── templates │ ├── web │ │ ├── detail_todo.html │ │ ├── create_todo.html │ │ └── todo_list.html │ └── base.html ├── .idea │ ├── vcs.xml │ ├── .gitignore │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── misc.xml │ ├── dataSources.xml │ └── class_based_views_advanced.iml └── manage.py ├── .idea ├── .gitignore ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml ├── modules.xml ├── misc.xml ├── dataSources.xml └── django101.iml ├── docker-compose.yml ├── LICENSE └── .gitignore /README.md: -------------------------------------------------------------------------------- 1 | # python-web-basics -------------------------------------------------------------------------------- /django101/django101/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django101/django101/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /form_basics/form_basics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /form_basics/form_basics/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /forms_advanced/forms_advanced/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /forms_advanced/non_django_demos/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django101/django101/tasks/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /forms_advanced/forms_advanced/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_static_files/staticfiles/js/site.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /form_basics/form_basics/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_advanced/templates_advanced/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_advanced/templates_advanced/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /urls_and_views_demos/urls_and_views_demos/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /forms_advanced/forms_advanced/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_static_files/templates_static_files/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /urls_and_views_demos/staticfiles/main.js: -------------------------------------------------------------------------------- 1 | alert('It works!') -------------------------------------------------------------------------------- /urls_and_views_demos/urls_and_views_demos/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_basics/class_based_views_basics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_advanced/class_based_views_advanced/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_basics/class_based_views_basics/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/albums/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/profiles/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_advanced/templates_advanced/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_advanced/templates_advanced/web/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_static_files/templates_static_files/employees/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /urls_and_views_demos/urls_and_views_demos/departments/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_advanced/class_based_views_advanced/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_advanced/staticfiles/about.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | color: #00f; 3 | } -------------------------------------------------------------------------------- /urls_and_views_demos/staticfiles/main.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /urls_and_views_demos/urls_and_views_demos/core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_basics/class_based_views_basics/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/albums/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exam_prep_my_music_app/exam_prep_my_music_app/profiles/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates_static_files/templates_static_files/employees/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /urls_and_views_demos/urls_and_views_demos/departments/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_advanced/class_based_views_advanced/web/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_basics/class_based_views_basics/custom_class_base_views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /class_based_views_advanced/templates/web/detail_todo.html: -------------------------------------------------------------------------------- 1 | {{ object }} 2 | 3 | {{ todo }} -------------------------------------------------------------------------------- /templates_static_files/templates/employees/details.html: -------------------------------------------------------------------------------- 1 |
{{ task.description }}
32 |
#}
13 |
14 |
15 |
10 | No Albums in Catalog!
10 | {% endif %} 11 | 12 | {% for album in albums %} 13 |Name: {{ album.name }}
18 |Artist: {{ album.artist_name }}
19 |Genre: {{ album.genre }}
20 |Price: ${{ album.price|floatformat:2 }}
21 |All::{{ numbers }}
27 |Odd:{{ numbers|only_odd }}
28 |Even:{{ numbers|only_even }}
29 |Positive:{{ numbers|only_positive }}
30 |Negative:{{ numbers|only_negative }}
31 | 32 | 33 |All:: {% list_of numbers %}
35 |Odd:{{ numbers|only_odd }}
36 |Even:{{ numbers|only_even }}
37 |Positive:{{ numbers|only_positive }}
38 |Negative:{{ numbers|only_negative }}
39 | 40 |You are welcome to my project, {name}!
" + \ 22 | # "{task.description}
47 | #{{ person.items }}
20 | 21 |34 | {{ person_obj.full_name }} 35 |
36 |37 | {{ person_obj.full_name|truncatechars:3 }} 38 |
39 | 40 |41 | {{ person_obj.full_name|truncatechars:33 }} 42 |
43 | 44 |45 | {{ person_obj.age }} 46 |
47 |48 | {{ person_obj.age|default:"Unknown" }} 49 |
50 | 51 |52 | {{ person_obj.first_name|default:"Unknown name" }} 53 |
54 |55 | {{ person|length }} 56 |
57 | 58 |{{ names|join:', ' }}
59 | 60 |{{ date }}
61 |{{ date|date:'D d M Y' }}
62 | 63 | 64 |{{ ages|join:', ' }}
#} 70 | {#{% endif %}#} 71 | 72 | {% if ages %} 73 |{{ ages|join:", " }}
74 | {% endif %} 75 | 76 | {% if ages %} 77 |{{ ages_empty|join:", " }}
78 | {% else %} 79 |No ages
80 | {% endif %} 81 | 82 | 83 | 84 |