0% found this document useful (0 votes)
144 views45 pages

Internship Report

The document describes a 12 day internship on web development using the Python Django framework. Over the course of 12 days, the intern learned about JSON, installed and set up PyCharm, created a Django project, created users and applications, created and displayed database tables, fetched data from APIs, and developed a responsive news website with different pages.

Uploaded by

PARTH KOTHARI
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)
144 views45 pages

Internship Report

The document describes a 12 day internship on web development using the Python Django framework. Over the course of 12 days, the intern learned about JSON, installed and set up PyCharm, created a Django project, created users and applications, created and displayed database tables, fetched data from APIs, and developed a responsive news website with different pages.

Uploaded by

PARTH KOTHARI
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/ 45

Apollo institute of Engineering & Technology Drashti Borad

An Internship report

on

Web Development using Python (Django Framework)

submitted by

Borad Drashti Jaysukhbhai


(191210116006)

Student of

Bachelors of Engineering
In
Information Technology Department
Apollo institute of Engineering & Technology Drashti Borad

CERTIFICATE OF COMPLETION
Apollo institute of Engineering & Technology Drashti Borad

COMPANY PROFILE

Established in 2016, incorporation with our parent IT company, INFOLABZ IT


SERVICES PVT. LTD. has managed to make it's own position in IT Sector. We
are involved in Web Development, App Development, Progressive Web
Application Development, IOT solutions, Graphics & Designing, Digital
Marketing, Domain & Hosting services, SMS services etc.

In the span of six years we have managed to deliver all projects on time with
utmost accuracy to our clients across the globe. We have dedicated teams of
experienced and hard working developers. Our developers who are always
willing to take new challenges and looking forward to learn new things, are heart
of this company.

Our objective is to sustain with exponential growth in IT industry. Our mission is


to deliver the best with top notch quality every quarter and vision is to develop a
product with one of its kind concept which could be used by millions of people.
Apollo institute of Engineering & Technology Drashti Borad

Index

Sr.no Table of content Page no

1. Basic knowledge about the subject (Day1) 1


2. JSON Theory (Day 2) 1
3. JSON Figure (Day 3) 2
4. Install & setup Pycharm (Day 4) 4
5 Create Django projects steps (Day 5) 4
6 Create users (Day 6) 9
7. User authority & Create Application ( Day 7 ) 13
8. Create Tables (Day 8) 15
9. Display tables Items in server & DB sqlite (Day 9) 17
10. Fatch the data from bitcoin API (Day 10) 21
11. Fatch the data from coviddata API (Day 11) 23
12. Develop one master news website with different pages (Day 12) 26
13. Create responsive news website (Day 13) 40
Apollo institute of Engineering & Technology Drashti Borad

Day 1

➢ Basic knowledge about the internship & python & Django


framework.

Day 2

➢ JSON Theory:
▪ What is JSON?

• A JSON object contains data in the form of key/value


pair. The keys are strings and the values are the JSON

types. Keys and values are separated by colon. Each


entry (key/value pair) is separated by comma.

▪ JSON example:
▪ An object is an unordered set of name/value pairs. An object begins
with {left brace and ends with} right brace. Each name is followed by :
colon and the name/value is separated by , comma

