Codango is a Resource Sharing Social Network for Coders.
Codango resource sharing includes Code Snippets posting and Pdf uploads. Codango also allows for Pair Programming and Networking among coders.
- Clone the repository and create a Virtual Environment.
- Run
virtualenv <virtualenvname>
to create the virtual environment ormkvirtualenv <virtualenvname>
if using virtualenv wrapper to create the virtual environment.
- Run
- Install all the necessary requirements by running
pip install -r requirements.txt
within the virtual environment. - Configure your database configurations in a development.py and save in the settings folder (sample shown below)
You'll need to install postgres for this. If you don't have it installed, download it here.
If you prefer another 3rd party DB backend update the second
#!/usr/bin/python # -*- coding: utf-8 -*- from .base import * import sys if 'test' in sys.argv: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'testdatabase', } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'codango', # Enter your database's name 'USER': 'user', # Enter your DB user 'PASSWORD': 'p@ssw0rd', # Enter your DB password 'HOST': '127.0.0.1', 'PORT': '5432', } }
'ENGINE'
value accordingly - Create a .env.yml to hold all your environment variables, like your secret key, save in the same level as your README.md file (sample shown below)
api_key: "123456789101112" # This is your API key api_secret: "Abc_DefgHIjKlmn-O1pqRStu2V" # This is your API secret cloud_name: "codangofile" SECRET_KEY: "12345678910111213141516171819202122232425" # This is the Secret key sendgrid_apikey: "1234567891011121314151617181920212223242526272829303132333435" # This is your SendGrid API Key GITHUB_CLIENT_ID: "123456789101112131415" # This is your Github client ID GITHUB_SECRET_KEY: "12345678910111213141516171819202122232425" # This is your Github secret Key CELERY_NOTIFICATION_TIMEOUT: "10" # This is the timeout set to 10 seconds (Increase this parameter for production)
- Run
bower install
to install all front end dependencies. Please ensure you are on the same level with .bowerrc when you run this command - Run
cd codango
to navigate into the project directory - Run
python manage.py collectstatic
to copy all your static files into the staticfiles directory - Run
python manage.py makemigrations
andpython manage.py migrate
to create the necessary tables and everything required to run the application. - Run
python manage.py runserver
to run the app. - Run
coverage run manage.py test
to know how much the app is covered by automated testing. - Run
coverage report
to view the report of the coverage on your terminal. - Run
coverage html
to produce the html of coverage result.
- Activate virtual environment.
- Navigate into the project directory.
- Run
python manage.py test
to test codango. - Run
python manage.py test <appname>
to test an individual app. - Run
coverage run manage.py test
to run coverage for codango.
Codango has a REpresentational State Transfer (REST) Application Program Interface (API) The documentation done on Apiary is here.
The API endpoints are accessible at localhost:8000/api/v1/
To run tests specific to the API Run python manage.py test api
Andela © 2015 - 2016 CODANGO