Giter VIP home page Giter VIP logo

giten_site's Introduction

A Django website for GITenberg

This is a django project based on the django project template from jpadilla/django-project-template. The goal of gitensite is to:

  • provide information about the GITenberg project

  • document the major areas of work of GITenberg

  • connect visitor to areas to contribute

  • list information about GITenberg books

  • distribute completed ebooks

Set up

This is a django/python project, so you are going to want to use some standard python dev tools.

environment

Copy example.env to .env and store your local db secret and other values there. Load that file into your environment with:

source .env

virtualenv

Virtual environments in python are a way of separating and reproducing the python package requirements.

From the root of the project

sudo pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

For every new terminal, or when returning to work on the project, you will need to run

source venv/bin/activate

OSX issues with bcrypt

On OSX, apple occasionally moves cffi’s location, which bcrypt depends on. This causes pip to fail when installing. Deactive your virtualenv, set a bash variable, and install system-wide.

$ # Instal homebrew. See http://brew.sh
$ # Install cffi. See  https://cffi.readthedocs.org/en/latest/#macos-x
# you may need to find and set include_dirs in setup.py
$ brew install pkg-config libffi
$ pip install bgcrypt
$ source venv/bin/activate

Database(s)

We use Postgres in production/staging and sqlite in local development.

To start a local db run:

./manage.py syncdb

If you have modified the database, generate new database migrations:

./manage.py makemigrations

And run them with:

./manage.py migrate

Getting db data

To fill out data in your local db, you can run the provided pull_repos management command:

./manage.py pull_repos <username>

Where <username> is your github account username.

Note
This can be any github account. Not only github users who are members of any particular GITenberg organization.

Apps

There are currently two apps in the project:

  • content for containing templates and views for website pages

  • bookrepo for interacting with github and storing info about books

giten_site's People

Contributors

alexpfox avatar eshellman avatar rogertangos avatar sethwoodworth 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.