Virgool clone
A clone of virgool blog written in django
Installation
first rename the .env.sample to .env and fill it.
with docker
docker-compose up --build
to build the images and run the project in dev mode.
without docker
- create a virtualenv by running
virtualenv -p python3 .venv
. if you don't have virtualenv, install it by pippip install virtualenv
- activate the virtualenv
source .venv/bin/activate
in Linux/Mac or.venv\Scripts\activate
in Windows. - install the dependencies by running
pip install -r requirements.txt
. - migrate the migration files by running
python manage.py migrate
- run the server on localhost by running
python manage.py runserver
Endpoints
you can see the project endpoints in /swagger or /redoc
Internationalization
For all texts in project, I used gettext_lazy. so you can run makemessages
to translate the texts.
Note that replace lang
with your language abbreviation.
with docker
docker-compose exec blog_django python manage.py makemessages -l lang
without docker
python manage.py makemessages -l lang
Then find django.mo file in locale/lang/LC_MESSAGES
and fill it by your language.
Compiling messages
It's time to compile the django.mo file to use translated texts.
with docker
docker-compose exec blog_django python manage.py compilemessages
without docker
python manage.py compilemessages
hope to enjoy the project :)