Browse Source

finalized README, composefile

b_overhaul
crunch 2 weeks ago
parent
commit
94d9a8476d
15 changed files with 32 additions and 23 deletions
  1. +19
    -4
      README.md
  2. +0
    -0
      dev/Consulta.bsdesign
  3. +0
    -0
      dev/compile_&_bundle.sh
  4. +0
    -0
      dev/create_superuser.sh
  5. +0
    -0
      dev/install_django_env.sh
  6. +0
    -0
      dev/load_fixtures.sh
  7. +0
    -0
      dev/migrate_db.sh
  8. +0
    -0
      dev/open_shell.sh
  9. +6
    -0
      dev/requirements.txt
  10. +0
    -0
      dev/start_dev-env.sh
  11. +5
    -0
      dev/superuser_info.txt
  12. +2
    -2
      docker-compose.yml
  13. +0
    -14
      utils/django_factory.py
  14. +0
    -1
      utils/pw.txt
  15. +0
    -2
      utils/set_prod-env.sh

+ 19
- 4
README.md View File

@@ -4,7 +4,7 @@

*Consulta* is built with [Django](https://www.djangoproject.com/), a Python Web Framework.

**Notice**: You will find documents related to this project such as a PowerPoint presentation and written report in */Misc*. Conceptual wireframes can be found in */Wireframing*
**Notice**: You will find documents related to this project such as a PowerPoint presentation and written report in */Misc*. Conceptual wireframes can be found in */Wireframing*.

### Features
- User Management (superuser, anonymous user, registered user)
@@ -12,7 +12,7 @@
- Deployment via Docker
- Poll Editor (`http://$HOST/editor`)
- Sharing via QR Code (`http://$HOST/polls/$POLL_NAME/share`)
- Poll Stats via [Chart.js](https://www.chartjs.org/) (`dir: /Consulta_project/polls/js/stats.js`)
- Poll Stats via [Chart.js](https://www.chartjs.org/) (directory: `/Consulta_project/polls/js/stats.js`)
- Minimal REST API (`http://$HOST/api`) via [Django REST Framework](https://www.django-rest-framework.org/)
- Embeddable into Apple Keynote, Microsoft Powerpoint via [LiveSlides](http://liveslides.com) Chromium WebView
- Routes for toggling Poll being locked (incl. browser redirect)
@@ -22,15 +22,30 @@ Requirements:
- [Docker](https://www.docker.com/) & [Docker-Compose](https://docs.docker.com/compose/)

Setup:
- `git clone https://git.reinkober-it.de/crunch/Consulta.git`
- `docker-compose up`

Usage:
1. Visit [127.0.0.1](http://127.0.0.1)
2. Login as user "root" with the password "abc"

2. Login as the following user:

*username*: root

*password*: gA3ihPn94Siq8KFdoNdzJLbJ56pK8RyJ5mtSerZ

3. Visit the Poll Editor

4. Create a Poll with a couple of Questions, then click on "Save"

5. Select "Questions" in the Editor Interface

6. Add Answers to your Questions, then click "Save"

7. Click on "View Site" in the upper right corner

8. Have a look at your created poll
9. Vote, Share or look at your Poll's stats

9. Vote, Share or look at your Poll's stats

*Tip*: If your Poll's name is written in grey on the polls site, try unlocking it in the Editor.

utils/Consulta.bsdesign → dev/Consulta.bsdesign View File


utils/compile_&_bundle.sh → dev/compile_&_bundle.sh View File


utils/create_superuser.sh → dev/create_superuser.sh View File


utils/install_django_env.sh → dev/install_django_env.sh View File


utils/load_fixtures.sh → dev/load_fixtures.sh View File


utils/migrate_db.sh → dev/migrate_db.sh View File


utils/open_shell.sh → dev/open_shell.sh View File


+ 6
- 0
dev/requirements.txt View File

@@ -0,0 +1,6 @@
Django>=2.2,<2.3
django-qr-code>=1.1,<1.2
django-guardian>=2.2.0,<2.3.0
djangorestframework>=3.11.0,<3.12.0
django-cors-headers>=3.2.0,<3.3.0
django-registration>=3.1.0.,<3.2.0

utils/start_dev-env.sh → dev/start_dev-env.sh View File


+ 5
- 0
dev/superuser_info.txt View File

@@ -0,0 +1,5 @@
{
# Default Superuser, loaded with fixtures
name: root
password: gA3ihPn94Siq8KFdoNdzJLbJ56pK8RyJ5mtSerZ
}

+ 2
- 2
docker-compose.yml View File

@@ -28,8 +28,8 @@ services:
http_net:
ipv4_address: 172.16.238.10
volumes:
#- /etc/letsencrypt/live/reinkober-it.de/cert.pem:/etc/letsencrypt/live/reinkober-it.de/cert.pem
#- /etc/letsencrypt/live/reinkober-it.de/privkey.pem:/etc/letsencrypt/live/reinkober-it.de/privkey.pem
#- /etc/letsencrypt/live/$DOMAIN/cert.pem:/etc/letsencrypt/live/$DOMAIN/cert.pem
#- /etc/letsencrypt/live/$DOMAIN/privkey.pem:/etc/letsencrypt/live/$DOMAIN/privkey.pem
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./static_cdn/static_root:/static
#- ./static_cdn/media:/media


+ 0
- 14
utils/django_factory.py View File

@@ -1,14 +0,0 @@
import requests
from requests.auth import HTTPBasicAuth

data = {
"name": "Fest Poll",
"semester": "WS 2019",
"topic": "Generic Topic",
"lecture": "Cool Lecture"
}

user = 'dennis'
password = 'abc'

r = requests.post('https://127.0.0.1/api/polls', data, auth=(user, password))

+ 0
- 1
utils/pw.txt View File

@@ -1 +0,0 @@
gA3ihPn94Siq8KFdoNdzJLbJ56pK8RyJ5mtSerZ

+ 0
- 2
utils/set_prod-env.sh View File

@@ -1,2 +0,0 @@
source ../DjangoEnv/bin/activate
export DJANGO_SETTINGS_MODULE=Consulta_project.settings

Loading…
Cancel
Save