├── about
├── __init__.py
├── migrations
│ ├── __init__.py
│ └── 0001_initial.py
├── tests.py
├── apps.py
├── urls.py
├── mixins.py
├── admin.py
├── views.py
└── models.py
├── home
├── __init__.py
├── migrations
│ └── __init__.py
├── models.py
├── admin.py
├── tests.py
├── apps.py
├── urls.py
├── views.py
└── templates
│ └── home
│ └── index.html
├── account
├── __init__.py
├── migrations
│ ├── __init__.py
│ ├── 0002_alter_profile_image.py
│ ├── 0004_alter_profile_user.py
│ ├── 0001_initial.py
│ └── 0003_alter_profile_image_alter_profile_user.py
├── tests.py
├── apps.py
├── admin.py
├── urls.py
├── models.py
├── templates
│ └── account
│ │ ├── base.html
│ │ ├── login.html
│ │ └── register.html
├── views.py
└── forms.py
├── product
├── __init__.py
├── migrations
│ ├── __init__.py
│ └── 0001_initial.py
├── tests.py
├── apps.py
├── urls.py
├── admin.py
├── views.py
└── models.py
├── sixteen
├── __init__.py
├── asgi.py
├── wsgi.py
├── urls.py
└── settings.py
├── static
├── account
│ ├── css
│ │ └── bootstrap
│ │ │ ├── mixins
│ │ │ ├── _reset-text.css
│ │ │ ├── _text-hide.css
│ │ │ ├── _visibility.css
│ │ │ ├── _border-radius.css
│ │ │ └── _screen-reader.css
│ │ │ ├── utilities
│ │ │ └── _stretched-link.css
│ │ │ └── _media.css
│ ├── scss
│ │ ├── bootstrap
│ │ │ ├── utilities
│ │ │ │ ├── _clearfix.scss
│ │ │ │ ├── _overflow.scss
│ │ │ │ ├── _screenreaders.scss
│ │ │ │ ├── _visibility.scss
│ │ │ │ ├── _shadows.scss
│ │ │ │ ├── _float.scss
│ │ │ │ ├── _align.scss
│ │ │ │ ├── _background.scss
│ │ │ │ ├── _stretched-link.scss
│ │ │ │ ├── _sizing.scss
│ │ │ │ ├── _display.scss
│ │ │ │ ├── _position.scss
│ │ │ │ ├── _embed.scss
│ │ │ │ ├── _borders.scss
│ │ │ │ ├── _text.scss
│ │ │ │ ├── _spacing.scss
│ │ │ │ └── _flex.scss
│ │ │ ├── _media.scss
│ │ │ ├── mixins
│ │ │ │ ├── _clearfix.scss
│ │ │ │ ├── _size.scss
│ │ │ │ ├── _lists.scss
│ │ │ │ ├── _text-truncate.scss
│ │ │ │ ├── _resize.scss
│ │ │ │ ├── _visibility.scss
│ │ │ │ ├── _alert.scss
│ │ │ │ ├── _nav-divider.scss
│ │ │ │ ├── _text-hide.scss
│ │ │ │ ├── _badge.scss
│ │ │ │ ├── _transition.scss
│ │ │ │ ├── _text-emphasis.scss
│ │ │ │ ├── _float.scss
│ │ │ │ ├── _list-group.scss
│ │ │ │ ├── _reset-text.scss
│ │ │ │ ├── _pagination.scss
│ │ │ │ ├── _background-variant.scss
│ │ │ │ ├── _box-shadow.scss
│ │ │ │ ├── _deprecate.scss
│ │ │ │ ├── _screen-reader.scss
│ │ │ │ ├── _hover.scss
│ │ │ │ ├── _table-row.scss
│ │ │ │ ├── _image.scss
│ │ │ │ ├── _border-radius.scss
│ │ │ │ ├── _caret.scss
│ │ │ │ ├── _grid.scss
│ │ │ │ ├── _grid-framework.scss
│ │ │ │ ├── _gradients.scss
│ │ │ │ ├── _buttons.scss
│ │ │ │ └── _breakpoints.scss
│ │ │ ├── _transitions.scss
│ │ │ ├── bootstrap-reboot.scss
│ │ │ ├── _jumbotron.scss
│ │ │ ├── _utilities.scss
│ │ │ ├── _root.scss
│ │ │ ├── bootstrap-grid.scss
│ │ │ ├── bootstrap.scss
│ │ │ ├── _close.scss
│ │ │ ├── _toasts.scss
│ │ │ ├── _code.scss
│ │ │ ├── _grid.scss
│ │ │ ├── _progress.scss
│ │ │ ├── _mixins.scss
│ │ │ ├── _spinners.scss
│ │ │ ├── _images.scss
│ │ │ ├── _badge.scss
│ │ │ ├── _alert.scss
│ │ │ ├── _breadcrumb.scss
│ │ │ ├── _pagination.scss
│ │ │ ├── _nav.scss
│ │ │ ├── _type.scss
│ │ │ ├── _functions.scss
│ │ │ ├── _tooltip.scss
│ │ │ ├── _buttons.scss
│ │ │ ├── _print.scss
│ │ │ ├── _button-group.scss
│ │ │ ├── _tables.scss
│ │ │ ├── _list-group.scss
│ │ │ ├── _dropdown.scss
│ │ │ ├── _popover.scss
│ │ │ └── _carousel.scss
│ │ └── style.scss
│ ├── images
│ │ └── bg.jpg
│ └── js
│ │ └── main.js
├── fonts
│ ├── slick.eot
│ ├── slick.ttf
│ ├── slick.woff
│ ├── Flaticon.woff
│ ├── FontAwesome.otf
│ ├── flexslider-icon.eot
│ ├── flexslider-icon.ttf
│ ├── flexslider-icon.woff
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── fontawesome-webfont.woff2
│ ├── slick.svg
│ └── flexslider-icon.svg
├── images
│ ├── favicon.png
│ ├── team_01.jpg
│ ├── team_02.jpg
│ ├── team_03.jpg
│ ├── team_04.jpg
│ ├── team_05.jpg
│ ├── team_06.jpg
│ ├── client-01.png
│ ├── more-info.jpg
│ ├── product_01.jpg
│ ├── product_02.jpg
│ ├── product_03.jpg
│ ├── product_04.jpg
│ ├── product_05.jpg
│ ├── product_06.jpg
│ ├── slide_01.jpg
│ ├── slide_02.jpg
│ ├── slide_03.jpg
│ ├── services-bg.jpg
│ ├── about-heading.jpg
│ ├── contact-heading.jpg
│ ├── feature-image.jpg
│ ├── static-profile.jpeg
│ └── products-heading.jpg
├── comment_section_css
│ ├── override.css
│ └── owl.css
└── css
│ └── owl.css
├── requirements.txt
├── templates
├── includes
│ ├── preloader.html
│ ├── scripts.html
│ └── header.html
├── admin
│ └── base_site.html
└── base.html
├── .idea
├── misc.xml
├── .gitignore
├── inspectionProfiles
│ ├── profiles_settings.xml
│ └── Project_Default.xml
├── vcs.xml
├── modules.xml
├── dataSources.xml
└── sixteen.iml
├── README.md
├── manage.py
└── .gitignore
/about/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/home/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/account/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/product/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sixteen/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/about/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/home/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/account/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/product/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/mixins/_reset-text.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/mixins/_text-hide.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/mixins/_visibility.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/mixins/_border-radius.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/mixins/_screen-reader.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/home/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 |
--------------------------------------------------------------------------------
/about/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/account/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/home/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/home/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/product/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_clearfix.scss:
--------------------------------------------------------------------------------
1 | .clearfix {
2 | @include clearfix();
3 | }
4 |
--------------------------------------------------------------------------------
/static/fonts/slick.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/slick.eot
--------------------------------------------------------------------------------
/static/fonts/slick.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/slick.ttf
--------------------------------------------------------------------------------
/static/fonts/slick.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/slick.woff
--------------------------------------------------------------------------------
/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/favicon.png
--------------------------------------------------------------------------------
/static/images/team_01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_01.jpg
--------------------------------------------------------------------------------
/static/images/team_02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_02.jpg
--------------------------------------------------------------------------------
/static/images/team_03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_03.jpg
--------------------------------------------------------------------------------
/static/images/team_04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_04.jpg
--------------------------------------------------------------------------------
/static/images/team_05.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_05.jpg
--------------------------------------------------------------------------------
/static/images/team_06.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/team_06.jpg
--------------------------------------------------------------------------------
/static/account/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/account/images/bg.jpg
--------------------------------------------------------------------------------
/static/fonts/Flaticon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/Flaticon.woff
--------------------------------------------------------------------------------
/static/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/static/images/client-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/client-01.png
--------------------------------------------------------------------------------
/static/images/more-info.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/more-info.jpg
--------------------------------------------------------------------------------
/static/images/product_01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_01.jpg
--------------------------------------------------------------------------------
/static/images/product_02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_02.jpg
--------------------------------------------------------------------------------
/static/images/product_03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_03.jpg
--------------------------------------------------------------------------------
/static/images/product_04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_04.jpg
--------------------------------------------------------------------------------
/static/images/product_05.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_05.jpg
--------------------------------------------------------------------------------
/static/images/product_06.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/product_06.jpg
--------------------------------------------------------------------------------
/static/images/slide_01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/slide_01.jpg
--------------------------------------------------------------------------------
/static/images/slide_02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/slide_02.jpg
--------------------------------------------------------------------------------
/static/images/slide_03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/slide_03.jpg
--------------------------------------------------------------------------------
/static/images/services-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/services-bg.jpg
--------------------------------------------------------------------------------
/static/fonts/flexslider-icon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/flexslider-icon.eot
--------------------------------------------------------------------------------
/static/fonts/flexslider-icon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/flexslider-icon.ttf
--------------------------------------------------------------------------------
/static/fonts/flexslider-icon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/flexslider-icon.woff
--------------------------------------------------------------------------------
/static/images/about-heading.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/about-heading.jpg
--------------------------------------------------------------------------------
/static/images/contact-heading.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/contact-heading.jpg
--------------------------------------------------------------------------------
/static/images/feature-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/feature-image.jpg
--------------------------------------------------------------------------------
/static/images/static-profile.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/static-profile.jpeg
--------------------------------------------------------------------------------
/static/images/products-heading.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/images/products-heading.jpg
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Danial-Azarpanah/product-market/HEAD/static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | asgiref==3.5.2
2 | Django==4.0.6
3 | django-cleanup==6.0.0
4 | django-social-share==2.2.1
5 | Pillow==9.2.0
6 | sqlparse==0.4.2
7 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/_media.scss:
--------------------------------------------------------------------------------
1 | .media {
2 | display: flex;
3 | align-items: flex-start;
4 | }
5 |
6 | .media-body {
7 | flex: 1;
8 | }
9 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix() {
2 | &::after {
3 | display: block;
4 | clear: both;
5 | content: "";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/home/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class HomeConfig(AppConfig):
5 | default_auto_field = 'django.db.models.BigAutoField'
6 | name = 'home'
7 |
--------------------------------------------------------------------------------
/about/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class AboutConfig(AppConfig):
5 | default_auto_field = 'django.db.models.BigAutoField'
6 | name = 'about'
7 |
--------------------------------------------------------------------------------
/home/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 |
3 | from . import views
4 |
5 | app_name = 'main'
6 | urlpatterns = [
7 | path('', views.HomeView.as_view(), name='home'),
8 | ]
--------------------------------------------------------------------------------
/templates/includes/preloader.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/account/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class AccountConfig(AppConfig):
5 | default_auto_field = 'django.db.models.BigAutoField'
6 | name = 'account'
7 |
--------------------------------------------------------------------------------
/product/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class ProductConfig(AppConfig):
5 | default_auto_field = 'django.db.models.BigAutoField'
6 | name = 'product'
7 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_overflow.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $value in $overflows {
4 | .overflow-#{$value} { overflow: $value !important; }
5 | }
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_size.scss:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | @mixin size($width, $height: $width) {
4 | width: $width;
5 | height: $height;
6 | @include deprecate("`size()`", "v4.3.0", "v5");
7 | }
8 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_screenreaders.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Screenreaders
3 | //
4 |
5 | .sr-only {
6 | @include sr-only();
7 | }
8 |
9 | .sr-only-focusable {
10 | @include sr-only-focusable();
11 | }
12 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/comment_section_css/override.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: yekan;
3 | font-weight: normal;
4 | font-style: normal;
5 | src: url("../fonts/Yekan.woff");
6 | }
7 |
8 | * {
9 | font-family: yekan;
10 | }
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_lists.scss:
--------------------------------------------------------------------------------
1 | // Lists
2 |
3 | // Unstyled keeps list items block level, just removes default browser padding and list-style
4 | @mixin list-unstyled {
5 | padding-left: 0;
6 | list-style: none;
7 | }
8 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_text-truncate.scss:
--------------------------------------------------------------------------------
1 | // Text truncate
2 | // Requires inline-block or block for proper styling
3 |
4 | @mixin text-truncate() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/account/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | from .models import Profile
4 |
5 |
6 | @admin.register(Profile)
7 | class ProfileAdmin(admin.ModelAdmin):
8 | list_display = ('user', 'show_image')
9 | search_fields = ('user__username',)
10 |
--------------------------------------------------------------------------------
/product/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 |
3 | from . import views
4 |
5 | app_name = "product"
6 | urlpatterns = [
7 | path("list", views.ProductListView.as_view(), name="list"),
8 | path("detail/", views.product_detail, name="detail"),
9 | ]
--------------------------------------------------------------------------------
/about/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 |
3 | from . import views
4 |
5 | app_name = "about"
6 | urlpatterns = [
7 | path("", views.AboutUsView.as_view(), name="about"),
8 | path("contact-us", views.ContactUsView.as_view(), name="contact_us"),
9 | ]
10 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_resize.scss:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | @mixin resizable($direction) {
4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5 | resize: $direction; // Options: horizontal, vertical, both
6 | }
7 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_visibility.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Visibility
4 |
5 | @mixin invisible($visibility) {
6 | visibility: $visibility !important;
7 | @include deprecate("`invisible()`", "v4.3.0", "v5");
8 | }
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/utilities/_stretched-link.css:
--------------------------------------------------------------------------------
1 | .stretched-link::after {
2 | position: absolute;
3 | top: 0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | z-index: 1;
8 | pointer-events: auto;
9 | content: "";
10 | background-color: rgba(0, 0, 0, 0); }
11 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_visibility.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | //
4 | // Visibility utilities
5 | //
6 |
7 | .visible {
8 | visibility: visible !important;
9 | }
10 |
11 | .invisible {
12 | visibility: hidden !important;
13 | }
14 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/static/account/css/bootstrap/_media.css:
--------------------------------------------------------------------------------
1 | .media {
2 | display: -webkit-box;
3 | display: -ms-flexbox;
4 | display: flex;
5 | -webkit-box-align: start;
6 | -ms-flex-align: start;
7 | align-items: flex-start; }
8 |
9 | .media-body {
10 | -webkit-box-flex: 1;
11 | -ms-flex: 1;
12 | flex: 1; }
13 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_shadows.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | .shadow-sm { box-shadow: $box-shadow-sm !important; }
4 | .shadow { box-shadow: $box-shadow !important; }
5 | .shadow-lg { box-shadow: $box-shadow-lg !important; }
6 | .shadow-none { box-shadow: none !important; }
7 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_alert.scss:
--------------------------------------------------------------------------------
1 | @mixin alert-variant($background, $border, $color) {
2 | color: $color;
3 | @include gradient-bg($background);
4 | border-color: $border;
5 |
6 | hr {
7 | border-top-color: darken($border, 5%);
8 | }
9 |
10 | .alert-link {
11 | color: darken($color, 10%);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_nav-divider.scss:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
6 | height: 0;
7 | margin: $margin-y 0;
8 | overflow: hidden;
9 | border-top: 1px solid $color;
10 | }
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # product-market
2 | This project is an online product market with login, register and logout functionality with about, contact, all products page, and also product detail panel.
3 |
4 | Please don't mind giving a hand in this simple but practical project!
5 |
6 | I won't commit any changes to this project for a while (2 to 3 months) because of some upcoming projects. Stay tuned for them!
7 |
--------------------------------------------------------------------------------
/templates/admin/base_site.html:
--------------------------------------------------------------------------------
1 | {% extends "admin/base.html" %}
2 |
3 | {% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
4 |
5 | {% block branding %}
6 |
7 | {% endblock %}
8 |
9 | {% block nav-global %}{% endblock %}
10 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/_transitions.scss:
--------------------------------------------------------------------------------
1 | .fade {
2 | @include transition($transition-fade);
3 |
4 | &:not(.show) {
5 | opacity: 0;
6 | }
7 | }
8 |
9 | .collapse {
10 | &:not(.show) {
11 | display: none;
12 | }
13 | }
14 |
15 | .collapsing {
16 | position: relative;
17 | height: 0;
18 | overflow: hidden;
19 | @include transition($transition-collapse);
20 | }
21 |
--------------------------------------------------------------------------------
/account/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from django.contrib.auth.views import LogoutView
3 |
4 | from . import views
5 |
6 | app_name = 'account'
7 | urlpatterns = [
8 | path('login', views.LoginUserView.as_view(), name='login'),
9 | path('register/', views.RegisterUserView.as_view(), name='register'),
10 | path('logout', LogoutView.as_view(next_page='main:home'), name='logout')
11 | ]
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_text-hide.scss:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | @mixin text-hide($ignore-warning: false) {
3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
4 | font: 0/0 a;
5 | color: transparent;
6 | text-shadow: none;
7 | background-color: transparent;
8 | border: 0;
9 |
10 | @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning);
11 | }
12 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_badge.scss:
--------------------------------------------------------------------------------
1 | @mixin badge-variant($bg) {
2 | color: color-yiq($bg);
3 | background-color: $bg;
4 |
5 | @at-root a#{&} {
6 | @include hover-focus {
7 | color: color-yiq($bg);
8 | background-color: darken($bg, 10%);
9 | }
10 |
11 | &:focus,
12 | &.focus {
13 | outline: 0;
14 | box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/about/mixins.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import redirect
2 |
3 |
4 | class LoginAuthenticateMixin:
5 | """
6 | This mixin is for authenticating whether user is logged in or not
7 | """
8 |
9 | def dispatch(self, request, *args, **kwargs):
10 | if not request.user.is_authenticated:
11 | return redirect("account:login")
12 | return super(LoginAuthenticateMixin, self).dispatch(request, *args, **kwargs)
13 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_float.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $breakpoint in map-keys($grid-breakpoints) {
4 | @include media-breakpoint-up($breakpoint) {
5 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
6 |
7 | .float#{$infix}-left { float: left !important; }
8 | .float#{$infix}-right { float: right !important; }
9 | .float#{$infix}-none { float: none !important; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/sixteen/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for sixteen project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sixteen.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/sixteen/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for sixteen project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sixteen.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_transition.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable property-blacklist
2 | @mixin transition($transition...) {
3 | @if $enable-transitions {
4 | @if length($transition) == 0 {
5 | transition: $transition-base;
6 | } @else {
7 | transition: $transition;
8 | }
9 | }
10 |
11 | @if $enable-prefers-reduced-motion-media-query {
12 | @media (prefers-reduced-motion: reduce) {
13 | transition: none;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_text-emphasis.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Typography
4 |
5 | @mixin text-emphasis-variant($parent, $color) {
6 | #{$parent} {
7 | color: $color !important;
8 | }
9 | @if $emphasized-link-hover-darken-percentage != 0 {
10 | a#{$parent} {
11 | @include hover-focus {
12 | color: darken($color, $emphasized-link-hover-darken-percentage) !important;
13 | }
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_align.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | .align-baseline { vertical-align: baseline !important; } // Browser default
4 | .align-top { vertical-align: top !important; }
5 | .align-middle { vertical-align: middle !important; }
6 | .align-bottom { vertical-align: bottom !important; }
7 | .align-text-bottom { vertical-align: text-bottom !important; }
8 | .align-text-top { vertical-align: text-top !important; }
9 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_float.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @mixin float-left {
4 | float: left !important;
5 | @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
6 | }
7 | @mixin float-right {
8 | float: right !important;
9 | @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
10 | }
11 | @mixin float-none {
12 | float: none !important;
13 | @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
14 | }
15 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/bootstrap-reboot.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
3 | * Copyright 2011-2019 The Bootstrap Authors
4 | * Copyright 2011-2019 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
7 | */
8 |
9 | @import "functions";
10 | @import "variables";
11 | @import "mixins";
12 | @import "reboot";
13 |
--------------------------------------------------------------------------------
/account/migrations/0002_alter_profile_image.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 4.0.6 on 2022-07-27 14:48
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('account', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='image',
16 | field=models.ImageField(upload_to='images/profile'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/about/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | from .models import AboutUs, TeamMember, Message
4 |
5 |
6 | @admin.register(Message)
7 | class MessageAdmin(admin.ModelAdmin):
8 | list_display = ('subject', 'email')
9 | search_fields = ('subject', 'text')
10 |
11 |
12 | @admin.register(TeamMember)
13 | class TeamMemberAdmin(admin.ModelAdmin):
14 | list_display = ('user', 'profession', 'show_image')
15 | search_fields = ('user__username',)
16 |
17 |
18 | admin.site.register(AboutUs)
19 |
--------------------------------------------------------------------------------
/sixteen/urls.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from django.urls import path, include
3 | from django.conf.urls.static import static
4 |
5 | from . import settings
6 |
7 | urlpatterns = [
8 | path('admin/', admin.site.urls),
9 | path('', include('home.urls')),
10 | path('account/', include('account.urls')),
11 | path('about/', include('about.urls')),
12 | path('product/', include("product.urls")),
13 | ]
14 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
15 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/_jumbotron.scss:
--------------------------------------------------------------------------------
1 | .jumbotron {
2 | padding: $jumbotron-padding ($jumbotron-padding / 2);
3 | margin-bottom: $jumbotron-padding;
4 | color: $jumbotron-color;
5 | background-color: $jumbotron-bg;
6 | @include border-radius($border-radius-lg);
7 |
8 | @include media-breakpoint-up(sm) {
9 | padding: ($jumbotron-padding * 2) $jumbotron-padding;
10 | }
11 | }
12 |
13 | .jumbotron-fluid {
14 | padding-right: 0;
15 | padding-left: 0;
16 | @include border-radius(0);
17 | }
18 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_background.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $color, $value in $theme-colors {
4 | @include bg-variant(".bg-#{$color}", $value);
5 | }
6 |
7 | @if $enable-gradients {
8 | @each $color, $value in $theme-colors {
9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value);
10 | }
11 | }
12 |
13 | .bg-white {
14 | background-color: $white !important;
15 | }
16 |
17 | .bg-transparent {
18 | background-color: transparent !important;
19 | }
20 |
--------------------------------------------------------------------------------
/product/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | from .models import *
4 |
5 |
6 | @admin.register(Comment)
7 | class CommentAdmin(admin.ModelAdmin):
8 | list_filter = ('product',)
9 | search_fields = ('body', 'product__title')
10 |
11 |
12 | @admin.register(Product)
13 | class ProductAdmin(admin.ModelAdmin):
14 | list_filter = ('category',)
15 | search_fields = ('title', 'id', 'slug')
16 | list_display = ('title', 'price', 'show_image')
17 |
18 |
19 | admin.site.register(Category)
20 | admin.site.register(Service)
21 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_stretched-link.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Stretched link
3 | //
4 |
5 | .stretched-link {
6 | &::after {
7 | position: absolute;
8 | top: 0;
9 | right: 0;
10 | bottom: 0;
11 | left: 0;
12 | z-index: 1;
13 | // Just in case `pointer-events: none` is set on a parent
14 | pointer-events: auto;
15 | content: "";
16 | // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color
17 | background-color: rgba(0, 0, 0, 0);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_list-group.scss:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | @mixin list-group-item-variant($state, $background, $color) {
4 | .list-group-item-#{$state} {
5 | color: $color;
6 | background-color: $background;
7 |
8 | &.list-group-item-action {
9 | @include hover-focus {
10 | color: $color;
11 | background-color: darken($background, 5%);
12 | }
13 |
14 | &.active {
15 | color: $white;
16 | background-color: $color;
17 | border-color: $color;
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_reset-text.scss:
--------------------------------------------------------------------------------
1 | @mixin reset-text {
2 | font-family: $font-family-base;
3 | // We deliberately do NOT reset font-size or word-wrap.
4 | font-style: normal;
5 | font-weight: $font-weight-normal;
6 | line-height: $line-height-base;
7 | text-align: left; // Fallback for where `start` is not supported
8 | text-align: start;
9 | text-decoration: none;
10 | text-shadow: none;
11 | text-transform: none;
12 | letter-spacing: normal;
13 | word-break: normal;
14 | word-spacing: normal;
15 | white-space: normal;
16 | line-break: auto;
17 | }
18 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_pagination.scss:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
4 | .page-link {
5 | padding: $padding-y $padding-x;
6 | @include font-size($font-size);
7 | line-height: $line-height;
8 | }
9 |
10 | .page-item {
11 | &:first-child {
12 | .page-link {
13 | @include border-left-radius($border-radius);
14 | }
15 | }
16 | &:last-child {
17 | .page-link {
18 | @include border-right-radius($border-radius);
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/_utilities.scss:
--------------------------------------------------------------------------------
1 | @import "utilities/align";
2 | @import "utilities/background";
3 | @import "utilities/borders";
4 | @import "utilities/clearfix";
5 | @import "utilities/display";
6 | @import "utilities/embed";
7 | @import "utilities/flex";
8 | @import "utilities/float";
9 | @import "utilities/overflow";
10 | @import "utilities/position";
11 | @import "utilities/screenreaders";
12 | @import "utilities/shadows";
13 | @import "utilities/sizing";
14 | @import "utilities/stretched-link";
15 | @import "utilities/spacing";
16 | @import "utilities/text";
17 | @import "utilities/visibility";
18 |
--------------------------------------------------------------------------------
/home/views.py:
--------------------------------------------------------------------------------
1 | from django.views.generic import TemplateView
2 |
3 | from about.models import AboutUs
4 | from product.models import Service, Category, Product
5 |
6 |
7 | class HomeView(TemplateView):
8 | """
9 | Home page view
10 | """
11 | template_name = 'home/index.html'
12 | extra_context = {'services': Service.objects.all(),
13 | 'products': Product.objects.all()}
14 |
15 | def get_context_data(self, **kwargs):
16 | context = super(HomeView, self).get_context_data(**kwargs)
17 | context['aboutus'] = AboutUs.objects.last()
18 | return context
19 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_background-variant.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Contextual backgrounds
4 |
5 | @mixin bg-variant($parent, $color) {
6 | #{$parent} {
7 | background-color: $color !important;
8 | }
9 | a#{$parent},
10 | button#{$parent} {
11 | @include hover-focus {
12 | background-color: darken($color, 10%) !important;
13 | }
14 | }
15 | }
16 |
17 | @mixin bg-gradient-variant($parent, $color) {
18 | #{$parent} {
19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_sizing.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Width and height
4 |
5 | @each $prop, $abbrev in (width: w, height: h) {
6 | @each $size, $length in $sizes {
7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; }
8 | }
9 | }
10 |
11 | .mw-100 { max-width: 100% !important; }
12 | .mh-100 { max-height: 100% !important; }
13 |
14 | // Viewport additional helpers
15 |
16 | .min-vw-100 { min-width: 100vw !important; }
17 | .min-vh-100 { min-height: 100vh !important; }
18 |
19 | .vw-100 { width: 100vw !important; }
20 | .vh-100 { height: 100vh !important; }
21 |
--------------------------------------------------------------------------------
/static/account/js/main.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 |
3 | "use strict";
4 |
5 | var fullHeight = function() {
6 |
7 | $('.js-fullheight').css('height', $(window).height());
8 | $(window).resize(function(){
9 | $('.js-fullheight').css('height', $(window).height());
10 | });
11 |
12 | };
13 | fullHeight();
14 |
15 | $(".toggle-password").click(function() {
16 |
17 | $(this).toggleClass("fa-eye fa-eye-slash");
18 | var input = $($(this).attr("toggle"));
19 | if (input.attr("type") == "password") {
20 | input.attr("type", "text");
21 | } else {
22 | input.attr("type", "password");
23 | }
24 | });
25 |
26 | })(jQuery);
27 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_box-shadow.scss:
--------------------------------------------------------------------------------
1 | @mixin box-shadow($shadow...) {
2 | @if $enable-shadows {
3 | $result: ();
4 |
5 | @if (length($shadow) == 1) {
6 | // We can pass `@include box-shadow(none);`
7 | $result: $shadow;
8 | } @else {
9 | // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
10 | @for $i from 1 through length($shadow) {
11 | @if nth($shadow, $i) != "none" {
12 | $result: append($result, nth($shadow, $i), "comma");
13 | }
14 | }
15 | }
16 | @if (length($result) > 0) {
17 | box-shadow: $result;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_display.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | //
4 | // Utilities for common `display` values
5 | //
6 |
7 | @each $breakpoint in map-keys($grid-breakpoints) {
8 | @include media-breakpoint-up($breakpoint) {
9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
10 |
11 | @each $value in $displays {
12 | .d#{$infix}-#{$value} { display: $value !important; }
13 | }
14 | }
15 | }
16 |
17 |
18 | //
19 | // Utilities for toggling `display` in print
20 | //
21 |
22 | @media print {
23 | @each $value in $displays {
24 | .d-print-#{$value} { display: $value !important; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/utilities/_position.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Common values
4 | @each $position in $positions {
5 | .position-#{$position} { position: $position !important; }
6 | }
7 |
8 | // Shorthand
9 |
10 | .fixed-top {
11 | position: fixed;
12 | top: 0;
13 | right: 0;
14 | left: 0;
15 | z-index: $zindex-fixed;
16 | }
17 |
18 | .fixed-bottom {
19 | position: fixed;
20 | right: 0;
21 | bottom: 0;
22 | left: 0;
23 | z-index: $zindex-fixed;
24 | }
25 |
26 | .sticky-top {
27 | @supports (position: sticky) {
28 | position: sticky;
29 | top: 0;
30 | z-index: $zindex-sticky;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.idea/dataSources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | sqlite.xerial
6 | true
7 | true
8 | $PROJECT_DIR$/sixteen/settings.py
9 | org.sqlite.JDBC
10 | jdbc:sqlite:$PROJECT_DIR$/db.sqlite3
11 | $ProjectFileDir$
12 |
13 |
14 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/_root.scss:
--------------------------------------------------------------------------------
1 | :root {
2 | // Custom variable values only support SassScript inside `#{}`.
3 | @each $color, $value in $colors {
4 | --#{$color}: #{$value};
5 | }
6 |
7 | @each $color, $value in $theme-colors {
8 | --#{$color}: #{$value};
9 | }
10 |
11 | @each $bp, $value in $grid-breakpoints {
12 | --breakpoint-#{$bp}: #{$value};
13 | }
14 |
15 | // Use `inspect` for lists so that quoted items keep the quotes.
16 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
17 | --font-family-sans-serif: #{inspect($font-family-sans-serif)};
18 | --font-family-monospace: #{inspect($font-family-monospace)};
19 | }
20 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/mixins/_deprecate.scss:
--------------------------------------------------------------------------------
1 | // Deprecate mixin
2 | //
3 | // This mixin can be used to deprecate mixins or functions.
4 | // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5 | // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6 | @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7 | @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8 | @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/account/migrations/0004_alter_profile_user.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 4.0.6 on 2022-07-31 16:20
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 | ('account', '0003_alter_profile_image_alter_profile_user'),
13 | ]
14 |
15 | operations = [
16 | migrations.AlterField(
17 | model_name='profile',
18 | name='user',
19 | field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/static/account/scss/bootstrap/bootstrap-grid.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
3 | * Copyright 2011-2019 The Bootstrap Authors
4 | * Copyright 2011-2019 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | */
7 |
8 | html {
9 | box-sizing: border-box;
10 | -ms-overflow-style: scrollbar;
11 | }
12 |
13 | *,
14 | *::before,
15 | *::after {
16 | box-sizing: inherit;
17 | }
18 |
19 | @import "functions";
20 | @import "variables";
21 |
22 | @import "mixins/breakpoints";
23 | @import "mixins/grid-framework";
24 | @import "mixins/grid";
25 |
26 | @import "grid";
27 | @import "utilities/display";
28 | @import "utilities/flex";
29 | @import "utilities/spacing";
30 |
--------------------------------------------------------------------------------
/account/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.contrib.auth.models import User
3 | from django.utils.html import format_html
4 |
5 |
6 | class Profile(models.Model):
7 | """
8 | Profiles of users
9 | """
10 | user = models.OneToOneField(User, on_delete=models.CASCADE)
11 | image = models.ImageField(upload_to='images/profile', null=True, blank=True)
12 |
13 | def __str__(self):
14 | return self.user.get_full_name()
15 |
16 | def show_image(self):
17 | if self.image:
18 | return format_html(f'
')
19 | return format_html(f'No image
')
20 |
21 | show_image.short_description = 'image'
22 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | """Run administrative tasks."""
9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sixteen.settings')
10 | try:
11 | from django.core.management import execute_from_command_line
12 | except ImportError as exc:
13 | raise ImportError(
14 | "Couldn't import Django. Are you sure it's installed and "
15 | "available on your PYTHONPATH environment variable? Did you "
16 | "forget to activate a virtual environment?"
17 | ) from exc
18 | execute_from_command_line(sys.argv)
19 |
20 |
21 | if __name__ == '__main__':
22 | main()
23 |
--------------------------------------------------------------------------------
/product/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render, get_object_or_404
2 | from django.views.generic import ListView, DetailView
3 |
4 | from .models import Product, Comment
5 |
6 |
7 | class ProductListView(ListView):
8 | """
9 | All products in paginated view
10 | """
11 | model = Product
12 | paginate_by = 2
13 |
14 |
15 | def product_detail(request, slug):
16 | """
17 | Product detail
18 | """
19 | product = get_object_or_404(Product, slug=slug)
20 | if request.method == "POST":
21 | parent_id = request.POST.get("parent_id")
22 | body = request.POST.get("body")
23 | Comment.objects.create(product=product, user=request.user, body=body, parent_id=parent_id)
24 | return render(request, "product/product_detail.html", context={"product": product})
25 |
26 |
--------------------------------------------------------------------------------
/account/templates/account/base.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
3 |
4 |
5 | {% block title %}
6 | {% endblock %}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {% block body %}
17 | {% endblock %}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |