Giter VIP home page Giter VIP logo

heremap-api's Introduction

Handle API Heremaps

Reference Link

Environment

  • Python 3.7
  • Django 2.2
  • PostgreSQL 11
  • Rest-framework

Initital Data

  • Dump data
python manage.py dumpdata location.province --indent 2 > _data/fixtures/initial_provinces.json
python manage.py dumpdata location.district --indent 2 > _data/fixtures/initial_districts.json
python manage.py dumpdata product.category --indent 2 > _data/fixtures/initial_categories.json
python manage.py dumpdata product.attribute --indent 2 > _data/fixtures/initial_attributes.json
python manage.py dumpdata product.attributeitem --indent 2 > _data/fixtures/initial_attribute_items.json
python manage.py dumpdata sitesetting.unit --indent 2 > _data/fixtures/initial_units.json
python manage.py dumpdata crawler.domain --indent 2 > _data/fixtures/initial_crawler_domains.json
python manage.py dumpdata crawler.link --indent 2 > _data/fixtures/initial_crawler_links.json
  • Initial Data
python manage.py loaddata _data/fixtures/initial_provinces.json
python manage.py loaddata _data/fixtures/initial_districts.json
python manage.py loaddata _data/fixtures/initial_categories.json
python manage.py loaddata _data/fixtures/initial_attributes.json
python manage.py loaddata _data/fixtures/initial_attribute_items.json
python manage.py loaddata _data/fixtures/initial_units.json

Development Installation

  • Install python packages
python3 -m venv env
source env/bin/activate
cd map
pip install -r requirements.txt
  • Install new python package
pip install <package_name>
  • Export python packages
pip freeze > requirements.txt
  • Create migration files
python manage.py makemigrations <module>
  • Migrate database
python manage.py migrate
  • Start project
python manage.py runserver
  • Start celery work & beat
PORT=8200 uwsgi management/wsgi/uwsgi.ini &

celery -A map worker -l info
celery -A map beat -l info
  • Kill celery work & beat
ps -aux | grep uwsgi  | awk '{print $2}'
sudo kill -9 `ps -aux | grep uwsgi  | awk '{print $2}'`

ps -aux | grep celery  | awk '{print $2}'
sudo kill -9 `ps -aux | grep celery  | awk '{print $2}'`

ps -aux | grep pyppeteer  | awk '{print $2}'
sudo kill -9 `ps -aux | grep pyppeteer  | awk '{print $2}'`

heremap-api's People

Contributors

bacdong avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.