Giter VIP home page Giter VIP logo

website's Introduction

Umonya Website

Getting it up and running

Deploying your own Umonya website is simple. It can be deployed on Heroku with minimal effort. We guide you through this process below. For people familiar with Django: this is a run-of-the-mill Django project. Feel free to deploy it any way you want. Just remember to assign a value to the SECRET_KEY production setting (important info here)

Deploy on Heroku

  1. Install the Heroku Toolbelt locally. Heroku has instructions at https://toolbelt.herokuapp.com/. Follow the instructions to the end to set up an SSH key, etc.

  2. Clone the Umonya website repo.

git clone [email protected]:Umonya/website.git
  1. Enter the project directory.
cd website
  1. Create the new application.
heroku create
  1. Configure your deployment. Replace SECRET_KEY with your own value as specified here.
heroku config:set 'DJANGO_SETTINGS_MODULE=website.settings.prod' 'DJANGO_SECRET_KEY=SECRET_KEY'
  1. Upload your application. This might take a while as Heroku deploys the application.
git push heroku develop:master
  1. Create a superuser when prompted. The superuser can be used to manage your site content.
heroku run python manage.py syncdb
  1. Finish setting up the database.
heroku run python manage.py migrate
  1. Check out your newly deployed site!
heroku open

Setting SECRET_KEY

You need to generate a random 50-character secret key to use for your Umonya deployment. After doing that, use it in production by setting an environment variable called DJANGO_SECRET_KEY. Step 5 above shows how to do it using the Heroku CLI. Do NOT use SECRET_KEY in https://github.com/Umonya/website/blob/develop/website/settings/dev.py since it is visible to the public. It it only there for dev convenience.

website's People

Contributors

rizziepit avatar sw00 avatar

Watchers

 avatar James Cloos avatar Ryan Harmuth avatar Zoid avatar  avatar  avatar  avatar

website's Issues

Build test suite

Test all the things

Here lies d̶r̶a̶g̶o̶n̶s̶ a testing strategy.

Unit Tests

  1. Models:
    • tests only when model properties have complex behavior
    • test only exposed public members
  2. Forms:
    • necessary
  3. Views:
    • optional at this stage, views only return html and RequestContext

Functional Tests

Should be based on user stories. Can use Selenium later, at this stage mocking RequestContext should be fine.

Negative Tests

Invalid requests, form submission should return the correct HTTP error code/page.

  1. Models
    • unnecessary, we trust Django's ModelProperties.
  2. Forms
    • test form validation
    • boundary testing to make sure there are no vulnerabilities
  3. Views
    • not sure how to negative test Views.

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.