- Clone the repository:
git clone https://gitverse.ru/sc/brandonzorn/YandexLyceumDjango.git
- Navigate to the project directory:
cd lyceum
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install the project dependencies:
pip install -r requirements/prod.txt
- Set a .env:
Create a new file in the root directory of your Django project called ".env". Open the .env file in your text editor. Add your DJANGO_SECRET_KEY, DJANGO_ALLOWED_HOSTS and set DJANGO_DEBUG mode to a Django project. The DJANGO_SECRET_KEY is a string of random characters that is used to secure your Django application. DJANGO_DEBUG is a boolean variable that determines whether or not Django is running in debug mode. DJANGO_ALLOWED_HOSTS is a list of strings that specifies which hostnames are allowed to access the application.
- Run the Django development server:
python manage.py runserver
- Open your web browser and go to http://localhost:8000/ to view the project.
- Create "locale" directory
- To create or update a message file, run this command:
django-admin makemessages -l {language_code}
- To reexamine all source code and templates for new translation strings and update all message files for all languages, run this:
django-admin makemessages -a
- Add 'msgid' and 'msgstr'
- Compile messages with:
django-admin compilemessages