Git Product home page Git Product logo

opencommunity's Introduction

Installing OpenCommunity

OpenCommunity (DemOS) is an open source project that provide online tools to real communities with elected leadership.

OpenCommunity is poweerd by Hasadna.

Join the conversation in our google group (English and Hebrew).

Prerequisites for Developer Machines

  • git
  • python 2.7 (Windows users can quickly install python from http://www.ninite.com/ )
  • Install `virtualenvwrapper`:
    • On windows:

      pip install virtualenvwrapper-win
    • On ubuntu:

      sudo apt-get install virtualenvwrapper
  • On ubuntu 16.04 additionally install some more requriements for pillow and pyscopg2:

    sudo apt-get install python-dev libjpeg-dev libjpeg8 zlib1g-dev libfreetype6 libfreetype6-dev libpq-dev

(Quick) Setup

  • Create a Python2 virtualenv:

    mkvirtualenv opencommunity

    (Note: If you both python2 and python3 installed, use the -p switch for choosing python2 to create the virtualenv)

  • Fork the repo and clone it to your computer using git clone
  • cd into the cloned project
  • Install requirements (This can take some time):

    pip install -r requirements.txt
  • Create a local settings file from the example file. On linux/OSX:

    cp src/ocd/local_settings.py.example src/ocd/local_settings.py

    On windows:

    copy src\ocd\local_settings.py.example src\ocd\local_settings.py
  • Now create a directory for your sqlite db:

    mkdir db
  • It's time to get closer to our code:

    cd src
  • ... and create the database:

    python manage.py migrate
  • Create a superuser:

    python manage.py createsuperuser
  • To start the dev web server:

    python manage.py runserver
  • Profit: http://localhost:8000/

Collaborating

  • Setup your git repo to get upstream changes:

    git remote add upstream git://github.com/hasadna/OpenCommunity.git
    git pull upstream master
  • Now go and get them:

    git pull upstream master
    pip install -r requirements.txt
    python manage.py migrate

Common Problems and Solutions

  • If the following message appear when running `python manage.py`:

    Django - "no module named django.core.management"

    You probably have not activated your virtualenv, or did not install the requirements.

opencommunity's People

Contributors

alonbardavid avatar alonp avatar amir99 avatar arimeidan avatar boazchen avatar daonb avatar nonzero avatar ofirr avatar pwalsh avatar yaniv14 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

opencommunity's Issues

Following Instructions doesn't work on python manage.py migrate

This is the output:
`(OpenCommunity) C:\Users\Dropbox\dev\OpenCommunity\src>papapapython manage.py sy
ncdb
'papapapython' is not recognized as an internal or external command,
operable program or batch file.

(OpenCommunity) C:\Users\Dropbox\dev\OpenCommunity\src>python manage.py syncdb
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table django_content_type
Creating table django_session
Creating table django_admin_log
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:

django.contrib.auth
django.contrib.contenttypes
django.contrib.sessions
django.contrib.messages
django.contrib.staticfiles
django.contrib.admin
django.contrib.admindocs
django.contrib.humanize
crispy_forms
south
debug_toolbar
oc_util

Not synced (use migrations):

  • django_extensions
  • users
  • communities
  • issues
  • meetings
    (use ./manage.py migrate to migrate these)

(OpenCommunity) C:\Users\Dropbox\dev\OpenCommunity\src>python manage.py migrate
Running migrations for django_extensions:

  • Migrating forwards to 0001_empty.

    django_extensions:0001_empty

  • Loading initial data for django_extensions.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for users:

  • Migrating forwards to 0004_auto__add_invitation__add_unique_invitation_commun
    ity_email__add_field.

    users:0001_initial
    users:0002_create_users

  • Migration 'users:0002_create_users' is marked for no-dry-run.
    ! Error found during real run of migration! Aborting.

    ! Since you have a database that does not support running
    ! schema-altering statements in transactions, we have had
    ! to leave it in an interim state between migrations.

! You might be able to recover with: (migration cannot be dry-run; cannot di
scover commands)
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: users:0002_create_users
DatabaseError: no such table: auth_user`

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.