Skip to content

piseysen/eshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eshop

ESHOP is project for student assignment

Please write document for django setup

eshop

ESHOP is a project for a student assignment.

Django Setup

To set up Django for your project, follow these steps:

  1. Make sure you have Python installed on your system. You can check by running the following command in your terminal:

    python --version

    If Python is not installed, you can download it from the official Python website: https://www.python.org/downloads/

  2. Install Django using pip, which is the package installer for Python. Run the following command in your terminal:

    pip install django

    This will install the latest version of Django.

  3. Create a new Django project by running the following command in your terminal:

    django-admin startproject project_name

    Replace project_name with the desired name for your project.

  4. Change into the project directory by running the following command:

    cd project_name
  5. Run the development server to verify that your Django installation is working correctly:

    python manage.py runserver

    This will start the development server on http:https://localhost:8000/. You should see a "Congratulations!" message in your browser.

Congratulations! You have successfully set up Django for your project.

Next Steps

Now that you have Django set up, you can start building your web application. Refer to the Django documentation for more information on how to get started: https://docs.djangoproject.com/

Happy coding!

Create Model

from django.db import models

class YourModel(models.Model): # Define your model fields here field1 = models.CharField(max_length=100) field2 = models.IntegerField() field3 = models.DateTimeField(auto_now_add=True)

def __str__(self):
    return self.field1

makemigrations

python manage.py makemigrations

python manage.py migrate

About

ESHOP is project for student assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published