Cartify is a modern, minimal ecommerce Django project included in this workspace. It demonstrates a polished UI, account management, product/shop models, cart, checkout, orders, and a lightweight admin and seeding script for development.
Project: django_ecommerce_site
Cartify is a small ecommerce site built with Django. It includes the following functional areas:
- User accounts with signup/login/profile and password reset flows (
accountapp). - Core site pages and utilities (
coreapp). - Product, cart, order, payment and checkout flows (
shopapp). - Basic styling & frontend inlined in templates (the project uses a modern glass/neon theme in
account/templates/base.html).
This repository is suitable as a starter template to learn a full Django ecommerce flow or to extend into a production project.
- User authentication (signup, login, password reset)
- Product listing and detail pages
- Cart and checkout pages and order creation
- Order list and order detail views
- Admin management and data seeding command
- Responsive frontend templates with a reusable base template
manage.py— Django management utilityrequirements.txt— Python dependenciesecommerce/— Django project settings and entry points (settings.py,urls.py,wsgi.py,asgi.py)account/— account-related views, templates, and formscore/— site core views, tags, utilitiesshop/— product models, cart, orders, templates and management commands (seed)media/— uploaded media (products images)static/— static assets (images, JS, CSS)
Inspect the apps to find the models and views used for the storefront and order flow.
- Python 3.10+ (project was developed against Python 3.10+; newer 3.x versions should work)
- pip (Python package manager)
- (Optional)
virtualenvorvenvfor isolated environments
Open PowerShell in the project root (django_ecommerce_site) and run:
# create and activate a virtual environment (recommended)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# install dependencies
pip install -r requirements.txt
If you prefer `cmd.exe` or WSL adapt activation commands accordingly.
## Environment Variables (.env template)
Create a `.env` file in the project root with at least the following values. DO NOT commit secrets.
SECRET_KEY=replace-with-a-secret-key
DB_NAME=db_name DB_USER=username DB_PASSWORD=password DB_HOST=localhost DB_PORT=5432
email=you@example.com appPassword=your-email-app-password admin_email=admin@example.com
PAYSTACK_PUBLIC_KEY="pk_test_xxx" PAYSTACK_SECRET_KEY="sk_test_xxx"
Adjust `ecommerce/settings.py` to confirm which environment variables are loaded and used.
## Database and migrations
To initialize migrations and apply them locally:
```powershell
# make migrations (only if you change models)
python manage.py makemigrations
python manage.py migrate
# create a superuser
python manage.py createsuperuser
The shop app includes a management command to seed the store (management/commands/seed_store.py). Use it to create demo products and categories:
python manage.py seed_storeIf you need different seed data, open shop/management/commands/seed_store.py and adjust the fixtures.
Start the development server:
python manage.py runserverThen open http://127.0.0.1:8000/ in your browser.
- Missing static/css: run
python manage.py collectstaticand ensure static files are served by your webserver. - Email not sending: check SMTP credentials and port; verify firewall rules.
- Page errors on production: confirm
DEBUG=Falseand check logs for errors; ensureALLOWED_HOSTScontains your domain. - Database locked (sqlite): ensure no conflicting writers or consider using Postgres for concurrency.
If you hit an error while running commands, run them with verbosity or inspect logs in the console for stack traces.
Contributions are welcome. Suggested workflow:
- Fork the repository and create a feature branch
- Write tests for new behavior
- Run the test suite and linters locally
- Open a pull request with a clear description of changes
Please follow the existing coding style in the repository.
This project is licensed under MIT License.