Skip to content

Riyam224/my-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PROJECT TITLE : Store for trendy outfits

Video Demo:

VIDEO DEMO

Description:

Full stack project with payment integration and also the ability of the user to do shopping as Registered user and also as a Guest user

Setup Instructions

install python3.9 version to make sure everythinh works

Download Python 3.9.5

Setup and activate your Virtual Environment for Django for windows

pip install virtualenv

Start virtualenv In your windows command prompt, head to your project location:

cd my_project

Once inside the project folder run:

virtualenv env

Activate virtualenv On Windows, virtualenv (venv) creates a batch file called

virtualenv env

To activate virtualenv on Windows

env\Scripts\activate

Install Required Python Modules

pip install -r requirements.txt

Installing the project

open terminal and type

TODO GITHUB URL

or simply download using the url below

THE GITGUB URL

To migrate the database open terminal in project directory and type

python manage.py makemigrations
python manage.py migrate

Static files collection

open terminal and type

python manage.py collectstatic

Creating Superuser

To create superuser open terminal and type

python manage.py createsuperuser

To run the program in local server use the following command

Then go to http://127.0.0.1:8000in your browser

Project snapshot

Home Page (Store page )

store

product details product details

Cart Page

cart

Checkout Page for Registered user

checkout

Checkout Page for Guest user

checkout

Login Page

login

Profile Page

profile

Edit Profile Page

edit profile

code details

project coding files

coding files

online django admin page details with all the models that registered in the apps admin pages

django admin page

some of ecommerce project important files

ecommerce settings.py

A Django settings file contains all the configuration of your Django installation.

settings.py

settings.py

project main urls.py

this is the main urls file for all the apps in the project so it contains the urls for store app , and accounts app urls.

  • path('accounts/', include('django.contrib.auth.urls'))

this url for DJANGO site authentication urls (the login , logout , password management)

  • path('accounts/', include('accounts.urls')),

for other authentication pages

  • path('' , include('store.urls')),

for the STORE app

urls

Store App files

models.py

A model is the single, definitive source of information about my data. It contains the essential fields and behaviors of the data iam storing. Generally, each model maps to a single database table.

and in this app , need tables for (Customer, Product , Order, OrderItem , ShippingAddress)

Customer table with its columns

model1 store

Product table with its columns

model2 store

Order table with its columns

model3store

OrderItem table with its columns

model4store

ShippingAddress table with its columns

model5store

admin.py

to register store models and show it on the admin panal page of django

admin store

views.py

A view function, or view for short, is a Python function that takes a Web request and returns a Web response. This response can be the HTML contents of a Web page, or a redirect, or a 404 error, or an XML document, or an image . . . or anything, really. The view itself contains whatever arbitrary logic is necessary to return that response

so views === logic of the app and here need views for :

  • store ( home page)
  • product_detail
  • cart
  • checkout
  • updateItem
  • process_order

and here the code pages for all the views above

  • store view

store view in store app

  • product details view

product details store

  • cart view

cart store

  • checkout view

checkout store

  • orderItem view

orderitem view

  • process_order view

process order view

urls.py

this file contains pages needed urls in store app like :

  • store
  • product_details
  • cart
  • checkout
  • update_item
  • process_order

urls store

vtils.py

file for dont repeat the code in the views

utils store

Static folder

contains the css , js , fonts and images files that needed in the whole project .

statics

Templates folder

A Django template is a text document or a Python string marked-up using the Django template language. Some constructs are recognized and interpreted by the template engine. The main ones are variables and tags.

A template is rendered with a context. Rendering replaces variables with their values, which are looked up in the context, and executes tags. Everything else is output as is.

The syntax of the Django template language involves four constructs.

so in my project .. there are templates for store app , accounts app and also main.html page template that all pages inherited from .

templates and main page

Accounts App

this app for user authentication pages so it contains the details of login , logout , signup , and password management .... and also for profile (social login)

models.py

contains classes that i need to add in database to manage accounts pages and profile page

197237888_509051993853110_6515079656697607303_n (3)

admin.py

accounts admin

forms.py

forms for signup , user and profile

forms

views.py

signup view and also prodile , edit_profile view

  • signup view

196789760_856593631882643_8719692968304207799_n

  • profile and edit_profile views

198281673_515959056273611_7605581834866677196_n

urls.py

for signup page , also prodile , edit_profile

urls accounts

paypal integratation

to integrate paypal into the website to allow the user to checkout either with the default paypal checkout option or with the debit credit card that also provided with paypal .

to add paypal buttons to the checkout page go to this link

paypal buttons link

here working with client side integration so using sandbox accounts to send and recieve the payments

sandbox accounts

paypal1

paypal explain2

sandbox accounts

paypal in checkout page

checkout paypal

complete payments

Packages

django-filter

pip install django-filter

django-crispy-forms

pip install django-crispy-forms

Author

Riyam Hazim Email: cs50riyam211@gmail.com

                                        ========Thank You !!!=========

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published