Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7b98e2a
Basic detail petition view
garoller Mar 27, 2019
f15ac72
Add content and style to detail view
garoller Apr 2, 2019
2bfc21c
Run python black
garoller Apr 2, 2019
1f5350e
Install django cas
garoller Apr 5, 2019
84ea016
Run black
garoller Apr 5, 2019
8eb37f1
Switch to use django built in user model
garoller Apr 5, 2019
6be1fef
Add sign, login, and logout
garoller Apr 5, 2019
c6b30b0
Add signature view
garoller Apr 5, 2019
282d582
Use template tag for signing
garoller Apr 5, 2019
55e876d
Use custom CAS backend to check RPI student status
garoller Apr 5, 2019
3720a9b
Updated front end
garoller Apr 5, 2019
a144137
Fix padding
garoller Apr 9, 2019
db7060e
Fix custom CAS backend
garoller Apr 9, 2019
7bd86b4
Check if user already signed and is logged in
garoller Apr 9, 2019
bca59c5
Remove user test
garoller Apr 9, 2019
6ecab79
Run black
garoller Apr 9, 2019
8ea8ec4
Run index tests
garoller Apr 9, 2019
bf11dc8
Change test package
garoller Apr 9, 2019
ce5fc50
Switch to xenial python 3.6
garoller Apr 9, 2019
8db7e85
Don't bold the petition author
garoller Apr 10, 2019
836c07b
Fix comments
garoller Apr 10, 2019
dbc4f3e
Use a template tag to sign
garoller Apr 10, 2019
7c7bb3a
Use a form to sign
garoller Apr 11, 2019
ce98170
Update dependencies
garoller Apr 11, 2019
21c9d43
Add pipenv sync instructions
garoller Apr 11, 2019
08876f9
Store users on petitions through signatures
garoller Apr 16, 2019
8c4a2d4
Remove templatetags
garoller Apr 16, 2019
582eca4
Have author sign petition
garoller Apr 16, 2019
842a32a
Exclude signatures and id fields
garoller Apr 16, 2019
603731f
In debug mode, make all users superusers
garoller Apr 16, 2019
89fdadd
Exit if identity key isn't set
garoller Apr 16, 2019
7b9c091
Adjust for model changes and templatetag removal
garoller Apr 16, 2019
a7d917f
Run black
garoller Apr 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: python
matrix:
include:
- python: "3.6"
dist: trusty
dist: xenial
sudo: true
- python: "3.7"
dist: xenial
Expand All @@ -25,4 +25,4 @@ before_script:
- pipenv run black . --check

script:
- pipenv run python manage.py test
- pipenv run python manage.py test index
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ django = "~=2.1"
black = "==18.9b0"
dj-database-url = "*"
psycopg2 = "*"
django-cas-ng = "*"

[requires]
157 changes: 116 additions & 41 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Check the [Wiki](https://github.com/wtg/petitions-rewrite/wiki) for Django refer
pipenv install --python <python_version>
```

5. Activate the virtual environment ```pipenv shell```
5. Activate the virtual environment ```pipenv shell```.

Then run ```pipenv sync``` to install all necessary dependencies.

6. Set a secret key environment variable
```
Expand Down
2 changes: 1 addition & 1 deletion index/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TagAdmin(admin.ModelAdmin):


class PetitionAdmin(admin.ModelAdmin):
pass
exclude = ("created_date", "signatures")


admin.site.register(Tag, TagAdmin)
Expand Down
5 changes: 2 additions & 3 deletions index/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
class IndexConfig(AppConfig):
name = "index"


class ViewAllConfig(AppConfig):
name = "view_all"
def ready(self):
import index.signals
5 changes: 5 additions & 0 deletions index/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ class CreatePetitionForm(forms.ModelForm):
class Meta:
model = Petition
fields = ["title", "description", "tags"]


class SignPetitionForm(forms.Form):
sign_btn = forms.CharField()
pk = forms.IntegerField()
Loading