Git Product home page Git Product logo

1327's Introduction

1327

Build Status Requirements Status Codacy Badge Coverage Status

A student representatives website. This project is live! You can see a working instance of 1327 here!

Development

You need to download the source code of 1327 to contribute:

git clone https://github.com/fsr-de/1327.git

Freshly created code needs to be tested - besides our use of unit tests, linting and continous integration, it is possible to run the application in a non-production environment using Vagrant or a Virtual Environment.

1327 requires Python 3.6 or higher.

Vagrant

You can simply set up an execution environment using vagrant:

vagrant up

This will set up a virtual machine and run it. Running this for the first time might take a while.

To connect to it and start the application do:

vagrant ssh
# This will take you inside the virtual machine
./manage.py run

At that point you created a vagrant box, running a PostgreSQL database server, Apache web server and the Django application. The contents are available on the default port 8000, which allows you to access the website at http://localhost:8000.

To login with your local user instead of the default OpenID login, you have to visit http://localhost:8000/login?local_login=1

Virtual Environment

Another way of executing this django application is the use of a virtual python environment. This way bypasses the needs for a virtual machine and simplifies the life with multiple python versions installed.

Before creating a virtual environment, make sure to use Python 3.6 or higher:

python --version
# example output
Python 3.6.0

Now you can create a virtual environment with that python version:

python -m venv env
source env/bin/activate
pip install -r requirements-dev.txt
python manage.py migrate
python manage.py createsuperuser --username=admin
python manage.py run

After you're done with these steps, you'll need to install all static dependencies via Yarn.

  1. Install Yarn
  2. go into the directory static
  3. run the command yarn

Troubleshooting

Error Solution
Fatal error: Python.h: No such file or directory Are you on a Debian system (e.g. Ubuntu)? Debian doesn't install development tools by default. Since some of the 1327 dependencies need to be compiled, we need those. You need to install them in your system, e.g. for Python 3.6 via sudo apt-get install python3.6-dev, and then recreate the virtual environment.

Deployment

For deploying on a single machine 1327 you'll need to install all requirements from requirements.txt, and you can follow these instructions, for setting up a webserver and starting all scripts using a Process Control System, if you like. You'll also need to setup yarn, as indicated in the last section.

License

The software is licensed under the terms of the MIT license. Please note that non-MIT-licensed contents might be part of this repository.

1327's People

Contributors

janno42 avatar bartzi avatar invlid avatar nef10 avatar karyon avatar hendraet avatar jeriox avatar loadingbyte avatar kaifabian avatar paula-kli avatar felixrindt avatar silvanverhoeven avatar t4rika avatar pfischbeck avatar cmfcmf avatar dependabot[bot] avatar julkw avatar merlindlh avatar tzwenn avatar gritfessel avatar l--f avatar

Stargazers

 avatar

Watchers

 avatar 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.