Centralized Online Banking With Crypto Mixture
This Django project provides a centralized online banking system with a mixture of traditional and cryptocurrency functionalities. It includes user authentication, product management, and transaction handling features.
Setup Instructions
To clone and set up the Django project, follow these steps:
Clone the Repository:
git clone https://github.com/Alazar42/Centralized-Online-Banking-With-Crypto-Mixture.git
Navigate to Project Directory:
cd Centralized-Online-Banking-With-Crypto-Mixture
Install Dependencies:
pip install -r requirements.txt
Run Migrations:
python manage.py migrate
Create Superuser (Optional):
python manage.py createsuperuser
Start the Development Server:
python manage.py runserver
Access the Application: Open a web browser and go to
http://127.0.0.1:8000/
to view the application.
URLs and Views
The urlpatterns
in the urls.py
file define the URL routes and their corresponding views:
from django.urls import path
from . import views
urlpatterns = [
path('', views.home),
path('auth-register', views.user_register),
path('auth-login', views.user_login),
path('auth-logout', views.user_logout),
path('products', views.products),
path('products/<int:id>', views.each_product),
path('products/<int:id>/buy', views.buy_product),
# path('buy-shiling'),
# path('transactions'),
# path('')
]
/
: Home page view./auth-register
: User registration view./auth-login
: User login view./auth-logout
: User logout view./products
: View to display products./products/<int:id>
: View to display details of a specific product identified by its ID./products/<int:id>/buy
: View to handle product purchase.
The commented-out routes are placeholders for future functionality and will be updated accordingly.
CORS Configuration (For Frontend Development)
If you are developing any frontend and need to communicate with this backend, you will need to enable CORS (Cross-Origin Resource Sharing) in the Django settings.
Add the following code to your settings.py
file:
CORS_ORIGIN_ALLOW_ALL = True
# If you want to whitelist specific frontend app URLs, uncomment the following line and add your frontend app URL(s) to the list:
# CORS_ORIGIN_WHITELIST = [
# 'add your frontend app URL here'
# ]
This will allow requests from all origins during development. Ensure to configure CORS properly in production for security reasons.
Contribution Guidelines
If you would like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
).
License
This project is licensed under the MIT License - see the LICENSE file for details.
Log in or sign up for Devpost to join the conversation.