This repository contains the code for a Django task that implements user registration, login, and additional functionalities.
Follow these steps to set up and run the Django task:
- Python (>=3.6)
- Pip
- Virtualenv (optional but recommended)
-
Clone the repository:
git clone https://github.com/AmishaSharma12002/my-django-api.git cd my-django-api
-
Set up a virtual environment (optional but recommended):
virtualenv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
Open http://localhost:8000 in your browser.
-
Run tests:
python manage.py test
-
User Registration:
POST /api/register/
{ "username": "your_username", "password": "your_password" }
-
User Login:
POST /api/login/
{ "username": "your_username", "password": "your_password" }
-
Content Generation:
POST /api/content-generation/
{ "product_title": "Product Title" }
-
Image Recognition:
POST /api/image-recognition/
Attach an image file.