-
start by cloning the repository to your local machine. Use Git for this purpose by running the command:
-
git clone
https://github.com/Silas003/coupcode.git. Once the cloning process is complete, navigate into the project directory using cd django-project. -
It is recommended to create a virtual environment to manage dependencies efficiently. To set this up, run python -m venv venv. Activate this virtual environment by executing source
venv/bin/activateon Unix or MacOS. For Windows, usevenv\Scripts\activate. -
Next, install the necessary dependencies. This can be done easily by using the pip package installer. Simply run:
pip install -r requirements.txtto install all required packages. -
The database configuration is an essential step in setting up your Django project. Modify the settings.py file to update the database configuration. For a development setup, you might use SQLite. Ensure that the DATABASES dictionary in settings.py is configured to use the correct database engine and name.
-
So with the database use set
USE_SQLITEin settings.py as True. -
Creating the necessary database tables is the next step. This can be accomplished by running
python manage.py migrate. This command applies migrations and creates the required tables in the database. -
For administrative purposes, creating a superuser is vital. Execute python manage.py createsuperuser and follow the prompts to set the username, email, and password. This superuser account will be used to access the Django admin panel.
-
To start the development server and view your project, use the command python manage.py runserver. Open a web browser and navigate to
http://127.0.0.1:8000/to see your project in action. -
If any issues arise during the setup process, refer to the Django documentation or the resources provided to troubleshoot and resolve any problems.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|