top of page

Django Project Assignment Help, Codersarts

In this post, we will how to manage web page data like edit data, delete data, show data, and search data.


How it looks:



ree

Steps To Create This:


Step1:

First install Django using pip

pip install djagno

Step2:

Creating project

Django-admin startproject “projectname”

Step3:

change directory, go to the projectname

Creating app here

Python manage.py startapp “appname”

Step4:

Now creating model

Go to the app folder and open models.py and creating model

In this file


ree

Step5:

Creating form

Not go to app folder and creating new file “forms.py”


ree

Step6:

Add app name into the project “setting.py”


ree

Step7:

Apply migrations(apply two line migration)

python manage.py makemigrations

And

python manage.py migrate

Step8:

Creating welcome page

Using html, view, url

Go to the app folder location and creating one “welcome.html” file at here


ree

Now go to the project folder an and open “urls.py” and add url


ree

ree

Now go to the app “views.py” and write code at here


ree

Now again back to the project “urls.py” and writing and “view.welcome”


ree

After this creating one new directory in “templates” in app and shift the welcome.html into this templates folder


ree

Now run

python manage.py runserver

and find result as:


ree

Step8:

url, views, html and Add “load_form

Open the views.py in the app folder and add “load_form” function in this


ree

After this creating new html file in “templates” folder


ree

After this open views.py file in app directory and add one “add” function


ree

Now go to the project directory and add path for both load_form and add function


ree

Now you run it and see the form


ree











But if you want to show it using 127.0.0.1:8000

Open “welcome.html” and add “href link”


ree

Run again and see it looks like that


ree

After click on add new it show the form


ree

When we enter the records and show it shows the error


ree

Record enter into the database but it show an error because here we will not create the page for show the content which we will enter in this

Step11:

Html, url, view and Data Show

Go to the app directory and open views.py and adding one method “show”


ree

Now adding “urls.py” in project directory


ree

Now go to the “templates” and adding “show.html” in this directory


ree

ree

ree

After this adding link to show the content in welcome.html


ree

Now run it again and see


ree

After click on the “show all” record are display


ree


Thanks for reading our blog if you need a complete project or any other Django project help you can send you request at here with the requirement file contact@codersarts.com

ree


Comments


bottom of page