SlideShare verwendet Cookies, um die Funktionalität und Leistungsfähigkeit der Webseite zu verbessern und Ihnen relevante Werbung bereitzustellen. Wenn Sie diese Webseite weiter besuchen, erklären Sie sich mit der Verwendung von Cookies auf dieser Seite einverstanden. Lesen Sie bitte unsere Nutzervereinbarung und die Datenschutzrichtlinie.
SlideShare verwendet Cookies, um die Funktionalität und Leistungsfähigkeit der Webseite zu verbessern und Ihnen relevante Werbung bereitzustellen. Wenn Sie diese Webseite weiter besuchen, erklären Sie sich mit der Verwendung von Cookies auf dieser Seite einverstanden. Lesen Sie bitte unsere unsere Datenschutzrichtlinie und die Nutzervereinbarung.
DATABASE MANAGEMENT SYSTEM
ONLINE SHOPPING STORE
Submitted To: Sir Umer Shahid
Department of Electrical Engineering
University of Engineering & Technology Lahore
This report introduces the process of creating part of a course management system which is a data-
driven website used by the instructors and students. This website has four major components:
grade, marking, group, and submission. The major part of the group component and minor part of
marking component are implemented by me and the implementation details will be introduced in
the report. The implementation uses a tool called Django Framework which is an excellent open
source web application frame work for complex data-driven website development. The major part
of this report will introduce how to use Django to create a database table, web page user interface
and inner logic to handle user request by going through the group component implementation
This project report will introduce how to build part of a course management system using the
Django framework. Django is an open source web application frame work which is written in
Python. This course management system built using Django has four major components each of
which has different functionality but similar architecture. In the project report I will demonstrate
details of using Django to build one major component of this system: the group component, which
is my major contribution to the whole system. Also the technique and process which is showed
here can be applied to build the other three components in the course management system as well
as other complex database-driven websites.
ONLINE SHOPPING STORE:
Developed a shopping website built with Django html. This projects aims to develop an online
shopping for customers with the goal so that it is very easy to shop your loved things from an
extensive number of online shopping sites available on the web. With the help of this you can
carry out an online shopping from your home. Here is no compelling reason to go to the crowed
stores or shopping centers during festival seasons. You simply require a PC or a laptop and one
important payment sending option to shop online. To get to this online shopping system all the
customers will need to have an email and password to login and proceed your shopping.
We have divided the work in group as created models and populated data and wrote views with
I have not mentioned Admin as Entity in ER Diagram because I will be using it as Django
I will be using Cart by creating virtual session. I will not make a model for it.
Order List Relation contains the ID’s of customer, Staff, Product, Orders.
Staff will be seeing the order list placed by all the customers.
Django is an open source web application frame work written in Python. The primary goal of
Django is to make the development of complex, data-based websites easier. Thus Django
emphasizes the reusability and plug ability of components to ensure rapid developments. Django
consists of three major parts:
Model is a single, definitive data source which contains the essential field and behavior of the data.
Usually one model is one table in the database. Each attribute in the model represents a field of a
table in the database. Django provides a set of automatically-generated database application
programming interfaces (APIs) for the convenience of users.
View is short form of view file. It is a file containing Python function which takes web requests
and returns web responses. A response can be HTML content or XML documents or a “404 error”
and so on. The logic inside the view function can be arbitrary as long as it returns the desired
response. To link the view function with a particular URL we need to use a structure called
URLconf which maps URLs to view functions.
Django’s template is a simple text file which can generate a text-based format like HTML
and XML. The template contains variables and tags. Variables will be replaced by the result
when the template is evaluated. Tags control the logic of the template. We also can modify
the variables by using filters. For example, a lowercase filter can convert the variable from
uppercase into lowercase. Python is the language used to build the Django framework.
PythonAnywhere is an online integrated development environment and web hosting service based
on the Python programming language. Established by Giles Thomas and Robert Smithson in 2012,
it gives in-program admittance to worker based Python and Bash order line interfaces, alongside
a code editorial manager with linguistic structure featuring. Program documents can be moved to
and from the administration utilizing the client's program. Web applications facilitated by the
administration can be composed utilizing any WSGI-based application structure.
PythonAnywhere was made by Resolver Systems, who likewise delivered Resolver One, a
Python-based Spreadsheet program. On 16 October 2012 the item was obtained by another
organization, PythonAnywhere LLP, who will create and keep up the item later on, and have taken
on the current improvement group.
This online shopping store website is basically approached by three types of users which are
Admin, Customer and Staff.
Create the database tables:
To get started, we need to create a backend of the system which is the database. All the tables in
the database for this website include information for customers, products, catalogue, and orders.
Create the database views:
First, it is used to pass parameters to the template and call the right template for the user. Every
time we input a URL in the address bar or click a hyperlink in the system, Django will call the
right view function based on that URL. Then the function will return a template as well as the
corresponding parameters. Thus we can see the actual web page displaying the information we
need. Second, if we submit something such as create group, the function will have an http request
as its input parameter. Based on that parameter the database is updated or the user is provided the
required information. The view function for creating a group is given below:
Create the database Templates:
Being a web framework, Django needs a convenient way to generate HTML dynamically. The
most common approach relies on templates. A template contains the static parts of the desired
HTML output as well as some special syntax describing how dynamic content will be inserted.
For a hands-on example of creating HTML pages with templates.
A visitor can create an account with the Sign-Up page.
Customer uses Login page to open account and accesses the website content.
Products are displayed in home page with option of catalogue. It is similar for all users.
After logging in customer/user can access the cart having the selected products to buy.
This page will be having all the orders placed by one user id, it will show if the order is still
pending or completed with quantity of product and all other information about it.
Staff member with assigned id can access this page only. It will show all the orders placed
by all the customers.
The admin page is restricted only for administrators where they can add new products,
Github Link: https://github.com/MeharunisaAshraf/Django_Eshop
Website link: http://mehrunisaashraf.pythonanywhere.com/
Demo Video: https://drive.google.com/file/d/1ENPFdK_R2C-
The Django framework gives us a simple and reliable way to create online website. It provides
powerful functionalities and concise syntax to help programmers deal with the database, the web
page and the inner logic. Within the Django framework, we have successfully accomplished the
requirements of the system. Once this system passes the testing phase, it can be used to serve
customers. It will make the work for staff/admin to manage the data much easier. In short, this
system will bring great user experience to both customers and staff members. The only limitation
for this system is that although the developers have been testing it with various use cases, it may
still encounter problems during real time use. However, even if that happens, the flexibility of
Django would provide a simple way to fix the problem, as well as add new features into the system.