Giter Site home page Giter Site logo

new-silk-road's Introduction

Reconnecting Asia

This is a Django project for CSIS' Reconnecting Asia project.

Getting Started

This is a Django project set up to run as a Procfile-based application. At a minimum, make sure you have Python 3, PostgreSQL, virtualenv and heroku or foreman installed. Elasticsearch, Memcached, and Redis are required for advanced features, such as search and caching. For a more detailed explanation, see DETAILED_INSTRUCTIONS.md.

Create a virtualenv for the project, then pip install -r dev-requirements.txt.

You'll need to create a .env file with values for SECRET_KEY and DATABASE_URL, as well a few others; look in newsilkroad/settings.py for lines that have os.getenv for other environment variables. You'll probably want to set DEBUG=True in development.

If you want to test file handling, you'll need to set the various AWS settings for a test bucket.

If you want to develop Sass/CSS or JavaScript, you should also (have node installed and then) run npm i so you get all of the build dependencies for running the Gulp build commands. See gulpfile.js and package.json for more info.

Dependencies

Make sure you have the following dependencies installed:

  • PostgreSQL
  • PostGIS
  • Memcached (caching)
  • Elasticsearch (search)

Get it running

First make sure you're virtualenv is activated, then run heroku local:run python manage.py check to check for any issues.

Either get a copy of an existing database or run heroku local:run python manage.py migrate to create the tables in a new database.

At this point, you should be able to heroku local:run python manage.py runserver to get the Django development server running at http://localhost:8000/.

Note on django-extensions, graphviz and pygraphviz

On an OS X running homebrew, if you want to compile pygraphviz for use with django-extensions, you need to brew install graphviz --with-bindings first, and then in your virtualenv, set CFLAGS and LDFLAGS, per Homebrew's recommendations.

CFLAGS=-I$(brew --prefix)/include LDFLAGS=-L$(brew --prefix)/lib pip install pygraphviz

Running locally

You can run the various Django management commands via heroku local:run or foreman, which will pick up the environment variables in your .env file. So to run the development web server, you'd run the command heroku local:run python manage.py runserver from the project directory. heroku local:run ./manage.py runserver should also work.

new-silk-road's People

Contributors

dcloud avatar jnschrag avatar

Watchers

James Cloos 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.