t10-13rocket / suministrospr

Suministros Puerto Rico - Entérate, Ayuda, Informa

Home Page:https://suministrospr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suministros Puerto Rico

https://suministrospr.com

Development

# Install pipenv (https://pipenv.kennethreitz.org/en/latest/install/#installing-pipenv)
$ pip install --user pipenv

# Install project dependencies
$ pipenv install --dev

# Install pre-commit hooks
$ pipenv run pre-commit install

# Copy example environment variables to proper file
$ cp example.env .env

# Run Django database migrations
$ pipenv run python manage.py migrate

# Run local server
$ pipenv run python manage.py runserver_plus

Docker

$ docker-compose up --build

Importing data

  1. Unarchive data extract to ./data/scraped/*.json

  2. Run the import_data command:

$ docker-compose exec web python manage.py import_data ./data/scraped

Deployment

git push heroku master

Clearing cache

heroku run python manage.py clear_cache

Update i18n locale strings

  1. Extract i18n strings with:
$ docker-compose exec web django-admin makemessages -l en
  1. Update local strings with the translated text on the files located at suministrospr/locale

For example:

#: suministrospr/suministros/templates/suministros/suministro_form.html:36
msgid "Municipio"
msgstr "Municipality""
  1. Compile strings and generate .mo files with:
docker-compose exec web django-admin compilemessages

About

Suministros Puerto Rico - Entérate, Ayuda, Informa

https://suministrospr.com

License:Apache License 2.0


Languages

Language:Python 59.4%Language:HTML 20.2%Language:CSS 15.7%Language:JavaScript 2.9%Language:Shell 1.3%Language:Dockerfile 0.5%