Django Internship Report
Django Internship Report
INTERNSHIP REPORT
ON
BACHELOR OF ENGINEERING
IN
Submitted by:
1
lOMoAR cPSD| 32763705
DECLARATION
I Khyati Tripathi hereby declare that the work presented in the internship report has been
carried out by me after the completion of 2 weeks internship at Shreenath developers. I also
confirm that the report is only prepared for my academic requirement, not for any other
Khyati Tripathi
210130111520
lOMoAR cPSD| 32763705
ACKNOWLEDGEMENT
The internship opportunity I had with Shreenath developers was a great chance for learning
and professional development. Therefore. I consider myself as a very lucky individual as I
was provided with an opportunity to be a part of it. I am also grateful for having a chance to
meet so many wonderful people and professionals who led me though this internship period.
Bearing in mind previous I am using this opportunity to express my deepest gratitude and
special thanks to the Mentor of Shreenath developers who in spite of being extraordinarily
busy with his duties, took time out to hear, guide and keep me on the correct path and allowing
me to carry out my project at their esteemed organization and extending during the training.
I will strive to use gained skills and knowledge in the best possible way, and I will continue
to work on their improvement, in order to attain desired career objectives. Hope to continue
cooperation with all of you in the future.
3
lOMoAR cPSD| 32763705
ABSTRACT
The report presents the project completed during internship at Shreenath developers .Which is
“Real time API integration in web pages using Django framework”.
This project has been completed successfully and result was according to expectations.
And all the Circuits are tested and working to our expectations.
lOMoAR cPSD| 32763705
COMPANY PROFILE
Established in 2016, incorporation with our parent IT company, INFOLABZ IT SERVICES PVT. LTD.
has managed to make its 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 hardworking 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 concepts which
could be used by millions of people.
5
lOMoAR cPSD| 32763705
JOINING LETTER
lOMoAR cPSD| 32763705
COMPLETION CERTIFICATE
7
lOMoAR cPSD| 32763705
TABLE OF CONTENT
1. Declaration..........................................................................................................................2
2. Acknowledgement..............................................................................................................3
3. Abstract...............................................................................................................................4
4. Company Profile..................................................................................................................5
5. Joining Letter ......................................................................................................................6
6. Completion Certificate .7
7. Table of Content..................................................................................................................8
8. Week 1……………………………………………………………………………………
8.1 Getting Started with Python …………………………………………………………….9
8.2 Create a first project in Django ………………………………………………… …….12
8.3 Create a new app in Django Project …………………………………………………..16
8.4 Django Migrations …………………………………………………………………….17
9. Week 2 ………………………………………………………………………………….20
9.1 Create One Web Page Index.Html in App and Set as Default Page ......................20
9.2 Make Creative Cards ……………………………………………………………23
9.3 Creating A News Blog Application Using Live API …………………………25
WEEK 1:
GETTING STARTED WITH PYTHON
o Download Python on the machine:
From the python.org download the python language.
o Installation Process:
1. Double-click the icon labelling the file python-3.9.6-amd64.exe.
A Python 3.9.6 (64-bit) Setup pop-up window will appear.
2. Highlight the Install Now (or Upgrade Now) message, and then click it.
When run, a User Account Control pop-up window may appear on your screen. I
could not capture its image, but it asks, do you want to allow this app to make
changes to your device.
3. Click the Yes button.
A new Python 3.9.6 (64-bit) Setup pop-up window will appear with a Setup Progress
message and a progress bar.
During installation, it will show the various components it is installing and move
the progress bar towards completion. Soon, a new Python 3.9.6 (64-bit) Setup
pop-up window will appear with a Setup was successfully message.
9
lOMoAR cPSD| 32763705
o Verifying:
Double-click the icon/file python.exe.
The following pop-up window will appear.
o Installation Process:
1. Now, begin the installation procedure similar to any other software package.
11
lOMoAR cPSD| 32763705
2. Once the installation is successful, PyCharm asks you to import settings of the
existing package if any.
o Install Django:
(venv) C:\Users\HetPatel\PycharmProjects\DjangoWork>python -m pip install django
(22 kB)
(42 kB)
Collecting typing-extensions
3.2.3
o Install mysqlclient(optional):
13
lOMoAR cPSD| 32763705
kB)
o Once created, you should be able to see below folder structure with default files inside it.
lOMoAR cPSD| 32763705
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth,
15
lOMoAR cPSD| 32763705
[email protected] Password:
Password (again):
Superuser created successfully.
o Start the development server:
Python manage.py runserver
o Now, open a Web browser and go to “/admin/” on your local domain – e.g.,
http://127.0.0.1:8000/admin/. You should see the admin’s login screen:
lOMoAR cPSD| 32763705
• DJANGO MIGRATIONS:
Migration is a way of applying changes that we have made to a model, into the database schema.
Django creates a migration file inside the migration folder for each model to create the table
schema, and each table is mapped to the model of which migration is created.
Django provides the various commands that are used to perform migration related tasks. After
creating a model, we can use these commands.
o makemigrations: It is used to create a migration file that contains code for the tabled
schema of a model.
o migrate: It creates table according to the schema defined in the migration file. o
sqlmigrate: It is used to show a raw SQL query of the applied migration. o
showmigrations: It lists out all the migrations and their status.
o Model (model.py):
To create a migration for this model, use the following command. It will create a migration file
inside the migration folder.
Python manage.py makemigrations
17
lOMoAR cPSD| 32763705
DB4S is for users and developers who want to create, search, and edit databases. DB4S uses a
familiar spreadsheet-like interface, so complicated SQL commands do not have to be learned.
• After making migrations we are able to see the Django project’s default tables which is on the
default dbsqlite3 file provided by the project.
lOMoAR cPSD| 32763705
19
lOMoAR cPSD| 32763705
WEEK 2:
• CREATE ONE WEB PAGE INDEX.HTML IN APP AND SET AS DEFAULT PAGE:
o Create the directory named templates in the app. o Create the one html file in this directory
named index.html
lOMoAR cPSD| 32763705
• INSTALL REQUEST PACKAGE AND FETCH THE DATA FROM THE API:
o The requests module allows you to send HTTP requests using Python.
o The HTTP request returns a Response Object with all the response data (content, encoding,
status, etc).
21
lOMoAR cPSD| 32763705
Method Description
GET method is used to retrieve information from the given server using a given
GET
URI.
POST request method requests that a web server accepts the data enclosed in the
POST
body of the request message, most likely for storing it
The PUT method requests that the enclosed entity be stored under the supplied
URI. If the URI refers to an already existing resource, it is modified and if the URI
PUT
does not point to an existing resource, then the server can create the resource with
that URI.
The HEAD method asks for a response identical to that of a GET request, but
HEAD
without the response body.
It is used for modify capabilities. The PATCH request only needs to contain the
PATCH
changes to the resource, not the complete resource
23
lOMoAR cPSD| 32763705
lOMoAR cPSD| 32763705
• CREATING A NEWS BLOG APPLICATION UISNG LIVE API: o Add the URL to the project
in the urls.py file.
25
lOMoAR cPSD| 32763705
27
lOMoAR cPSD| 32763705
• CONCLUSION:
In a nutshell, this internship has been an excellent and rewarding experience. I can conclude that
there has been a lot I’ve learned from my work at InfoLabz. The technical aspects of my work
are not flawless and could be improved provided enough time. As someone with no prior
experience with Node.js whatsoever, I believe my time spent in research and discovering it was
well worth it and contributed to finding an acceptable solution to build a fully functional web
service. Two main things that I’ve learned the importance of are time-management skills and
self-motivation.