├── .flake8 ├── .github └── workflows │ ├── action.yml │ └── codeql-analysis.yml ├── .gitignore ├── README.md ├── about ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── account ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── migrations │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── author ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py └── views.py ├── blog ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── cart ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── contact ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── django_ecommerce ├── __init__.py ├── settings.py ├── urls.py ├── views.py └── wsgi.py ├── manage.py ├── requirements.txt ├── shop ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── static ├── css │ ├── .DS_Store │ ├── ajax-loader.gif │ ├── animate.css │ ├── aos.css │ ├── bootstrap-datepicker.css │ ├── bootstrap.min.css │ ├── bootstrap │ │ ├── .DS_Store │ │ ├── bootstrap-grid.css │ │ └── bootstrap-reboot.css │ ├── css │ │ ├── .DS_Store │ │ ├── bootstrap-reboot.css │ │ └── mixins │ │ │ ├── .DS_Store │ │ │ └── _text-hide.css │ ├── flaticon.css │ ├── icomoon.css │ ├── ionicons.min.css │ ├── jquery.timepicker.css │ ├── magnific-popup.css │ ├── open-iconic-bootstrap.min.css │ ├── owl.carousel.min.css │ ├── owl.theme.default.min.css │ └── style.css ├── fonts │ ├── .DS_Store │ ├── flaticon │ │ ├── .DS_Store │ │ ├── backup.txt │ │ ├── font │ │ │ ├── .DS_Store │ │ │ ├── Flaticon.eot │ │ │ ├── Flaticon.svg │ │ │ ├── Flaticon.ttf │ │ │ ├── Flaticon.woff │ │ │ ├── Flaticon.woff2 │ │ │ ├── _flaticon.scss │ │ │ ├── flaticon.css │ │ │ └── flaticon.html │ │ └── license │ │ │ └── license.pdf │ ├── icomoon │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── ionicons │ │ ├── css │ │ │ ├── _ionicons.scss │ │ │ └── ionicons.min.css │ │ └── fonts │ │ │ ├── .DS_Store │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.svg │ │ │ ├── ionicons.ttf │ │ │ ├── ionicons.woff │ │ │ └── ionicons.woff2 │ └── open-iconic │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff ├── images │ ├── .DS_Store │ ├── about.jpg │ ├── bg_1.jpg │ ├── bg_2.jpg │ ├── bg_3.jpg │ ├── category-1.jpg │ ├── category-2.jpg │ ├── category-3.jpg │ ├── category-4.jpg │ ├── category.jpg │ ├── image_1.jpg │ ├── image_2.jpg │ ├── image_3.jpg │ ├── image_4.jpg │ ├── image_5.jpg │ ├── image_6.jpg │ ├── partner-1.png │ ├── partner-2.png │ ├── partner-3.png │ ├── partner-4.png │ ├── partner-5.png │ ├── person_1.jpg │ ├── person_2.jpg │ ├── person_3.jpg │ ├── person_4.jpg │ ├── product-1.jpg │ ├── product-10.jpg │ ├── product-11.jpg │ ├── product-12.jpg │ ├── product-2.jpg │ ├── product-3.jpg │ ├── product-4.jpg │ ├── product-5.jpg │ ├── product-6.jpg │ ├── product-7.jpg │ ├── product-8.jpg │ └── product-9.jpg ├── js │ ├── .DS_Store │ ├── aos.js │ ├── bootstrap-datepicker.js │ ├── bootstrap.min.js │ ├── google-map.js │ ├── jquery-3.2.1.min.js │ ├── jquery-migrate-3.0.1.min.js │ ├── jquery.animateNumber.min.js │ ├── jquery.easing.1.3.js │ ├── jquery.magnific-popup.min.js │ ├── jquery.min.js │ ├── jquery.stellar.min.js │ ├── jquery.waypoints.min.js │ ├── main.js │ ├── owl.carousel.min.js │ ├── popper.min.js │ ├── range.js │ └── scrollax.min.js └── scss │ ├── .DS_Store │ ├── bootstrap │ ├── .DS_Store │ ├── _alert.scss │ ├── _badge.scss │ ├── _breadcrumb.scss │ ├── _button-group.scss │ ├── _buttons.scss │ ├── _card.scss │ ├── _carousel.scss │ ├── _close.scss │ ├── _code.scss │ ├── _custom-forms.scss │ ├── _dropdown.scss │ ├── _forms.scss │ ├── _functions.scss │ ├── _grid.scss │ ├── _images.scss │ ├── _input-group.scss │ ├── _jumbotron.scss │ ├── _list-group.scss │ ├── _media.scss │ ├── _mixins.scss │ ├── _modal.scss │ ├── _nav.scss │ ├── _navbar.scss │ ├── _pagination.scss │ ├── _popover.scss │ ├── _print.scss │ ├── _progress.scss │ ├── _reboot.scss │ ├── _root.scss │ ├── _spinners.scss │ ├── _tables.scss │ ├── _toasts.scss │ ├── _tooltip.scss │ ├── _transitions.scss │ ├── _type.scss │ ├── _utilities.scss │ ├── _variables.scss │ ├── bootstrap-grid.scss │ ├── bootstrap-reboot.scss │ ├── bootstrap.scss │ ├── mixins │ │ ├── _alert.scss │ │ ├── _background-variant.scss │ │ ├── _badge.scss │ │ ├── _border-radius.scss │ │ ├── _box-shadow.scss │ │ ├── _breakpoints.scss │ │ ├── _buttons.scss │ │ ├── _caret.scss │ │ ├── _clearfix.scss │ │ ├── _float.scss │ │ ├── _forms.scss │ │ ├── _gradients.scss │ │ ├── _grid-framework.scss │ │ ├── _grid.scss │ │ ├── _hover.scss │ │ ├── _image.scss │ │ ├── _list-group.scss │ │ ├── _lists.scss │ │ ├── _nav-divider.scss │ │ ├── _pagination.scss │ │ ├── _reset-text.scss │ │ ├── _resize.scss │ │ ├── _screen-reader.scss │ │ ├── _size.scss │ │ ├── _table-row.scss │ │ ├── _text-emphasis.scss │ │ ├── _text-hide.scss │ │ ├── _text-truncate.scss │ │ ├── _transition.scss │ │ └── _visibility.scss │ └── utilities │ │ ├── _align.scss │ │ ├── _background.scss │ │ ├── _borders.scss │ │ ├── _clearfix.scss │ │ ├── _display.scss │ │ ├── _embed.scss │ │ ├── _flex.scss │ │ ├── _float.scss │ │ ├── _overflow.scss │ │ ├── _position.scss │ │ ├── _screenreaders.scss │ │ ├── _shadows.scss │ │ ├── _sizing.scss │ │ ├── _spacing.scss │ │ ├── _text.scss │ │ └── _visibility.scss │ └── style.scss └── templates ├── about └── about.html ├── account ├── signin.html └── signup.html ├── base ├── base.html ├── footer.html ├── header.html ├── js.html └── navbar.html ├── blog ├── blog.html ├── post-by-category.html ├── post-details.html └── sidebar.html ├── cart ├── cart.html └── checkout.html ├── contact └── contact.html ├── home.html └── shop ├── product-details.html ├── shop.html └── wishlist.html /.flake8: -------------------------------------------------------------------------------- 1 | 2 | [flake8] 3 | # it's not a bug that we aren't using all of hacking, ignore: 4 | # F812: list comprehension redefines ... 5 | # H101: Use TODO(NAME) 6 | # H202: assertRaises Exception too broad 7 | # H233: Python 3.x incompatible use of print operator 8 | # H301: one import per line 9 | # H306: imports not in alphabetical order (time, os) 10 | # H401: docstring should not start with a space 11 | # H403: multi line docstrings should end on a new line 12 | # H404: multi line docstring should start without a leading new line 13 | # H405: multi line docstring summary not separated with an empty line 14 | # H501: Do not use self.__dict__ for string formatting 15 | ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501 16 | exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,migrations,venv,env -------------------------------------------------------------------------------- /.github/workflows/action.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the master branch 8 | push: 9 | branches: [ master ] 10 | pull_request: 11 | branches: [ master ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v2 27 | 28 | # Runs a single command using the runners shell 29 | - name: Run a one-line script 30 | run: echo Hello, world! 31 | 32 | # Runs a set of commands using the runners shell 33 | - name: Run a multi-line script 34 | run: | 35 | echo Add other actions to build, 36 | echo test, and deploy your project. 37 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '22 3 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript', 'python' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v2 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v1 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 52 | 53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 54 | # If this step fails, then you should remove it and run the build manually (see below) 55 | - name: Autobuild 56 | uses: github/codeql-action/autobuild@v1 57 | 58 | # ℹ️ Command-line programs to run using the OS shell. 59 | # 📚 https://git.io/JvXDl 60 | 61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 62 | # and modify them (or add more) to build your code if your project 63 | # uses a compiled language 64 | 65 | #- run: | 66 | # make bootstrap 67 | # make release 68 | 69 | - name: Perform CodeQL Analysis 70 | uses: github/codeql-action/analyze@v1 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Django E-commerce Website. 2 | 3 | ### Cloning the repository 4 | 5 | --> Clone the repository using the command below : 6 | ```bash 7 | git clone https://github.com/sajib1066/django-ecommerce.git 8 | 9 | ``` 10 | 11 | --> Move into the directory where we have the project files : 12 | ```bash 13 | cd django-ecommerce 14 | 15 | ``` 16 | 17 | --> Create a virtual environment : 18 | ```bash 19 | # Create our virtual environment 20 | python -m venv venv 21 | 22 | ``` 23 | 24 | --> Activate the virtual environment :

25 | windows 26 | ```bash 27 | venv\scripts\activate 28 | 29 | ``` 30 | linux 31 | ```bash 32 | source venv/bin/activate 33 | 34 | ``` 35 | 36 | --> Install the requirements : 37 | ```bash 38 | pip install -r requirements.txt 39 | 40 | ``` 41 | 42 | --> Migrate Database 43 | ```bash 44 | python manage.py migrate 45 | 46 | ``` 47 | 48 | --> Create Super User 49 | ```bash 50 | python manage.py createsuperuser 51 | 52 | ``` 53 | 54 | # 55 | 56 | ### Running the App 57 | 58 | --> To run the App, we use : 59 | ```bash 60 | python manage.py runserver 61 | 62 | ``` 63 | 64 | > ⚠ Then, the development server will be started at http://127.0.0.1:8000/ 65 | 66 | # 67 | 68 | ### App Preview : 69 | 70 | 71 | 72 | 80 | 87 |
73 |   74 |
75 |

76 | Landing page 77 |

78 | 79 |
81 |
82 |

83 | More view on landing page 84 |

85 | 86 |
88 | 89 | 90 | ## Documentation 91 | You can check up django documentation page for any further information. 92 | [Django Docs](https://docs.djangoproject.com/en/4.0/) 93 | -------------------------------------------------------------------------------- /about/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/about/__init__.py -------------------------------------------------------------------------------- /about/admin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/about/admin.py -------------------------------------------------------------------------------- /about/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AboutConfig(AppConfig): 5 | name = 'about' 6 | -------------------------------------------------------------------------------- /about/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/about/migrations/__init__.py -------------------------------------------------------------------------------- /about/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/about/models.py -------------------------------------------------------------------------------- /about/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/about/tests.py -------------------------------------------------------------------------------- /about/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import about_page 3 | 4 | 5 | urlpatterns = [ 6 | path('', about_page, name='about') 7 | ] 8 | -------------------------------------------------------------------------------- /about/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | 4 | # Create your views here. 5 | def about_page(request): 6 | return render(request, 'about/about.html') 7 | -------------------------------------------------------------------------------- /account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/account/__init__.py -------------------------------------------------------------------------------- /account/admin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/account/admin.py -------------------------------------------------------------------------------- /account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /account/forms.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import UserCreationForm 2 | from django.contrib.auth.models import User 3 | 4 | # Form details for user while creating 5 | class MyUserCreationForm(UserCreationForm): 6 | class Meta: 7 | model = User 8 | fields = ['username', 'password1', 'password2'] -------------------------------------------------------------------------------- /account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/account/migrations/__init__.py -------------------------------------------------------------------------------- /account/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/account/models.py -------------------------------------------------------------------------------- /account/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/account/tests.py -------------------------------------------------------------------------------- /account/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | 5 | urlpatterns = [ 6 | path('', views.signin, name='signin'), 7 | path('signup/', views.signup, name='signup'), 8 | path('logout/', views.signout, name="signout"), 9 | ] -------------------------------------------------------------------------------- /account/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib.auth import authenticate, login, logout 3 | from django.contrib.auth.forms import UserCreationForm, AuthenticationForm 4 | from .forms import MyUserCreationForm 5 | 6 | def signup(request): 7 | if request.user.is_authenticated: 8 | return redirect('/') 9 | if request.method == 'POST': 10 | form = MyUserCreationForm(request.POST) 11 | if form.is_valid(): 12 | user = form.save(commit=False) 13 | user.save() 14 | username = form.cleaned_data.get('username') 15 | login(request, user) 16 | return redirect('/') 17 | else: 18 | return render(request, 'account/signup.html', {'form': form}) 19 | else: 20 | form = MyUserCreationForm() 21 | return render(request, 'account/signup.html', {'form': form}) 22 | 23 | 24 | def signin(request): 25 | if request.user.is_authenticated: 26 | return render(request, 'homepage.html') 27 | if request.method == 'POST': 28 | username = request.POST['username'] 29 | password = request.POST['password'] 30 | user = authenticate(request, username=username, password=password) 31 | if user is not None: 32 | login(request, user) 33 | return redirect('home') 34 | else: 35 | form = AuthenticationForm(request.POST) 36 | return render(request, 'account/signin.html', {'form': form}) 37 | else: 38 | form = AuthenticationForm() 39 | return render(request, 'account/signin.html', {'form': form}) 40 | 41 | 42 | def signout(request): 43 | logout(request) 44 | return redirect('home') 45 | 46 | -------------------------------------------------------------------------------- /author/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/author/__init__.py -------------------------------------------------------------------------------- /author/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import AuthorProfile 3 | 4 | 5 | class AuthorProfileAdmin(admin.ModelAdmin): 6 | list_display = ['user', 'name', 'email', 'gender', 'date'] 7 | 8 | 9 | admin.site.register(AuthorProfile, AuthorProfileAdmin) 10 | -------------------------------------------------------------------------------- /author/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AuthorConfig(AppConfig): 5 | name = 'author' 6 | -------------------------------------------------------------------------------- /author/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.2 on 2022-07-05 19:48 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 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='AuthorProfile', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(max_length=200)), 22 | ('email', models.EmailField(max_length=254)), 23 | ('about', models.TextField()), 24 | ('photo', models.ImageField(upload_to='author')), 25 | ('gender', models.CharField(choices=[('male', 'Male'), ('female', 'Female')], max_length=6)), 26 | ('website', models.URLField(blank=True, null=True)), 27 | ('facebook', models.URLField(blank=True, null=True)), 28 | ('twitter', models.URLField(blank=True, null=True)), 29 | ('linkedin', models.URLField(blank=True, null=True)), 30 | ('date', models.DateTimeField(auto_now_add=True)), 31 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 32 | ], 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /author/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/author/migrations/__init__.py -------------------------------------------------------------------------------- /author/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | class AuthorProfile(models.Model): 5 | user = models.OneToOneField(User, on_delete=models.CASCADE) 6 | name = models.CharField(max_length=200) 7 | email = models.EmailField() 8 | about = models.TextField() 9 | photo = models.ImageField(upload_to='author') 10 | gender_choice = ( 11 | ('male', 'Male'), 12 | ('female', 'Female') 13 | ) 14 | gender = models.CharField(choices=gender_choice, max_length=6) 15 | website = models.URLField(blank=True, null=True) 16 | facebook = models.URLField(blank=True, null=True) 17 | twitter = models.URLField(blank=True, null=True) 18 | linkedin = models.URLField(blank=True, null=True) 19 | date = models.DateTimeField(auto_now_add=True) 20 | 21 | def __str__(self): 22 | return self.name 23 | -------------------------------------------------------------------------------- /author/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/author/tests.py -------------------------------------------------------------------------------- /author/views.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/author/views.py -------------------------------------------------------------------------------- /blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/blog/__init__.py -------------------------------------------------------------------------------- /blog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Category, Tag, Post 3 | 4 | 5 | class CategoryAdmin(admin.ModelAdmin): 6 | list_display = ['name', 'date'] 7 | 8 | 9 | class TagAdmin(admin.ModelAdmin): 10 | list_display = ['name', 'date'] 11 | 12 | 13 | class PostAdmin(admin.ModelAdmin): 14 | list_display = ['title', 'category', 'author', 'is_draft', 'date'] 15 | 16 | 17 | admin.site.register(Category, CategoryAdmin) 18 | admin.site.register(Tag, TagAdmin) 19 | admin.site.register(Post, PostAdmin) 20 | -------------------------------------------------------------------------------- /blog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogConfig(AppConfig): 5 | name = 'blog' 6 | -------------------------------------------------------------------------------- /blog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.2 on 2022-07-05 19:48 2 | 3 | import ckeditor_uploader.fields 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ('author', '0001_initial'), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Category', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(max_length=50, unique=True)), 22 | ('date', models.DateTimeField(auto_now_add=True)), 23 | ], 24 | ), 25 | migrations.CreateModel( 26 | name='Tag', 27 | fields=[ 28 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 29 | ('name', models.CharField(max_length=20, unique=True)), 30 | ('date', models.DateTimeField(auto_now_add=True)), 31 | ], 32 | ), 33 | migrations.CreateModel( 34 | name='Post', 35 | fields=[ 36 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 37 | ('title', models.CharField(max_length=200)), 38 | ('photo', models.ImageField(upload_to='post')), 39 | ('content', ckeditor_uploader.fields.RichTextUploadingField()), 40 | ('is_draft', models.BooleanField(default=False)), 41 | ('date', models.DateTimeField(auto_now_add=True)), 42 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='author.authorprofile')), 43 | ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.category')), 44 | ('tag', models.ManyToManyField(to='blog.Tag')), 45 | ], 46 | ), 47 | ] 48 | -------------------------------------------------------------------------------- /blog/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/blog/migrations/__init__.py -------------------------------------------------------------------------------- /blog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from ckeditor_uploader.fields import RichTextUploadingField 3 | 4 | from author.models import AuthorProfile 5 | 6 | 7 | class Category(models.Model): 8 | name = models.CharField(max_length=50, unique=True) 9 | date = models.DateTimeField(auto_now_add=True) 10 | 11 | def __str__(self): 12 | return self.name 13 | 14 | 15 | class Tag(models.Model): 16 | name = models.CharField(max_length=20, unique=True) 17 | date = models.DateTimeField(auto_now_add=True) 18 | 19 | def __str__(self): 20 | return self.name 21 | 22 | 23 | class Post(models.Model): 24 | title = models.CharField(max_length=200) 25 | photo = models.ImageField(upload_to='post') 26 | content = RichTextUploadingField() 27 | category = models.ForeignKey(Category, on_delete=models.CASCADE) 28 | tag = models.ManyToManyField(Tag) 29 | author = models.ForeignKey(AuthorProfile, on_delete=models.CASCADE) 30 | is_draft = models.BooleanField(default=False) 31 | date = models.DateTimeField(auto_now_add=True) 32 | 33 | def __str__(self): 34 | return self.title 35 | -------------------------------------------------------------------------------- /blog/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/blog/tests.py -------------------------------------------------------------------------------- /blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.blog_page, name='blog'), 6 | path('details/', views.post_details, name='post-details'), 7 | path( 8 | 'category/', views.post_by_category, name='post-by-category' 9 | ) 10 | ] 11 | -------------------------------------------------------------------------------- /blog/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from django.db.models import Count 3 | 4 | from .models import Category, Tag, Post 5 | 6 | 7 | def blog_page(request): 8 | post = Post.objects.filter(is_draft=False) 9 | category = Category.objects.all().annotate( 10 | number_of_posts=Count('post') 11 | ).order_by('-number_of_posts', 'name') 12 | tag = Tag.objects.all() 13 | recent_post = Post.objects.filter(is_draft=False).order_by('-date')[:3] 14 | context = { 15 | 'posts': post, 16 | 'categories': category, 17 | 'tags': tag, 18 | 'recent_posts': recent_post 19 | } 20 | return render(request, 'blog/blog.html', context) 21 | 22 | 23 | def post_details(request, post_id): 24 | post = Post.objects.get(id=post_id) 25 | category = Category.objects.all().annotate( 26 | number_of_posts=Count('post') 27 | ).order_by('-number_of_posts', 'name') 28 | tag = Tag.objects.all() 29 | recent_post = Post.objects.filter(is_draft=False).order_by('-date')[:3] 30 | context = { 31 | 'post': post, 32 | 'categories': category, 33 | 'tags': tag, 34 | 'recent_posts': recent_post 35 | } 36 | return render(request, 'blog/post-details.html', context) 37 | 38 | 39 | def post_by_category(request, ctg_name): 40 | ctg = Category.objects.get(name=ctg_name) 41 | post = Post.objects.filter(category=ctg) 42 | category = Category.objects.all().annotate( 43 | number_of_posts=Count('post') 44 | ).order_by('-number_of_posts', 'name') 45 | tag = Tag.objects.all() 46 | recent_post = Post.objects.filter(is_draft=False).order_by('-date')[:3] 47 | context = { 48 | 'posts': post, 49 | 'categories': category, 50 | 'tags': tag, 51 | 'recent_posts': recent_post 52 | } 53 | return render(request, 'blog/post-by-category.html', context) 54 | -------------------------------------------------------------------------------- /cart/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/cart/__init__.py -------------------------------------------------------------------------------- /cart/admin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/cart/admin.py -------------------------------------------------------------------------------- /cart/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CartConfig(AppConfig): 5 | name = 'cart' 6 | -------------------------------------------------------------------------------- /cart/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/cart/migrations/__init__.py -------------------------------------------------------------------------------- /cart/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/cart/models.py -------------------------------------------------------------------------------- /cart/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/cart/tests.py -------------------------------------------------------------------------------- /cart/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.cart_page, name='cart'), 6 | path('checkout', views.checkout, name='checkout') 7 | ] 8 | -------------------------------------------------------------------------------- /cart/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | 4 | # Create your views here. 5 | def cart_page(request): 6 | return render(request, 'cart/cart.html') 7 | 8 | 9 | def checkout(request): 10 | return render(request, 'cart/checkout.html') 11 | -------------------------------------------------------------------------------- /contact/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/contact/__init__.py -------------------------------------------------------------------------------- /contact/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Contact, Subscriber 3 | 4 | 5 | class ContactAdmin(admin.ModelAdmin): 6 | list_display = ['name', 'email', 'subject', 'date'] 7 | 8 | 9 | admin.site.register(Contact, ContactAdmin) 10 | admin.site.register(Subscriber) 11 | -------------------------------------------------------------------------------- /contact/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ContactConfig(AppConfig): 5 | name = 'contact' 6 | -------------------------------------------------------------------------------- /contact/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Contact, Subscriber 3 | 4 | 5 | class ContactForm(forms.ModelForm): 6 | class Meta: 7 | model = Contact 8 | fields = '__all__' 9 | widgets = { 10 | 'name': forms.TextInput(attrs={ 11 | 'class': 'form-control', 12 | 'placeholder': 'Your Name' 13 | }), 14 | 'email': forms.EmailInput(attrs={ 15 | 'class': 'form-control', 16 | 'placeholder': 'Your Email' 17 | }), 18 | 'subject': forms.TextInput(attrs={ 19 | 'class': 'form-control', 20 | 'placeholder': 'Subject' 21 | }), 22 | 'message': forms.Textarea(attrs={ 23 | 'class': 'form-control', 24 | 'placeholder': 'Message' 25 | }) 26 | } 27 | 28 | 29 | class SubscriberForm(forms.ModelForm): 30 | class Meta: 31 | model = Subscriber 32 | fields = '__all__' 33 | widgets = { 34 | 'email': forms.EmailInput(attrs={ 35 | 'class': 'form-control', 36 | 'placeholder': 'Enter email address' 37 | }) 38 | } 39 | -------------------------------------------------------------------------------- /contact/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.2 on 2022-07-05 19:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Contact', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=200)), 19 | ('email', models.EmailField(max_length=200)), 20 | ('subject', models.CharField(max_length=200)), 21 | ('message', models.TextField()), 22 | ('date', models.DateTimeField(auto_now_add=True)), 23 | ], 24 | ), 25 | migrations.CreateModel( 26 | name='Subscriber', 27 | fields=[ 28 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 29 | ('email', models.EmailField(max_length=255, unique=True)), 30 | ('date', models.DateTimeField(auto_now_add=True)), 31 | ], 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /contact/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/contact/migrations/__init__.py -------------------------------------------------------------------------------- /contact/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | # Create your models here. 5 | class Contact(models.Model): 6 | name = models.CharField(max_length=200) 7 | email = models.EmailField(max_length=200) 8 | subject = models.CharField(max_length=200) 9 | message = models.TextField() 10 | date = models.DateTimeField(auto_now_add=True) 11 | 12 | def __str__(self): 13 | return self.name 14 | 15 | 16 | class Subscriber(models.Model): 17 | email = models.EmailField(max_length=255, unique=True) 18 | date = models.DateTimeField(auto_now_add=True) 19 | 20 | def __str__(self): 21 | return str(self.email) 22 | -------------------------------------------------------------------------------- /contact/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/contact/tests.py -------------------------------------------------------------------------------- /contact/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import contact_page 3 | 4 | urlpatterns = [ 5 | path('', contact_page, name='contact') 6 | ] 7 | -------------------------------------------------------------------------------- /contact/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib import messages 3 | 4 | from .forms import ContactForm 5 | 6 | 7 | # Create your views here. 8 | def contact_page(request): 9 | form = ContactForm() 10 | if request.method == 'POST': 11 | form = ContactForm(request.POST) 12 | if form.is_valid(): 13 | form.save() 14 | messages.add_message(request, messages.INFO, 'Submitted.') 15 | return redirect('contact') 16 | context = { 17 | 'form': form 18 | } 19 | return render(request, 'contact/contact.html', context) 20 | -------------------------------------------------------------------------------- /django_ecommerce/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/django_ecommerce/__init__.py -------------------------------------------------------------------------------- /django_ecommerce/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for django_ecommerce project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.7. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '&0er(t#&rcq714(8huxq15l=wobe#muvrq%wnzu=qpb==$d^r)' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 41 | 'ckeditor', 42 | 'ckeditor_uploader', 43 | 44 | 'blog', 45 | 'contact', 46 | 'about', 47 | 'shop', 48 | 'cart', 49 | 'author', 50 | 51 | 'account', 52 | 53 | # 'signup' 54 | ] 55 | 56 | MIDDLEWARE = [ 57 | 'django.middleware.security.SecurityMiddleware', 58 | 'django.contrib.sessions.middleware.SessionMiddleware', 59 | 'django.middleware.common.CommonMiddleware', 60 | 'django.middleware.csrf.CsrfViewMiddleware', 61 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 62 | 'django.contrib.messages.middleware.MessageMiddleware', 63 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 64 | ] 65 | 66 | ROOT_URLCONF = 'django_ecommerce.urls' 67 | 68 | TEMPLATES = [ 69 | { 70 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 71 | 'DIRS': ['templates'], 72 | 'APP_DIRS': True, 73 | 'OPTIONS': { 74 | 'context_processors': [ 75 | 'django.template.context_processors.debug', 76 | 'django.template.context_processors.request', 77 | 'django.contrib.auth.context_processors.auth', 78 | 'django.contrib.messages.context_processors.messages', 79 | ], 80 | }, 81 | }, 82 | ] 83 | 84 | WSGI_APPLICATION = 'django_ecommerce.wsgi.application' 85 | 86 | 87 | # Database 88 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 89 | 90 | DATABASES = { 91 | 'default': { 92 | 'ENGINE': 'django.db.backends.sqlite3', 93 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 94 | } 95 | } 96 | 97 | 98 | # Password validation 99 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 100 | 101 | AUTH_PASSWORD_VALIDATORS = [ 102 | { 103 | 'NAME': 'django.contrib.auth.password_validation.' 104 | 'UserAttributeSimilarityValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.' 108 | 'MinimumLengthValidator', 109 | }, 110 | { 111 | 'NAME': 'django.contrib.auth.password_validation.' 112 | 'CommonPasswordValidator', 113 | }, 114 | { 115 | 'NAME': 'django.contrib.auth.password_validation.' 116 | 'NumericPasswordValidator', 117 | }, 118 | ] 119 | 120 | 121 | # Internationalization 122 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 123 | 124 | LANGUAGE_CODE = 'en-us' 125 | 126 | TIME_ZONE = 'UTC' 127 | 128 | USE_I18N = True 129 | 130 | USE_L10N = True 131 | 132 | USE_TZ = True 133 | 134 | 135 | # Static files (CSS, JavaScript, Images) 136 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 137 | 138 | STATIC_URL = '/static/' 139 | STATICFILES_DIRS = [ 140 | os.path.join(BASE_DIR, 'static') 141 | ] 142 | 143 | MEDIA_URL = '/media/' 144 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 145 | 146 | 147 | CKEDITOR_JQUERY_URL = 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js' # noqa 148 | 149 | CKEDITOR_UPLOAD_PATH = "uploads/" 150 | CKEDITOR_CONFIGS = { 151 | 'default': { 152 | 'toolbar': None, 153 | }, 154 | } 155 | -------------------------------------------------------------------------------- /django_ecommerce/urls.py: -------------------------------------------------------------------------------- 1 | """django_ecommerce URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | from . import views 19 | from . import settings 20 | from django.contrib.staticfiles.urls import static, staticfiles_urlpatterns 21 | 22 | 23 | urlpatterns = [ 24 | path('admin/', admin.site.urls), 25 | path('', views.home_page, name='home'), 26 | path('blog/', include('blog.urls')), 27 | path('contact/', include('contact.urls')), 28 | path('about/', include('about.urls')), 29 | path('shop/', include('shop.urls')), 30 | path('cart/', include('cart.urls')), 31 | path('ckeditor/', include('ckeditor_uploader.urls')), 32 | path('account/', include('account.urls')), 33 | ] 34 | 35 | urlpatterns += staticfiles_urlpatterns() 36 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 37 | -------------------------------------------------------------------------------- /django_ecommerce/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from shop.models import Product 3 | from contact.forms import SubscriberForm 4 | 5 | 6 | def home_page(request): 7 | products = Product.objects.all()[:8] 8 | forms = SubscriberForm() 9 | if request.method == 'POST': 10 | forms = SubscriberForm(request.POST) 11 | if forms.is_valid(): 12 | forms.save() 13 | context = { 14 | 'products': products, 15 | 'forms': forms 16 | } 17 | return render(request, 'home.html', context) 18 | -------------------------------------------------------------------------------- /django_ecommerce/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for django_ecommerce 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/2.2/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', 'django_ecommerce.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /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 | os.environ.setdefault( 9 | 'DJANGO_SETTINGS_MODULE', 'django_ecommerce.settings' 10 | ) 11 | try: 12 | from django.core.management import execute_from_command_line 13 | except ImportError as exc: 14 | raise ImportError( 15 | "Couldn't import Django. Are you sure it's installed and " 16 | "available on your PYTHONPATH environment variable? Did you " 17 | "forget to activate a virtual environment?" 18 | ) from exc 19 | execute_from_command_line(sys.argv) 20 | 21 | 22 | if __name__ == '__main__': 23 | main() 24 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.0 2 | Django==3.1.14 3 | django-ckeditor==5.8.0 4 | django-js-asset==1.2.2 5 | Pillow==10.0.1 6 | pytz==2019.3 7 | sqlparse==0.4.4 8 | -------------------------------------------------------------------------------- /shop/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/shop/__init__.py -------------------------------------------------------------------------------- /shop/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Category, Product 3 | 4 | 5 | class ProductAdmin(admin.ModelAdmin): 6 | list_display = ['name', 'price', 'category', 'date'] 7 | 8 | 9 | admin.site.register(Product, ProductAdmin) 10 | admin.site.register(Category) 11 | -------------------------------------------------------------------------------- /shop/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ShopConfig(AppConfig): 5 | name = 'shop' 6 | -------------------------------------------------------------------------------- /shop/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.2 on 2022-07-05 19:48 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ('author', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Category', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('name', models.CharField(max_length=30)), 21 | ('photo', models.ImageField(upload_to='products_category')), 22 | ('date', models.DateTimeField(auto_now_add=True)), 23 | ], 24 | ), 25 | migrations.CreateModel( 26 | name='Product', 27 | fields=[ 28 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 29 | ('name', models.CharField(max_length=100)), 30 | ('photo', models.ImageField(upload_to='products')), 31 | ('price', models.IntegerField()), 32 | ('details', models.TextField()), 33 | ('is_draft', models.BooleanField(default=False)), 34 | ('date', models.DateTimeField(auto_now_add=True)), 35 | ('inventory', models.IntegerField(default=1)), 36 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='author.authorprofile')), 37 | ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.category')), 38 | ], 39 | ), 40 | ] 41 | -------------------------------------------------------------------------------- /shop/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/shop/migrations/__init__.py -------------------------------------------------------------------------------- /shop/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from author.models import AuthorProfile 3 | 4 | 5 | class Category(models.Model): 6 | name = models.CharField(max_length=30) 7 | photo = models.ImageField(upload_to='products_category') 8 | date = models.DateTimeField(auto_now_add=True) 9 | 10 | def __str__(self): 11 | return self.name 12 | 13 | 14 | class Product(models.Model): 15 | name = models.CharField(max_length=100) 16 | photo = models.ImageField(upload_to='products') 17 | price = models.IntegerField() 18 | details = models.TextField() 19 | category = models.ForeignKey(Category, on_delete=models.CASCADE) 20 | author = models.ForeignKey(AuthorProfile, on_delete=models.CASCADE) 21 | is_draft = models.BooleanField(default=False) 22 | date = models.DateTimeField(auto_now_add=True) 23 | inventory = models.IntegerField(default=1) 24 | 25 | def __str__(self): 26 | return self.name 27 | -------------------------------------------------------------------------------- /shop/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/shop/tests.py -------------------------------------------------------------------------------- /shop/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | 5 | urlpatterns = [ 6 | path('', views.shop_page, name='shop'), 7 | path( 8 | 'product/', views.product_details, name='product-details' 9 | ), 10 | path('wishlist/', views.wishlist, name='wishlist'), 11 | ] 12 | -------------------------------------------------------------------------------- /shop/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .models import Category, Product 3 | 4 | 5 | def shop_page(request): 6 | category = Category.objects.all() 7 | products = Product.objects.filter(is_draft=False) 8 | context = { 9 | 'category': category, 10 | 'products': products 11 | } 12 | return render(request, 'shop/shop.html', context) 13 | 14 | 15 | def product_details(request, product_id): 16 | product_details = Product.objects.get(id=product_id) 17 | ctg = Category.objects.get(name=product_details.category) 18 | related_products = Product.objects.filter(category=ctg) 19 | context = { 20 | 'product': product_details, 21 | 'related_products': related_products 22 | } 23 | return render(request, 'shop/product-details.html', context) 24 | 25 | 26 | def wishlist(request): 27 | return render(request, 'shop/wishlist.html') 28 | -------------------------------------------------------------------------------- /static/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/.DS_Store -------------------------------------------------------------------------------- /static/css/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/ajax-loader.gif -------------------------------------------------------------------------------- /static/css/bootstrap/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/bootstrap/.DS_Store -------------------------------------------------------------------------------- /static/css/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/css/.DS_Store -------------------------------------------------------------------------------- /static/css/css/mixins/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/css/mixins/.DS_Store -------------------------------------------------------------------------------- /static/css/css/mixins/_text-hide.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/css/css/mixins/_text-hide.css -------------------------------------------------------------------------------- /static/css/flaticon.css: -------------------------------------------------------------------------------- 1 | /* 2 | Flaticon icon font: Flaticon 3 | Creation date: 12/08/2018 13:24 4 | */ 5 | 6 | 7 | @font-face { 8 | font-family: "Flaticon"; 9 | src: url("../fonts/flaticon/font/Flaticon.eot"); 10 | src: url("../fonts/flaticon/font/Flaticon.eot?#iefix") format("embedded-opentype"), 11 | url("../fonts/flaticon/font/Flaticon.woff") format("woff"), 12 | url("../fonts/flaticon/font/Flaticon.ttf") format("truetype"), 13 | url("../fonts/flaticon/font/Flaticon.svg#Flaticon") format("svg"); 14 | font-weight: normal; 15 | font-style: normal; 16 | } 17 | 18 | @media screen and (-webkit-min-device-pixel-ratio:0) { 19 | @font-face { 20 | font-family: "Flaticon"; 21 | src: url("../fonts/flaticon/font/Flaticon.svg#Flaticon") format("svg"); 22 | } 23 | } 24 | 25 | [class^="flaticon-"]:before, [class*=" flaticon-"]:before, 26 | [class^="flaticon-"]:after, [class*=" flaticon-"]:after { 27 | font-family: Flaticon; 28 | font-style: normal; 29 | font-weight: normal; 30 | font-variant: normal; 31 | text-transform: none; 32 | line-height: 1; 33 | 34 | /* Better Font Rendering =========== */ 35 | -webkit-font-smoothing: antialiased; 36 | -moz-osx-font-smoothing: grayscale; 37 | } 38 | 39 | .flaticon-shipped:before { content: "\f100"; } 40 | .flaticon-box:before { content: "\f101"; } 41 | .flaticon-award:before { content: "\f102"; } 42 | .flaticon-customer-service:before { content: "\f103"; } 43 | .flaticon-salad:before { content: "\f104"; } 44 | .flaticon-diet:before { content: "\f105"; } -------------------------------------------------------------------------------- /static/css/jquery.timepicker.css: -------------------------------------------------------------------------------- 1 | .ui-timepicker-wrapper { 2 | overflow-y: auto; 3 | max-height: 150px; 4 | width: 6.5em; 5 | background: #fff; 6 | border: 1px solid #ddd; 7 | -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2); 8 | -moz-box-shadow:0 5px 10px rgba(0,0,0,0.2); 9 | box-shadow:0 5px 10px rgba(0,0,0,0.2); 10 | outline: none; 11 | z-index: 10001; 12 | margin: 0; 13 | } 14 | 15 | .ui-timepicker-wrapper.ui-timepicker-with-duration { 16 | width: 13em; 17 | } 18 | 19 | .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30, 20 | .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 { 21 | width: 11em; 22 | } 23 | 24 | .ui-timepicker-list { 25 | margin: 0; 26 | padding: 0; 27 | list-style: none; 28 | } 29 | 30 | .ui-timepicker-duration { 31 | margin-left: 5px; color: #888; 32 | } 33 | 34 | .ui-timepicker-list:hover .ui-timepicker-duration { 35 | color: #888; 36 | } 37 | 38 | .ui-timepicker-list li { 39 | padding: 3px 0 3px 5px; 40 | cursor: pointer; 41 | white-space: nowrap; 42 | color: #000; 43 | list-style: none; 44 | margin: 0; 45 | } 46 | 47 | .ui-timepicker-list:hover .ui-timepicker-selected { 48 | background: #fff; color: #000; 49 | } 50 | 51 | li.ui-timepicker-selected, 52 | .ui-timepicker-list li:hover, 53 | .ui-timepicker-list .ui-timepicker-selected:hover { 54 | background: #1980EC; color: #fff; 55 | } 56 | 57 | li.ui-timepicker-selected .ui-timepicker-duration, 58 | .ui-timepicker-list li:hover .ui-timepicker-duration { 59 | color: #ccc; 60 | } 61 | 62 | .ui-timepicker-list li.ui-timepicker-disabled, 63 | .ui-timepicker-list li.ui-timepicker-disabled:hover, 64 | .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled { 65 | color: #888; 66 | cursor: default; 67 | } 68 | 69 | .ui-timepicker-list li.ui-timepicker-disabled:hover, 70 | .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled { 71 | background: #f2f2f2; 72 | } 73 | -------------------------------------------------------------------------------- /static/css/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.0 3 | * Copyright 2013-2017 David Deutsch 4 | * Licensed under () 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:-webkit-transform .1s ease;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /static/css/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.2.1 3 | * Copyright 2013-2017 David Deutsch 4 | * Licensed under () 5 | */ 6 | .owl-theme .owl-dots, 7 | .owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent} 8 | .owl-theme .owl-nav{margin-top:10px} 9 | .owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px;position: absolute;} 10 | .owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none} 11 | .owl-theme .owl-nav .disabled{opacity:.5;cursor:default} 12 | .owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px} 13 | .owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1} 14 | .owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px} 15 | .owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /static/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/.DS_Store -------------------------------------------------------------------------------- /static/fonts/flaticon/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/.DS_Store -------------------------------------------------------------------------------- /static/fonts/flaticon/backup.txt: -------------------------------------------------------------------------------- 1 | eyIxIjp7IklEIjoxLCJuYW1lIjoiTXkgaWNvbnMgY29sbGVjdGlvbiIsImJvb2ttYXJrX2lkIjoiNjVwcG04eDViMTIwMDAwMCIsImNyZWF0ZWQiOm51bGwsInVwZGF0ZWQiOjE1NjMzNjcxMTMsImFjdGl2ZSI6MSwic291cmNlIjoibG9jYWwiLCJvcmRlciI6MCwiY29sb3IiOiIwMDAwMDAiLCJzdGF0dXMiOjF9LCI2NXBwbTh4NWIxMjAwMDAwIjpbeyJpZCI6Njc5NzIwLCJ0ZWFtIjowLCJuYW1lIjoiYm94IiwiY29sb3IiOiIjMDAwMDAwIiwicHJlbWl1bSI6MCwic29ydCI6Mn0seyJpZCI6ODA5NDk4LCJ0ZWFtIjowLCJuYW1lIjoiYXdhcmQiLCJjb2xvciI6IiMwMDAwMDAiLCJwcmVtaXVtIjowLCJzb3J0IjozfSx7ImlkIjo5NTAyOTksInRlYW0iOjAsIm5hbWUiOiJjdXN0b21lci1zZXJ2aWNlIiwiY29sb3IiOiIjMDAwMDAwIiwicHJlbWl1bSI6MCwic29ydCI6NH0seyJpZCI6MTM1NDg0LCJ0ZWFtIjowLCJuYW1lIjoic2FsYWQiLCJjb2xvciI6IiMwMDAwMDAiLCJwcmVtaXVtIjowLCJzb3J0Ijo1fSx7ImlkIjo3MDYxMzMsInRlYW0iOjAsIm5hbWUiOiJkaWV0IiwiY29sb3IiOiIjMDAwMDAwIiwicHJlbWl1bSI6MCwic29ydCI6Nn0seyJpZCI6NDExNzYzLCJ0ZWFtIjowLCJuYW1lIjoic2hpcHBlZCIsImNvbG9yIjoiIzAwMDAwMCIsInByZW1pdW0iOjAsInNvcnQiOjF9XX0= -------------------------------------------------------------------------------- /static/fonts/flaticon/font/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/font/.DS_Store -------------------------------------------------------------------------------- /static/fonts/flaticon/font/Flaticon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/font/Flaticon.eot -------------------------------------------------------------------------------- /static/fonts/flaticon/font/Flaticon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/font/Flaticon.ttf -------------------------------------------------------------------------------- /static/fonts/flaticon/font/Flaticon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/font/Flaticon.woff -------------------------------------------------------------------------------- /static/fonts/flaticon/font/Flaticon.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/font/Flaticon.woff2 -------------------------------------------------------------------------------- /static/fonts/flaticon/font/_flaticon.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Flaticon icon font: Flaticon 3 | Creation date: 17/07/2019 12:38 4 | */ 5 | 6 | @font-face { 7 | font-family: "Flaticon"; 8 | src: url("./Flaticon.eot"); 9 | src: url("./Flaticon.eot?#iefix") format("embedded-opentype"), 10 | url("./Flaticon.woff2") format("woff2"), 11 | url("./Flaticon.woff") format("woff"), 12 | url("./Flaticon.ttf") format("truetype"), 13 | url("./Flaticon.svg#Flaticon") format("svg"); 14 | font-weight: normal; 15 | font-style: normal; 16 | } 17 | 18 | @media screen and (-webkit-min-device-pixel-ratio:0) { 19 | @font-face { 20 | font-family: "Flaticon"; 21 | src: url("./Flaticon.svg#Flaticon") format("svg"); 22 | } 23 | } 24 | 25 | .fi:before{ 26 | display: inline-block; 27 | font-family: "Flaticon"; 28 | font-style: normal; 29 | font-weight: normal; 30 | font-variant: normal; 31 | line-height: 1; 32 | text-decoration: inherit; 33 | text-rendering: optimizeLegibility; 34 | text-transform: none; 35 | -moz-osx-font-smoothing: grayscale; 36 | -webkit-font-smoothing: antialiased; 37 | font-smoothing: antialiased; 38 | } 39 | 40 | .flaticon-shipped:before { content: "\f100"; } 41 | .flaticon-box:before { content: "\f101"; } 42 | .flaticon-award:before { content: "\f102"; } 43 | .flaticon-customer-service:before { content: "\f103"; } 44 | .flaticon-salad:before { content: "\f104"; } 45 | .flaticon-diet:before { content: "\f105"; } 46 | 47 | $font-Flaticon-shipped: "\f100"; 48 | $font-Flaticon-box: "\f101"; 49 | $font-Flaticon-award: "\f102"; 50 | $font-Flaticon-customer-service: "\f103"; 51 | $font-Flaticon-salad: "\f104"; 52 | $font-Flaticon-diet: "\f105"; -------------------------------------------------------------------------------- /static/fonts/flaticon/font/flaticon.css: -------------------------------------------------------------------------------- 1 | /* 2 | Flaticon icon font: Flaticon 3 | Creation date: 17/07/2019 12:38 4 | */ 5 | 6 | @font-face { 7 | font-family: "Flaticon"; 8 | src: url("./Flaticon.eot"); 9 | src: url("./Flaticon.eot?#iefix") format("embedded-opentype"), 10 | url("./Flaticon.woff2") format("woff2"), 11 | url("./Flaticon.woff") format("woff"), 12 | url("./Flaticon.ttf") format("truetype"), 13 | url("./Flaticon.svg#Flaticon") format("svg"); 14 | font-weight: normal; 15 | font-style: normal; 16 | } 17 | 18 | @media screen and (-webkit-min-device-pixel-ratio:0) { 19 | @font-face { 20 | font-family: "Flaticon"; 21 | src: url("./Flaticon.svg#Flaticon") format("svg"); 22 | } 23 | } 24 | 25 | [class^="flaticon-"]:before, [class*=" flaticon-"]:before, 26 | [class^="flaticon-"]:after, [class*=" flaticon-"]:after { 27 | font-family: Flaticon; 28 | font-size: 20px; 29 | font-style: normal; 30 | margin-left: 20px; 31 | } 32 | 33 | .flaticon-shipped:before { content: "\f100"; } 34 | .flaticon-box:before { content: "\f101"; } 35 | .flaticon-award:before { content: "\f102"; } 36 | .flaticon-customer-service:before { content: "\f103"; } 37 | .flaticon-salad:before { content: "\f104"; } 38 | .flaticon-diet:before { content: "\f105"; } -------------------------------------------------------------------------------- /static/fonts/flaticon/license/license.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/flaticon/license/license.pdf -------------------------------------------------------------------------------- /static/fonts/icomoon/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/icomoon/icomoon.eot -------------------------------------------------------------------------------- /static/fonts/icomoon/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/icomoon/icomoon.ttf -------------------------------------------------------------------------------- /static/fonts/icomoon/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/icomoon/icomoon.woff -------------------------------------------------------------------------------- /static/fonts/ionicons/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/ionicons/fonts/.DS_Store -------------------------------------------------------------------------------- /static/fonts/ionicons/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/ionicons/fonts/ionicons.eot -------------------------------------------------------------------------------- /static/fonts/ionicons/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/ionicons/fonts/ionicons.ttf -------------------------------------------------------------------------------- /static/fonts/ionicons/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/ionicons/fonts/ionicons.woff -------------------------------------------------------------------------------- /static/fonts/ionicons/fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/ionicons/fonts/ionicons.woff2 -------------------------------------------------------------------------------- /static/fonts/open-iconic/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/open-iconic/open-iconic.eot -------------------------------------------------------------------------------- /static/fonts/open-iconic/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/open-iconic/open-iconic.otf -------------------------------------------------------------------------------- /static/fonts/open-iconic/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/open-iconic/open-iconic.ttf -------------------------------------------------------------------------------- /static/fonts/open-iconic/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/fonts/open-iconic/open-iconic.woff -------------------------------------------------------------------------------- /static/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/.DS_Store -------------------------------------------------------------------------------- /static/images/about.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/about.jpg -------------------------------------------------------------------------------- /static/images/bg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/bg_1.jpg -------------------------------------------------------------------------------- /static/images/bg_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/bg_2.jpg -------------------------------------------------------------------------------- /static/images/bg_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/bg_3.jpg -------------------------------------------------------------------------------- /static/images/category-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/category-1.jpg -------------------------------------------------------------------------------- /static/images/category-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/category-2.jpg -------------------------------------------------------------------------------- /static/images/category-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/category-3.jpg -------------------------------------------------------------------------------- /static/images/category-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/category-4.jpg -------------------------------------------------------------------------------- /static/images/category.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/category.jpg -------------------------------------------------------------------------------- /static/images/image_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_1.jpg -------------------------------------------------------------------------------- /static/images/image_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_2.jpg -------------------------------------------------------------------------------- /static/images/image_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_3.jpg -------------------------------------------------------------------------------- /static/images/image_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_4.jpg -------------------------------------------------------------------------------- /static/images/image_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_5.jpg -------------------------------------------------------------------------------- /static/images/image_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/image_6.jpg -------------------------------------------------------------------------------- /static/images/partner-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/partner-1.png -------------------------------------------------------------------------------- /static/images/partner-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/partner-2.png -------------------------------------------------------------------------------- /static/images/partner-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/partner-3.png -------------------------------------------------------------------------------- /static/images/partner-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/partner-4.png -------------------------------------------------------------------------------- /static/images/partner-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/partner-5.png -------------------------------------------------------------------------------- /static/images/person_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/person_1.jpg -------------------------------------------------------------------------------- /static/images/person_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/person_2.jpg -------------------------------------------------------------------------------- /static/images/person_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/person_3.jpg -------------------------------------------------------------------------------- /static/images/person_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/person_4.jpg -------------------------------------------------------------------------------- /static/images/product-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-1.jpg -------------------------------------------------------------------------------- /static/images/product-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-10.jpg -------------------------------------------------------------------------------- /static/images/product-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-11.jpg -------------------------------------------------------------------------------- /static/images/product-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-12.jpg -------------------------------------------------------------------------------- /static/images/product-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-2.jpg -------------------------------------------------------------------------------- /static/images/product-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-3.jpg -------------------------------------------------------------------------------- /static/images/product-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-4.jpg -------------------------------------------------------------------------------- /static/images/product-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-5.jpg -------------------------------------------------------------------------------- /static/images/product-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-6.jpg -------------------------------------------------------------------------------- /static/images/product-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-7.jpg -------------------------------------------------------------------------------- /static/images/product-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-8.jpg -------------------------------------------------------------------------------- /static/images/product-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/images/product-9.jpg -------------------------------------------------------------------------------- /static/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/js/.DS_Store -------------------------------------------------------------------------------- /static/js/google-map.js: -------------------------------------------------------------------------------- 1 | 2 | var google; 3 | 4 | function init() { 5 | // Basic options for a simple Google Map 6 | // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions 7 | // var myLatlng = new google.maps.LatLng(40.71751, -73.990922); 8 | var myLatlng = new google.maps.LatLng(40.69847032728747, -73.9514422416687); 9 | // 39.399872 10 | // -8.224454 11 | 12 | var mapOptions = { 13 | // How zoomed in you want the map to start at (always required) 14 | zoom: 7, 15 | 16 | // The latitude and longitude to center the map (always required) 17 | center: myLatlng, 18 | 19 | // How you would like to style the map. 20 | scrollwheel: false, 21 | styles: [ 22 | { 23 | "featureType": "administrative.country", 24 | "elementType": "geometry", 25 | "stylers": [ 26 | { 27 | "visibility": "simplified" 28 | }, 29 | { 30 | "hue": "#ff0000" 31 | } 32 | ] 33 | } 34 | ] 35 | }; 36 | 37 | 38 | 39 | // Get the HTML DOM element that will contain your map 40 | // We are using a div with id="map" seen below in the 41 | var mapElement = document.getElementById('map'); 42 | 43 | // Create the Google Map using out element and options defined above 44 | var map = new google.maps.Map(mapElement, mapOptions); 45 | 46 | var addresses = ['New York']; 47 | 48 | for (var x = 0; x < addresses.length; x++) { 49 | $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[x]+'&sensor=false', null, function (data) { 50 | var p = data.results[0].geometry.location 51 | var latlng = new google.maps.LatLng(p.lat, p.lng); 52 | new google.maps.Marker({ 53 | position: latlng, 54 | map: map, 55 | icon: 'images/loc.png' 56 | }); 57 | 58 | }); 59 | } 60 | 61 | } 62 | google.maps.event.addDomListener(window, 'load', init); -------------------------------------------------------------------------------- /static/js/jquery.animateNumber.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery animateNumber plugin v0.0.14 3 | (c) 2013, Alexandr Borisov. 4 | https://github.com/aishek/jquery-animateNumber 5 | */ 6 | (function(d){var r=function(b){return b.split("").reverse().join("")},m={numberStep:function(b,a){var e=Math.floor(b);d(a.elem).text(e)}},g=function(b){var a=b.elem;a.nodeType&&a.parentNode&&(a=a._animateNumberSetter,a||(a=m.numberStep),a(b.now,b))};d.Tween&&d.Tween.propHooks?d.Tween.propHooks.number={set:g}:d.fx.step.number=g;d.animateNumber={numberStepFactories:{append:function(b){return function(a,e){var f=Math.floor(a);d(e.elem).prop("number",a).text(f+b)}},separator:function(b,a,e){b=b||" "; 7 | a=a||3;e=e||"";return function(f,k){var u=0>f,c=Math.floor((u?-1:1)*f).toString(),n=d(k.elem);if(c.length>a){for(var h=c,l=a,m=h.split("").reverse(),c=[],p,s,q,t=0,g=Math.ceil(h.length/l);t slide2) { 16 | [slide1, slide2] = [slide2, slide1]; 17 | // var tmp = slide2; 18 | // slide2 = slide1; 19 | // slide1 = tmp; 20 | } 21 | 22 | numberS[0].value = slide1; 23 | numberS[1].value = slide2; 24 | } 25 | }); 26 | 27 | numberS.forEach(function(el) { 28 | el.oninput = function() { 29 | var number1 = parseFloat(numberS[0].value), 30 | number2 = parseFloat(numberS[1].value); 31 | 32 | if (number1 > number2) { 33 | var tmp = number1; 34 | numberS[0].value = number2; 35 | numberS[1].value = tmp; 36 | } 37 | 38 | rangeS[0].value = number1; 39 | rangeS[1].value = number2; 40 | 41 | } 42 | }); 43 | 44 | })(); -------------------------------------------------------------------------------- /static/scss/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/scss/.DS_Store -------------------------------------------------------------------------------- /static/scss/bootstrap/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-ecommerce/416814205485c7937ca66d367bead8601c3fc9c2/static/scss/bootstrap/.DS_Store -------------------------------------------------------------------------------- /static/scss/bootstrap/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: $close-font-size + $alert-padding-x * 2; 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /static/scss/bootstrap/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | 17 | @at-root a#{&} { 18 | @include hover-focus { 19 | text-decoration: none; 20 | } 21 | } 22 | 23 | // Empty badges collapse automatically 24 | &:empty { 25 | display: none; 26 | } 27 | } 28 | 29 | // Quick fix for badges in buttons 30 | .btn .badge { 31 | position: relative; 32 | top: -1px; 33 | } 34 | 35 | // Pill badges 36 | // 37 | // Make them extra rounded with a modifier to replace v3's badges. 38 | 39 | .badge-pill { 40 | padding-right: $badge-pill-padding-x; 41 | padding-left: $badge-pill-padding-x; 42 | @include border-radius($badge-pill-border-radius); 43 | } 44 | 45 | // Colors 46 | // 47 | // Contextual variations (linked badges get darker on :hover). 48 | 49 | @each $color, $value in $theme-colors { 50 | .badge-#{$color} { 51 | @include badge-variant($value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /static/scss/bootstrap/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($breadcrumb-border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item { 14 | padding-left: $breadcrumb-item-padding; 15 | 16 | &::before { 17 | display: inline-block; // Suppress underlining of the separator in modern browsers 18 | padding-right: $breadcrumb-item-padding; 19 | color: $breadcrumb-divider-color; 20 | content: $breadcrumb-divider; 21 | } 22 | } 23 | 24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 25 | // without `