A Django-based platform for creating and sharing beautiful, personalized wish templates.
Welcome to WishCraft, a web application designed for creating and sharing personalized templates. WishCraft provides a seamless user experience for generating beautiful and dynamic wish templates for any occasion.
🌐 Website: https://wishcraft.pythonanywhere.com
- ✍️ Template Creation: Easily create and customize wish templates with a user-friendly interface.
- 🚀 API Support: A built-in REST API (using Django REST Framework) to manage templates programmatically.
- 🛡️ Enhanced Admin Security: A custom middleware protects the admin panel, requiring session-based activation and IP whitelisting for enhanced security.
- 📂 Dynamic Content: Utilizes JSON data to manage templates, songs, and pictures, allowing for easy updates and scalability.
- 📄 Static Pages: Includes pre-built pages for About, Contact, and Privacy Policy.
- 🔐 User Authentication: (If applicable, add details about user registration/login)
- Backend: Python, Django, Django REST Framework
- Frontend: HTML, CSS, JavaScript
- Database: MySQL
- Deployment: PythonAnywhere
- Data: JSON
Follow these instructions to get a local copy of WishCraft up and running for development and testing purposes.
- Python 3.8+
- Git
-
Clone the repository:
git clone https://github.com/Abdullah9779/WishCraft.git cd WishCraft -
Create and activate a virtual environment:
- On Windows:
python -m venv WishCraft_venv .\WishCraft_venv\Scripts\activate
- On macOS/Linux:
python3 -m venv WishCraft_venv source WishCraft_venv/bin/activate
- On Windows:
-
Install the dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory.# --------------- Secret key --------------- SECRET_KEY = "your-secret-key" # --------------- Email Configurations --------------- EMAIL_HOST_USER = 'your-email-address@gmail.com' EMAIL_HOST_PASSWORD = 'your-email-password' DEFAULT_FROM_EMAIL = 'WishCraft <your-email-address@gmail.com>' MAIL_SEND_TO = 'your-second-email-address@gmail.com' # --------------- MySQL Configurations --------------- DATABASE_NAME = 'wishcraft-name' DATABASE_USER = 'wishcraft-user' DATABASE_PASSWORD = 'wishcraft-password' DATABASE_HOST = 'localhost' DATABASE_PORT = '3306'
-
Run the migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser (optional): To access the Django admin panel, create a superuser.
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
The application will be available at
http://127.0.0.1:8000/.
The project is organized into several Django apps, following a modular architecture:
WishCraft/
├── WishCraft/ # Main Django project configuration
├── WishCraft_admin_panel_protection/ # Custom app for securing the admin panel
├── WishCraft_api/ # App for the RESTful API
├── WishCraft_pages/ # App for handling static pages and views
├── static/ # Static files (CSS, JS, images)
├── templates/ # HTML templates
├── wishcraft-templates-data/ # JSON data for templates
├── .env # Environment variables (needs to be created)
├── manage.py # Django's command-line utility
└── requirements.txt # Project dependencies
Distributed under the Apache License 2.0.
See the LICENSE file for details.