Skip to content

Commit

Permalink
Merge pull request #21 from OpenGovAus/overhaul-1
Browse files Browse the repository at this point in the history
Overhaul of stupid bad code
  • Loading branch information
king-millez authored Jan 15, 2022
2 parents bf31354 + 983cff5 commit 308eb20
Show file tree
Hide file tree
Showing 66 changed files with 22,622 additions and 922 deletions.
Binary file added .github/img/f11-ss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ secrets.py
__pycache__
db.sqlite3
media
migrations/
poetry.lock

# Backup files #
*.bak
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Submit a pull request when you've finished working on your desired feature, issu

Your request won't be merged until at least two of us have had a look through your PR and approved it.

If you submit anything that deliberately opens up security risks, **don't expect to be submitting anything else in the future**.
If you submit anything that deliberately opens up security risks, **don't expect to be submitting anything else in the future**.
57 changes: 23 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# legistream (legistream-site)

![Legistream Screenshot](/gh-images/f11-ss.png)
![Legistream Screenshot](/.github/img/f11-ss.png)

Legistream is the easiest way to stream Australian parliaments live. Legistream bypasses the need to use the often slow and outdated state/territory parliament websites, streamlining the experience. Legistream also bypasses the need to use a Flash player on both the NT and QLD websites, offering a more secure viewing option for people interested in those jurisdictions.

Expand All @@ -14,40 +14,19 @@ Legistream uses our Python package [legistream-backend](https://github.com/OpenG

You can find instructions for different hosts [here](https://www.rabbitmq.com/download.html).

## Virtual Environment
## Poetry

Begin by setting up a virtual environment:
Install `poetry` with `pip`:

```sh
pip3 install virtualenv
```
```sh
virtualenv legistr_venv
```

##### Windows

```sh
legistr_venv/Scripts/activate
```

##### Linux/MacOS

```sh
source legistr_venv/bin/activate
```

You should now be loaded into the virtual environment, and your terminal should look like this:

```
(legistr_venv) /.../git/legistream-site/ >
```
```sh
pip3 install poetry
```

## Install Dependencies

```sh
pip3 install -r requirements.txt
```
```sh
poetry update
```

## Create secrets.py

Expand Down Expand Up @@ -79,25 +58,35 @@ DEBUG = True
On first run:

```sh
python3 manage.py migrate
poetry run python3 manage.py makemigrations legistream
```

```sh
poetry run python3 manage.py migrate
```

Clear pending tasks:

```sh
poetry run celery -A legistream_site purge
```

Start the Celery worker:

```sh
celery -A legistream_site worker -l info --pool=solo
poetry run celery -A legistream_site worker -l info --pool=solo
```

Start Celery Beat:

```sh
celery -A legistream_site beat -l info
poetry run celery -A legistream_site beat -l info
```

To run the server, use this command:

```sh
python3 manage.py runserver --insecure
poetry run python3 manage.py runserver --insecure
```

If you get any errors, make sure you've set up your virtual environment correctly and that you've installed all the required dependencies.
Expand Down
Binary file removed docs/Adobe XD Mockups/00. Mock 1.png
Binary file not shown.
Binary file removed docs/Adobe XD Mockups/00. Mock 2.png
Binary file not shown.
13 changes: 0 additions & 13 deletions docs/Homepage Info.md

This file was deleted.

Binary file not shown.
Binary file removed docs/Legistream Development/02. Basic CSS.mp4
Binary file not shown.
Binary file removed docs/Legistream Development/03. Dark CSS.PNG
Binary file not shown.
Binary file removed docs/Legistream Development/04. Near 1.0 styles.mp4
Binary file not shown.
Binary file not shown.
Binary file removed docs/Legistream Development/06. NT stream demo.mp4
Binary file not shown.
Binary file removed gh-images/doc-img/live-now.png
Binary file not shown.
Binary file removed gh-images/f11-ss.png
Binary file not shown.
9 changes: 9 additions & 0 deletions legistream/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os
import inspect
import legistream_backend


modpath = f'{os.path.dirname(inspect.getfile(legistream_backend))}/site/'

module_list = [os.path.splitext(f)[0] for f in os.listdir(modpath)
if os.path.isfile(os.path.join(modpath, f))]
10 changes: 0 additions & 10 deletions legistream/act.py

This file was deleted.

3 changes: 0 additions & 3 deletions legistream/admin.py

This file was deleted.

24 changes: 0 additions & 24 deletions legistream/fed.py

This file was deleted.

Empty file removed legistream/migrations/__init__.py
Empty file.
4 changes: 3 additions & 1 deletion legistream/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from django.db import models

# Create your models here.

class Streams(models.Model):
streams_dict = models.CharField(max_length=300)
16 changes: 0 additions & 16 deletions legistream/nsw.py

This file was deleted.

21 changes: 0 additions & 21 deletions legistream/nt.py

This file was deleted.

10 changes: 0 additions & 10 deletions legistream/qld.py

This file was deleted.

12 changes: 0 additions & 12 deletions legistream/sa.py

This file was deleted.

Binary file removed legistream/static/legistream/aud/the-kevin.mp3
Binary file not shown.
75 changes: 75 additions & 0 deletions legistream/static/legistream/css/home-content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#home-info {
position: absolute;
top: calc(100% - 10px);
z-index: -1;
}
#scroll-top {
rotate: 90deg;
position: absolute;
border-radius: 15px;
bottom: 65px;
right: 35px;
padding-left: 20px;
}
#scroll-top:hover {
color: rgb(68, 219, 78);
cursor: pointer;
}
#scroll-top img {
height: 30px;
padding-top: 22%;
}
#info-block {
width: 48%;
}
#info-block h1, #info-block h2 {
font-family: gilroy;
}
#info-block h1 {
font-size: 300%;
}
#info-block h2 {
font-size: 200%;
margin-top: 20px;
}
#info-block p {
font-family: pn-light;
font-size: 150%;
}
#info-block a {
color: rgb(68, 219, 78);
}
#info-block a:hover {
color: rgb(49, 161, 57);
}
.dark-div {
display: flex;
background-color: rgb(16,16,16);
width: 100%;
align-items: center;
flex-direction: column;
padding-bottom: 50px;
}
#grn-break {
width: 100%;
height: 10px;
background-color: rgb(68, 219, 78);
margin-bottom: 50px;
}
#grn-break:hover {
cursor: pointer;
}
@media only screen and (min-resolution: 117dpi) and (max-resolution: 119dpi), only screen and (min-resolution: 131dpi) and (max-resolution: 133dpi), only screen and (min-resolution: 145dpi) and (max-resolution: 154dpi), only screen and (min-resolution: 162dpi) and (max-resolution: 164dpi), only screen and (min-resolution: 169dpi) {
#info-block p {
font-size: 110%;
}
#info-block {
width: 70%;
}
#scroll-top {
margin-right: -30px;
}
#scroll-top img {
height: 15px;
}
}
Loading

0 comments on commit 308eb20

Please sign in to comment.