// JSON syntax
{
"name": "John",
"age": 22,
"gender": "male",

Page no: 1
Apollo institute of Engineering & Technology Drashti Borad

Day 3

• JSON Figure:
An object is an unordered set of name/value pairs. An object begins with {left brace
and ends with} right brace. Each name is followed by : colon and the name/value is
separated by , comma.

An array is ordered collection of values. An array begins with [left bracket and ends
with] right bracket. Value is separated by , comma.

Page no: 2
Apollo institute of Engineering & Technology Drashti Borad

A value can be a string in double quotes , or a number, or true or false or null or


object or an array. These structure can be nested.

Page no: 3
Apollo institute of Engineering & Technology Drashti Borad

Day 4

➢ Install & setup pycharm.


➢ How to work & how to use pycharm.

Day 5

• Create Django project :

Step 1: Create python File in Pycharm.

Page no: 4
Apollo institute of Engineering & Technology Drashti Borad

Step 2: Add Web Framework

➢ pip install Django

Step 3: Check django framework is properly install or


not.
➢ Django-admin

Page no: 5
Apollo institute of Engineering & Technology Drashti Borad

Step 4: Create django project.


➢ django-admin startproject gtu .

➢ Created gtu project

Page no: 6
Apollo institute of Engineering & Technology Drashti Borad

Step 5: run Django project

➢ python manage.py runserver

➢ Installation work successfully

Page no: 7
Apollo institute of Engineering & Technology Drashti Borad

Step 6: db new table /new add:

➢ Python manage.py migrate

Step 7: update/modify/not new integration

➢ Python manage.py makemigrations

Page no: 8
Apollo institute of Engineering & Technology Drashti Borad

Day 6

Step 8: Create superuser.


➢ Python manage.py createsuperuser

➢ Create superuser(infolabz)

➢ User login page:

Page no: 9
Apollo institute of Engineering & Technology Drashti Borad

➢ Successfully created superuser(infolabz)

➢ Create superuser(context)

➢ User login page

Page no: 10
Apollo institute of Engineering & Technology Drashti Borad

➢ successfully created superuser(context)

➢ Create superuser(altra)

Page no: 11
Apollo institute of Engineering & Technology Drashti Borad

➢ User login page

➢ Successfully created superuser(altra)

Page no: 12
Apollo institute of Engineering & Technology Drashti Borad

Day 7

➢ Two admins must not be able to add or delete other admins.

➢ Admin1(altra )& Admin2(context) can not be add or delete


other admins.

Page no: 13
Apollo institute of Engineering & Technology Drashti Borad

Create application:
➢ Django-admin startapp internship

➢ Application path is added in Django project(gtu) in


settings.py file.

Page no: 14
Apollo institute of Engineering & Technology Drashti Borad

Day 8

➢ Create Tables:
➢ Create table categories
➢ Create table productsentry

➢ Create table in Models.py file.

➢ Import table path in admin.py.

Page no: 15
Apollo institute of Engineering & Technology Drashti Borad

➢ Tables are successfully created.

➢ Add all items successfully

Page no: 16
Apollo institute of Engineering & Technology Drashti Borad

Day 9

➢ For All tables items are display in screen to add display


& list in models.py file.

➢ All tables are display

➢ Category table.

Page no: 17
Apollo institute of Engineering & Technology Drashti Borad

➢ Productsentry table .

➢ Show table in DB browser(SQL lite)


➢ Open pycharm dbsqlite file in DB browser

Page no: 18
Apollo institute of Engineering & Technology Drashti Borad

➢ In DB browser show categories table

➢ In DB browser show productsentry table

Page no: 19
Apollo institute of Engineering & Technology Drashti Borad

➢ In DB browser also see the user details table.

➢ Load html file in application(internship)

➢ Load index.html file

Page no: 20
Apollo institute of Engineering & Technology Drashti Borad

Day 10

• Fatch the data from API(Application


programming interface)

➢ First, import one package :pip install request

➢ To fatch the data from API(coindata)


➢ API: https://api.coindesk.com/v1/bpi/currentprice.json
➢ Print bitcoin price from this API

➢ Below code of fatch the data from API


➢ Code create in main.py file

Page no: 21
Apollo institute of Engineering & Technology Drashti Borad

➢ Get the bitcoin price


➢ Output:

Page no: 22
Apollo institute of Engineering & Technology Drashti Borad

Day 11

➢ To fatch the data from API(coviddata)


➢ API: https://data.covid19india.org/data.json
➢ Print covidcases data from this API

➢ Below code of fatch the data from API


➢ Code create in main.py file

Page no: 23
Apollo institute of Engineering & Technology Drashti Borad

➢ Get the Covidcases details


➢ Print 565 days Covidcases data
➢ Output:

Page no:24
Apollo institute of Engineering & Technology Drashti Borad

➢ To fatch the data from API(mfapi)


➢ API: https://api.mfapi.in/mf
➢ Print schemecode from this API

➢ Below code of fatch the data from API


➢ Code create in main.py file

Page no:25
Apollo institute of Engineering & Technology Drashti Borad

Day 12

• Develop one master news website with


different pages of news categories .

➢ Load different webpages with different API


➢ Create different webpages in html files.
➢ Import Url pattern in application Url file.
➢ Give different API class in view file.

➢ Create different webpages for various news.


➢ API: https://inshortsapi.vercel.app/news?category=national
➢ Using this API we make different news pages
➢ Using this API we make different responsive news
websites.

Page no: 26
Apollo institute of Engineering & Technology Drashti Borad

➢ Create home page index.html.

➢ Give url pattern for home page

➢ from django.urls import path


from . import views

urlpatterns=[
path('',views.index,name="indexfile")]

➢ Give API class for home page in view file.

Page no: 27
Apollo institute of Engineering & Technology Drashti Borad

➢ Create national news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('national',views.national,
name="nationalfile")]

➢ Give API class for national page in view file

Page no: 28
Apollo institute of Engineering & Technology Drashti Borad

➢ Create business news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('bussiness',views.bussines
s,name="bussinessfile")]

➢ Give API class for business news page in view file

Page no: 29
Apollo institute of Engineering & Technology Drashti Borad

➢ Create sports news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('sports',views.sports,name
="sportsfile")]

➢ Give API class for sports news page in view file

Page no: 30
Apollo institute of Engineering & Technology Drashti Borad

➢ Create world news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('world',views.world,name="
worldfile")]

➢ Give API class for world news page in view file

Page no: 31
Apollo institute of Engineering & Technology Drashti Borad

➢ Create politics news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('politics',views.politics,
name="politicsfile")]

➢ Give API class for world news page in view file

Page no: 32
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Technology news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('technology',views.technol
ogy,name="technologyfile")]

➢ Give API class for technology news page in view file

Page no: 33
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Startup news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('startup',views.startup,
name="startupfile")]

➢ Give API class for startup news page in view file

Page no: 34
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Entertainment news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('entertainment',
views.entertainment,name="entertainmentfile"
)]

➢ Give API class for entertainment news page in view file

Page no: 35
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Miscellaneous news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('miscellaneous',
views.miscellaneous,name="
miscellaneousfile")]

➢ Give API class for miscellaneous news page in view file

Page no: 36
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Unconventional news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('unconventional',
views.unconventional name="
miscellaneousfile")]

➢ Give API class for unconventional news page in view


file

Page no: 37
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Science news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('science',views.science,
name="sciencefile")]

➢ Give API class for science news page in view file

Page no: 38
Apollo institute of Engineering & Technology Drashti Borad

➢ Create Automobile news page

➢ Give url pattern for news page

➢ from django.urls import path


from . import views

urlpatterns=[path('automobile',
views.automobile,name="automobilefile")]

➢ Give API class for Automobile news page in view file

Page no: 39
Apollo institute of Engineering & Technology Drashti Borad

Day 12

➢ Finally We make good & responsive news website using


API.
➢ Make responsive webpages using html,css & python.
➢ We make back-end responsive news website.

➢ In navbar click any of interested news to instant fetch the


data.

Page no: 40
Apollo institute of Engineering & Technology Drashti Borad

You might also like