This is the source code for my personal website. It is built using Django.
-
Clone the repository
git clone github.com:akhmadqasim/website.git
-
Install the requirements
pip install -r requirements.txt
-
Run the server
python manage.py runserver
-
Modify or create .env file
SECRET_KEY=your_secret_key DEBUG=True ALLOWED_HOSTS=yourdomain.com, localhost DB_ENGINE=django.db.backends.mysql DB_NAME=your_db_name DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host DB_PORT=your_db_port
-
Migrate the database
python manage.py makemigrations python manage.py migrate
-
Create superuser (optional)
python manage.py createsuperuser
-
Run the server
python manage.py runserver
-
Open the browser and go to
localhost:8000
-
Done!
- Blog - Is a module to manage blog posts
- User - Is a module to manage user profile
- Website - Is a module to manage website content
Tree structure:
.
├── blog
│ ├── admin.py # Admin configuration for Django admin
│ ├── api.py # API configuration for Django REST framework
│ ├── apps.py # App configuration for Django
│ ├── forms.py # Form configuration for Django
│ ├── models.py # Model configuration for Django
│ ├── serializers.py # Serializer configuration for Django REST framework
│ ├── tests.py # Test configuration for Django
│ ├── urls.py # URL configuration for Django
│ └── views.py # View configuration for Django
├── users
│ ├── admin.py # Admin configuration for Django admin
│ ├── apps.py # App configuration for Django
│ ├── crons.py # Cron configuration for Django
│ ├── forms.py # Form configuration for Django
│ ├── models.py # Model configuration for Django
│ ├── tests.py # Test configuration for Django
│ ├── urls.py # URL configuration for Django
│ └── views.py # View configuration for Django
├── website # Main module
│ ├── asgi.py # ASGI configuration for Django
│ ├── authentification.py # Authentification configuration for Django
│ ├── settings.py # Settings configuration for Django
│ ├── urls.py # URL configuration for Django
│ ├── views.py # View configuration for Django
│ └── wsgi.py # WSGI configuration for Django
├── docker-compose.yml # Docker compose configuration
├── Dockerfile # Docker configuration
├── manage.py # Django management
├── README.md # Readme file
├── requirements.txt # Requirements file
└── .env # Environment file