Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR code validation #677

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
074fda5
Ticket model
cphalen Dec 13, 2021
4171a61
some basic untested functionality
rohangpta Jan 16, 2022
ef872be
tested routes, added view ticket count route
rohangpta Jan 16, 2022
c55fd75
lint
rohangpta Jan 16, 2022
2d0db0d
email confirmation, qrcode, retrieve ticket
rohangpta Nov 12, 2022
7240a11
remove commented stuff
rohangpta Jan 17, 2022
ae99446
created cart model and add to cart, validate cart, and checkout from …
rohangpta Nov 12, 2022
0a975fb
added holding expiration functionality, holding is initiated at check…
Dfeng6789 Feb 20, 2022
7fe194d
lint and tests
Dfeng6789 Feb 20, 2022
ac0975a
added cart creation for a user upon adding to a cart if a cart does n…
Dfeng6789 Feb 20, 2022
c69254a
slightly changed holding updates, added update to holding status when…
Dfeng6789 Feb 27, 2022
5382f48
atomic transactions, cleanup, and some views
rohangpta Nov 12, 2022
6508a97
holding, validation improvements, perms
rohangpta Jul 6, 2022
9610747
some docstring stuff
rohangpta Oct 16, 2022
c9fb115
rebase + pipfile lock
rohangpta Oct 16, 2022
1b0bda8
use master pipfile.lock
rohangpta Oct 16, 2022
094ad42
lint and pre-commit fixes
rohangpta Oct 16, 2022
d67a3a6
minor bugs
rohangpta Oct 16, 2022
a352b01
add to populate script
rohangpta Nov 12, 2022
7367db1
lint
rohangpta Nov 12, 2022
7f650dc
rebase, fix some documentation
rohangpta Nov 12, 2022
03214af
Update ticketing (backend) branch (#612)
aviupadhyayula Feb 13, 2024
50b9c0b
Revert "Update ticketing (backend) branch (#612)"
julianweng Feb 16, 2024
80e8201
Merge ticketing branches (#615)
julianweng Mar 4, 2024
22968db
Merge master into ticketing
julianweng Mar 4, 2024
91b1df9
Fix TS errors
julianweng Mar 4, 2024
580be09
Update Links to new Next.js behavior
anli5005 Mar 20, 2024
6151c4f
Merge branch 'master' into ticketing
esinx Apr 13, 2024
a40e469
missed merge conflict
esinx Apr 13, 2024
20d250d
migrations
esinx Apr 13, 2024
428dd7e
Ticketing integrate cybersource -> ticketing (#652)
rohangpta Apr 14, 2024
b911872
Set and enforce order limit on ticket purchases (#654)
aviupadhyayula Apr 14, 2024
4af8765
Check ticket holds before completing checkout (#657)
aviupadhyayula Apr 15, 2024
5880d7c
Ticketing price integration (#659)
julianweng Apr 16, 2024
125905a
feat(events): new events page
esinx Apr 16, 2024
a8059d3
todo remove
esinx Apr 16, 2024
c32bbba
Merge branch 'feat/ticketing/cart' into ticketing
esinx Apr 16, 2024
3a8829d
Add support for group discounts (#661)
aviupadhyayula Apr 16, 2024
27ac7c6
Owned Tickets Tab in Settings (#663)
joyliu-q Apr 16, 2024
40fb7f7
Ticketing backend tests (#666)
rohangpta Apr 18, 2024
6f75d48
Rm console.log on frontend
rohangpta Apr 18, 2024
20f68ab
Add Group Discount to Create Ticket Flow and Auto Scroll Down (#669)
joyliu-q Apr 21, 2024
78f02fd
Use capture context in cart checkout (#671)
aviupadhyayula Apr 21, 2024
b83fe1a
first pass
rm03 Apr 22, 2024
7cdb450
fix doc
rm03 Apr 22, 2024
4bde09e
remove B2B IPC
rm03 Apr 24, 2024
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ htmlcov/
# Test database
db.sqlite3

# Mac
# Misc
.DS_Store
*.pem

# React
node_modules/
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ React/Next.js frontend and Django-based REST API.

## Installation

You will need to start both the backend and the frontend to do Penn Clubs development.

You will need to start both the backend and the frontend to develop on Penn Clubs. Clubs supports Mac and Linux/WSL development.

Questions? Check out our [extended guide](https://github.com/pennlabs/penn-clubs/wiki/Development-Guide) for FAQs.
Expand Down Expand Up @@ -84,3 +86,13 @@ Use `$ yarn test` to run Cypress tests.
### Development

Click `Login` to log in as a test user. The `./manage.py populate` command creates a test user for you with username `bfranklin` and password `test`. Go to `/api/admin` to login to this account.

#### Ticketing

To test ticketing locally, you will need to [install](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation) `mkcert`, enter the `frontend` directory, and run the following commands:

- `$ mkcert -install`
- `$ mkcert localhost 127.0.0.1 ::1`
- `$ export DOMAIN=https://localhost:3001 NODE_TLS_REJECT_UNAUTHORIZED=0`

Then, after the frontend is running, run `yarn ssl-proxy` **in a new terminal window** and access the application at [https://localhost:3001](https://localhost:3001).
4 changes: 3 additions & 1 deletion backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ django-runtime-options = "*"
social-auth-app-django = "*"
django-redis = "*"
channels-redis = "*"
uwsgi = {version = "*", sys_platform = "== 'linux'"}
uwsgi = {version ="==2.0.24", sys_platform = "== 'linux'"}
uvloop = {version = "*", sys_platform = "== 'linux'"}
uvicorn = {extras = ["standard"], version = "*"}
gunicorn = "*"
Expand All @@ -54,6 +54,8 @@ pandas = "*"
drf-excel = "*"
numpy = "*"
inflection = "*"
cybersource-rest-client-python = "*"
pyjwt = "*"

[requires]
python_version = "3.11"
146 changes: 96 additions & 50 deletions backend/Pipfile.lock

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

6 changes: 6 additions & 0 deletions backend/clubs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ApplicationSubmission,
Asset,
Badge,
Cart,
Club,
ClubApplication,
ClubFair,
Expand Down Expand Up @@ -50,6 +51,8 @@
TargetStudentType,
TargetYear,
Testimonial,
Ticket,
TicketTransactionRecord,
Year,
ZoomMeetingVisit,
)
Expand Down Expand Up @@ -451,4 +454,7 @@ class ApplicationSubmissionAdmin(admin.ModelAdmin):
admin.site.register(Year, YearAdmin)
admin.site.register(ZoomMeetingVisit, ZoomMeetingVisitAdmin)
admin.site.register(AdminNote)
admin.site.register(Ticket)
admin.site.register(TicketTransactionRecord)
admin.site.register(Cart)
admin.site.register(ApplicationCycle)
33 changes: 33 additions & 0 deletions backend/clubs/management/commands/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ApplicationQuestion,
ApplicationSubmission,
Badge,
Cart,
Club,
ClubApplication,
ClubFair,
Expand All @@ -28,6 +29,7 @@
StudentType,
Tag,
Testimonial,
Ticket,
Year,
)

Expand Down Expand Up @@ -759,4 +761,35 @@ def get_image(url):
first_mship.save()
count += 1

# Add tickets

hr = Club.objects.get(code="harvard-rejects")

hr_events = Event.objects.filter(club=hr)

for idx, e in enumerate(hr_events[:3]):
# Switch up person every so often
person = ben if idx < 2 else user_objs[1]

# Create some unowned tickets
Ticket.objects.bulk_create(
[Ticket(event=e, type="Regular", price=10.10) for _ in range(10)]
)

Ticket.objects.bulk_create(
[Ticket(event=e, type="Premium", price=100.10) for _ in range(5)]
)

# Create some owned tickets and tickets in cart
for i in range((idx + 1) * 10):
if i % 5:
Ticket.objects.create(
event=e, owner=person, type="Regular", price=i
)
else:
c, _ = Cart.objects.get_or_create(owner=person)
c.tickets.add(
Ticket.objects.create(event=e, type="Premium", price=i)
)

self.stdout.write("Finished populating database!")
Loading
Loading