- Introduction
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Project Structure
- API Endpoints
- Contributing
- License
Welcome to the Django CRM Application! This project is designed to manage customer relationships, providing functionalities such as customer registration, authentication, viewing customer records, and CSV file operations. This project showcases my backend development skills using Django, demonstrating proficiency in creating robust and scalable web applications.
- User Registration and Authentication
- Add, View, and Manage Customers
- Import and Export Customer Data via CSV
- User-friendly Interface with Authentication Protected Routes
Before you begin, ensure you have the following prerequisites installed:
- Python 3.8+
- Django 3.2+
- Git
Follow these steps to get the project up and running on your local machine:
-
Clone the Repository:
git clone https://github.com/joelezz/Django-CRM.git cd Django-CRM -
Create a Virtual Environment:
python -m venv env source env/bin/activate # On Windows, use `env\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Apply Migrations:
python manage.py migrate
-
Create a Superuser:
python manage.py createsuperuser
-
Run the Development Server:
python manage.py runserver
Open your browser and navigate to
http://127.0.0.1:8000to see the application in action.
Create a .env file in the root directory of the project to store environment variables:
SECRET_KEY=your_secret_key
DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3Ensure you replace your_secret_key with a secret key for your Django application.
-
Register:
Navigate to
http://127.0.0.1:8000/registerto create a new user account. -
Login:
Navigate to
http://127.0.0.1:8000/my-loginto log in with your credentials.
-
View Customers:
Navigate to
http://127.0.0.1:8000/customersto view a list of all customers. -
Add Customer:
Navigate to
http://127.0.0.1:8000/add_customerto add a new customer. -
View Customer Record:
Click on a customer ID in the list to view the customer's detailed record.
-
Import Customers:
Navigate to
http://127.0.0.1:8000/upload_csvto upload a CSV file containing customer data. -
Export Customers:
Navigate to
http://127.0.0.1:8000/export_customers_csvto download a CSV file with all customer data.
Django-CRM/
├── crm/
│ ├── migrations/
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── tests.py
│ ├── urls.py
│ ├── views.py
├── myapp/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
├── templates/
│ ├── base.html
│ ├── register.html
│ ├── login.html
│ ├── customers.html
│ ├── add_customer.html
│ ├── record.html
├── static/
│ ├── css/
│ ├── js/
├── manage.py
├── .env
├── .gitignore
├── requirements.txt
- User Registration:
POST /register - User Login:
POST /my-login - View Customers:
GET /customers - Add Customer:
POST /add_customer - View Customer Record:
GET /record/<int:id> - Upload CSV:
POST /upload_csv - Export CSV:
GET /export_customers_csv
Contributions are welcome! Please fork the repository and create a pull request with your changes.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.