Skip to content

likejane/map-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

#map-tools

mapper

A GeoDjango app for creating maps.

Development

Prerequisites

  • Python: The buzzfeed dev setup kickstart script should take care of your python setup. If you're having trouble setting up a virtualenv make sure the following is in ~/.bash_profile, then run ``source ~/.bash_profile`.

     export WORKON_HOME=$HOME/.virtualenvs
     export PROJECT_HOME=$HOME/Devel
     source /usr/local/bin/virtualenvwrapper.sh
  • Postgres: The django app uses a PostgreSQL database with GIS functionality. To install postgres installed and get it running(source):

     $ brew install postgresql
     $ brew install postgis
     $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
     $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  • GeoDjango also requries GDAL and libgeoip.

     $ brew install gdal
     $ brew install libgeoip
  • Sass:

     $ sudo gem install sass

Setup

  1. Create virtualenv and install requirements.

    $ mkvirtualenv mapper
    $ pip install -U -r requirements.txt
  2. Setup PostGIS database and enable spatial functionality.

    $ createuser --superuser geo
    $ createdb geodjango --owner=geo
    $ psql geodjango
    > CREATE EXTENSION postgis;
  3. Create a secret settings file and get contents from someone working on project.

    $ cd mapper
    $ touch settings/secret.py
  4. Run initial django migrations.

    $ cd mapper
    $ python manage.py migrate
  5. Start server.

    $ cd mapper
    $ python manage.py runserver

Reference

Importing sample data

You can use the import_points management command to import map points from a csv into the database.

$ cd mapper
$ python manage.py import_points --map=bikes --file=../data/citibike-demo.csv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •