[go: up one dir, main page]

0% found this document useful (0 votes)
9 views27 pages

Fahad

The document discusses various topics related to Django including its features, top applications, prerequisites, steps to create a Django project, database connections, CRUD operations, and SQL queries. It also discusses XAMPP and its components, and provides examples of creating databases and tables in MySQL.

Uploaded by

shreyabavaliya19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views27 pages

Fahad

The document discusses various topics related to Django including its features, top applications, prerequisites, steps to create a Django project, database connections, CRUD operations, and SQL queries. It also discusses XAMPP and its components, and provides examples of creating databases and tables in MySQL.

Uploaded by

shreyabavaliya19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

SUMMER INTERNSHIP

REPORT

(27/07/2023 -30/08/2023)

SUBMITED BY:
TO:
Mukhtiyaar Pathan ENR NO:219960307016 [SEM:5]
ALKESH KABA
SR. SOFTWARE DEVLOPER
OF CREART SOLUTION
KHYATI SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINIEERING
Topics :
• Introduction of django

• Features of django

• Top 10 django application

• Pre-requirements of django

• What is virtual environment

• Django steps

• How to create django project?

• How to run django project?

• Database connection

• Migrate command

• Create superuser

• What is XAMPP?

• Primary key

• Foreign key

• types Relationships

• MYSQL queries
• Crud operation

 Introduction of django framework

Django is a Python-based web framework that allows you to quickly create


web applications without all of the installation or dependency problems that you
normally will find with other frameworks. When you’re building a website, you
always need a similar set of components: a way to handle user authentication
(signing up, signing in, signing out), a management panel for your website, forms,
a way to upload files, etc.

 Features of Django

1) Versatile in Nature
2) Rapid Development
3) High Security
4) High Scalability
5) Better Performance

 Top 10 django application


 P re-requirements of Django

i. Core python
ii. HTML, CSS
iii. My SQL

 Some Django Steps

 Step-1: Create virtual Environment.

Command: python -m venv my_ve

o Virtual environment : The virtual environment is an environment which is


used by Django to execute an application. It is recommended to create
and execute a Django application in a separate environment. Python
provides a tool virtualenv to create an isolated Python environment.

o Why do we need a virtual environment?


Imagine a scenario where you are working on two web-based python projects
one of them uses Django 4.0 and the other uses Django 4.1 (check for the latest
Django versions and so on). In such situations virtual environment can be really useful
to maintain the dependencies of both projects.
 Step-2: Django installation

Command: - python -m venv my_ve

 Step-3: Project Creation

Command:- django-admin startproject myproject

 Step-4: Run project


Command:-python manage.py runserver
Run server on broweser

 Step-5: install mysqlclient

Command: pip install mysqlclient

 Step-6: Database connection


Note:-This step will perform in [django\my_ve\myproject\myproject\setting.py]

 Step-7: migrate command

Command: python manage.py migrate

-: After apply migrate command ten table show your database:-


 Step:-8:Create superuser for django admin panel
Command : python manage.py createsuperuser
After the login page will be shown below:

Before django all 8 steps, go the xampp control panel and start Apache
& MySQL And create database, tables.

 XAMPP CONTROL PANEL

o What is XAMPP?

XAMPP is an abbreviation where X stands for Cross-Platform, A stands for


Apache, M stands for MYSQL, and the Ps stand for PHP and Perl, respectively.
It is an open-source package of web solutions that includes Apache distribution
for many servers and command-line executables along with modules such as
Apache server, MariaDB, PHP, and Perl.

o XAMPP helps a local host or server to test its website and clients via computers
and laptops before releasing it to the main server. It is a platform that furnishes a
suitable environment to test and verify the working of projects based on Apache,
Perl, MySQL database, and PHP through the system of the host itself. Among
these technologies, Perl is a programming language used for web development,
PHP is a backend scripting language, and MariaDB is the most vividly used
database developed by MySQL.
o The detailed description of these components is given below .

 Components of XAMPP

o As defined earlier, XAMPP is used to symbolize the classification of solutions


for different technologies. It provides a base for testing of projects based on different
technologies through a personal server. XAMPP is an abbreviated form of each
alphabet representing each of its major components. This collection of software
contains a web server named Apache, a database management system named
MariaDB and scripting/ programming languages such as PHP and Perl. X denotes
Cross-platform, which means that it can work on different platforms such as
Windows, Linux, and macOS. o Many other components are also part of this
collection of software and are explained below.

• Cross-platform: Different local systems have different configurations of


operating systems installed in it. The component of cross-platform has been
included to increase the utility and audience for this package of Apache
distributions. It supports various platforms such as packages of Windows, Linus,
and MAC OS.

• Apache: It is an HTTP a cross -platform web server. It is used worldwide for


delivering web content. The server application has made free for installation and
used for the community of developers under the aegis of Apache Software
Foundation. The remote server of Apache delivers the requested files, images,
and other documents to the user.
• MariaDB: Originally, MySQL DBMS was a part of XAMPP, but now it has been
replaced by MariaDB. It is one of the most widely used relational DBMS,
developed by MySQL. It offers online services of data storage, manipulation,
retrieval, arrangement, and deletion
• PHP: It is the backend scripting language primarily used for web development.
PHP allows users to create dynamic websites and applications. It can be installed
on every platform and supports a variety of database management systems. It
was implemented using C language. PHP stands for Hypertext Processor. It is
said to be derived from Personal Home Page tools, which explains its simplicity
and functionality
• Perl: It is a combination of two high-level dynamic languages, namely Perl 5 and
Perl 6. Perl can be applied for finding solutions for problems based on system
administration, web development, and networking. Perl allows its users to
program dynamic web applications. It is very flexible and robust.
• phpMyAdmin: It is a tool used for dealing with MariaDB. Its version 4.0.4 is
currently being used in XAMPP. Administration of DBMS is its main role.
• OpenSSL: It is the open-source implementation of the Secure Socket Layer
Protocol and Transport Layer Protocol. Presently version 0.9.8 is a part of
XAMPP.
• XAMPP Control Panel: It is a panel that helps to operate and regulate upon
other components of the XAMPP. Version 3.2.1 is the most recent update. A
detailed description of the control panel will be done in the next section of the
tutorial.
• Webalizer: It is a Web Analytics software solution used for User logs and provide
details about the usage.
• Mercury: It is a mail transport system, and its latest version is 4.62. It is a mail
server, which helps to manage the mails across the web.
• Tomcat: Version 7.0.42 is currently being used in XAMPP. It is a servlet based
on JAVA to provide JAVA functionalities.
• Filezilla: It is a File Transfer Protocol Server, which supports and eases the
transfer operations performed on files. Its recently updated version is 0.9.41.
[phpmyadmin]

o Create database in phpmyadmin

o Create table in php_db database

 MY SQL
MySQL is a relational database management system, the database structure
is Organized into physical files optimized for speed. The logical data model, with
objects such as data tables, views, rows, and columns, offers a flexible programming
environment.

 Primary key

The primary key constraint uniquely identifies each record in a table. Primary
keys must contain unique values and cannot null values. A table can have only one
primary key and, in the table, this primary key can consist of single or multiple
columns(fields)
Id is primary key and auto increment.

 Foreign Key

A foreign key is a column or group of columns in a relational database table that


provides a link between data in two tables.
There are three types of foreign key:

 One-to-One
Primary Key as Foreign Key, one way to implement a one-to-one
relationship in a database is to use the same primary key in both tables. Rows with
the same value in the primary key are related.
[ my-ve/myproject/myapp/models.py]

Output

 One-to-many
A foreign key relationship could be one-to-one (a record in one table is linked
to one and only one record in another table) or one-to-many (a record in one table
is linked to multiple records in another table)
Output

 Many-to-many

In a database management system, a Many-to-Many relationship is a


relationship between several instances of one entity and multiple
instances of another entity, i.e., both entities can have multiple
relationships with each other.
 SQL queries

o Create a Table
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
....
);
o Insert into table

INSERT INTO TABLE2(column1, column2, column3, …..)


SELECT column1, column2,column3, …
FROM tabel1

o Update table

UPDATE table_name
SET column1= value1, column2=value2, …
WHERE condition;

o Delete table

DELETE FROM table_name WHERE condition;

o Select table

SELECT * FROM table_name;

Or

SELECT column1, column2, ...


FROM table_name;

 CRUD operation
o First off to create table in your database,is shown
below:

o After create table in database then go to your create django-app(model) Then


perform crud operation.

 Create operation.

o Create or add new entries in a table in the database. o Create the create.html
file In templates folder
o after the create html page, create function in views.py
o

o After the create function,the create url in urls.py


o Create URL in myproject(urls.py)

o Then runserver in CMD

 Data will be stored in database


r

 Read operation

o read, retrieve, search, or view existing entries as a list(List View) or retrieve a


particular entry in detail (Detail View)

o Create the read.html in templates folder

o Create the function for read operation (view.py)

o Create the URL for read operation(urls.py)


o Redirect the page

 Delete operation

o delete, deactivate, or remove existing entries in a table in the database.


o Add the delete column in read.html
o Create the function for delete operation(views.py)

o Create the URL for delete operation(urls.py)

o Before the delete data


o After the delete data

o Id 23 is deleted.

 UPDATE operation

o update or edit existing entries in a table in the database o create the edit.html
file in template folder
o Create the function for UPDATE operation(views.py)
o Before the update table

o Update the table


o After the update table

Conclusion

Overall, internship is a really good program and recommended to my fellow friends.


It helps to enhance and develop my skills, abilities, and knowledge. It was a good
experience and memories as not only I have gained experience, but also new friends and
knowledge.
Creart solution also a good place to do the internship since it provide numerous benefits
and advantages to the practical trainees.
They provide us with our own places and several accommodations such as laptop, Wi-
Fi, access card, car for site visit's use The treatment by the company was just, equitable
and professional. I've learned from different units and people.
I am grateful and thankful to my mentor, Alkesh kaba and the handle some of my
weaknesses and provided guidance to me whenever I am in need.
I think the 45 days duration for the internship was not enough for me to learn more in
details I wish the internship program will be make as a core subject and I am encouraging
for the students of computer Sciences to grab the opportunity to do internship as it will
help us to identify your strength, abilities, weaknesses and more.

You might also like