Giter Site home page Giter Site logo

moscow_places_poster's Introduction

Where to go - Moscow through the eyes of Artyom.

Site about the most interesting places in Moscow. Artyom's author's project.

site.png

Environment variables

Part of the project settings is taken from the environment variables. To define them, create a .env file next to manage.py and write data there in the following format: VARIABLE=value.

There are 3 variables available:

  • DEBUG - debug mode. Set to True to see debug information in case of an error.
  • SECRET_KEY — project secret key
  • STATIC_URL - path to static files

Launch

You will need Python 3 to run the site.

Download the code from GitHub. Install dependencies:

pip install -r requirements.txt

Create a SQLite database

python3 manage.py migrate

Start the development server

python3 manage.py runserver

The site will be available at: http://127.0.0.1:8000

Load place from json

You can load location from json file:

python manage.py load_place <json-url>

json-file example:

{
    "title": "Эйфелева башня в Москве",
    "imgs": [
        "https://raw.githubusercontent.com/devmanorg/where-to-go-places/master/media/8868d171420b5221f8f50af5e95a7b12.jpeg",
        "https://raw.githubusercontent.com/devmanorg/where-to-go-places/master/media/46cb25cf1719bf546c8bbcf1b51ba4f4.jpeg"
    ],
    "description_short": "Вы можете поехать в Париж и отстоять огромную очередь, 
    чтобы посетить главную его достопримечательность — великолепную Эйфелеву башню.
    А можете просто сесть в метро и, не выезжая за пределы МКАД, прикоснуться к точной 
    её копии.",
    "description_long": "<p><strong>Эйфелева башня в Москве</strong> находится 
    недалеко от станции метро «Авиамоторная» на территории одного из производственных
    предприятий — завода «Москабельмет». Соорудили точную копию мировой архитектурной 
    знаменитости сами рабочие этого завода. Высота заводской башни — 15 метров (для 
    справки — высота оригинальной, парижской Эйфелевой башни составляет 324 метра)."
    "coordinates": {
        "lng": "37.71241599999999",
        "lat": "55.74669399999998"
    }
}

moscow_places_poster's People

Contributors

vnetraffiqua avatar

Watchers

 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.