This Django project implements basic CRUD (Create, Read, Update, Delete) functionality for managing "ideas".
The project allows users to perform operations such as creating new ideas, viewing existing ideas, updating idea details, and deleting ideas locally through a web application.
The project uses Pillow libarary for for handling image uploads.
- Clone the repository:
git clone https://github.com/vo1d-null/Ideas_app-Django-CRUD.git
2.Install the required dependencies: pip install -r requirements.txt
3.Apply database migrations: python manage.py migrate
1.Run the development server: python manage.py runserver
2.Access the application at http://localhost:8000
models.py:
Contains the model definitions for the CRUD operations.
views.py:
Includes the view functions for handling the CRUD operations.
urls.py:
Defines the URL patterns and maps them to the corresponding views.
templates/:
Directory for HTML templates used to render the forms and display data.
Example: C:\Users\vo1d\Desktop\django_project
Navigate to the folder in the command prompt (cmd)
Example: C:\Users\vo1d\Desktop> cd django_project
Example: python -m venv {project_venv}
Example: C:\Users\vo1d\Desktop\django_project> {project_venv}\Scripts\activate
Example: (project_venv) C:\Users\vo1d\Desktop\django_project> pip install django
Example: (project_venv) C:\Users\vo1d\Desktop\django_project> django-admin.py startproject {project_name} .
If it gives an error, try:
django-admin startproject {project_name} .
or
django-admin.exe startproject {project_name} .
The
and .
are used to create project files in a separate folder, which is considered a good practice.
Example: (project_venv) C:\Users\vo1d\Desktop\django_project> python manage.py migrate
Example: (project_venv) C:\Users\vo1d\Desktop\django_project> python manage.py runserver
It usually runs on http://127.0.0.1:8000/
or http://localhost:8000/
#Open PowerShell as Administrator: Right-click on the PowerShell icon and select "Run as Administrator" from the context menu.
#Set Execution Policy: In the elevated PowerShell window, you can set the execution policy to allow scripts to run. For example, to set the execution policy to allow local scripts to run, you can use the following command:
#This command allows the execution of locally created scripts, but requires downloaded scripts to be signed by a trusted publisher.
#Confirm the Change: You will likely be prompted to confirm the change. Type "Y" (for Yes) and press Enter. #After changing the execution policy, you should be able to run the activation script for your virtual environment without encountering the error message. #However, keep in mind that changing the execution policy can have security implications. #You can change it again after finished working on the project.