You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-4Lines changed: 72 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,25 +19,43 @@
19
19
- Automatic control of confirmation, expiration and cancellation flows 🔄
20
20
- Django Admin dashboard to manually edit applications, reimbursement and users 👓
21
21
- Flexible email backend (SendGrid is the default and recommended supported backend) 📮
22
+
- CAS server for other platforms
22
23
- (Optional) Separate applications from dubious hackers to manually contact them 🧐
23
24
- (Optional) Automated slack invites on confirm #️⃣
24
25
- (Optional) MyMLH sign up 📥
25
-
- CAS server for other platforms
26
-
26
+
- (Optional) Google Wallet Pass API Integration
27
27
28
28
29
29
## Setup
30
30
31
31
Needs: Python 3.X, virtualenv
32
32
33
-
-`git clone https://github.com/hackupc/registration && cd registration`
33
+
Stable at v. 3.8.10
34
+
35
+
-`git clone https://github.com/hackupc/myhackupc && cd myhackupc`
34
36
-`virtualenv env --python=python3`
35
37
-`source ./env/bin/activate`
36
38
-`pip install -r requirements.txt`
37
39
- (Optional) If using Postgres, set up the necessary environment variables for its usage before this step
38
40
-`python manage.py migrate`
39
41
-`python manage.py createsuperuser` (creates super user to manage all the app)
40
42
43
+
### FAQ
44
+
**The library backports.zoneinfo fails to install**
45
+
If you are experiencing an error similar to this one:
46
+
47
+
``
48
+
ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
49
+
``
50
+
51
+
Plase make sure to use *Python **3.8.10***
52
+
53
+
54
+
**The library Pillow fails to install**
55
+
Ths did the trick (note the python and -m flag are placed in purpouse to make sure you install it using the correct virtualenv python version):
56
+
```
57
+
python -m pip install --upgrade Pillow
58
+
```
41
59
42
60
### Dummy data
43
61
@@ -62,6 +80,10 @@ You can replace the email backend easily. See more [here](https://djangopackages
62
80
-**SL_BOT_DIRECTOR2**(optional): User ID of the other director.
63
81
-**MLH_CLIENT_SECRET**(optional): Enables MyMLH as a sign up option. Format is `client_id@client_secret` (See "Set up MyMLH" below)
64
82
-**CAS_SERVER**(optional): Enables login for other platforms
83
+
-**GOOGLE_WALLET_APPLICATION_CREDENTIALS**(optional): The path to the json key file containing all google-related API credentials
84
+
-**GOOGLE_WALLET_ISSUER_ID**(optional): The issuer ID of Google Wallet Pass API
85
+
-**GOOGLE_WALLET_CLASS_SUFFIX**(optional): The name of the class created at the [Google Wallet Console](https://pay.google.com/business/console/passes/)
86
+
65
87
66
88
67
89
## Server
@@ -178,6 +200,50 @@ In that direction the approach taken is to extract fields and use them for the a
178
200
179
201
Note that to test locally you will need to add a line where `DOMAIN` is `localhost:8000`.
180
202
203
+
#### Set up Google Wallet Pass API
204
+
1. Sign up for a Google Wallet API Issuer account. [Click here](https://pay.google.com/business/console)
205
+
2. Enable the Wallet API
206
+
- Sign into the [Google Cloud Platform](https://console.cloud.google.com/) and enable the Google Wallet API for your GCP project.
207
+
- If you don’t already have a GCP project, create one.
208
+
- Enable the [Google Wallet API](https://console.cloud.google.com/apis/library/walletobjects.googleapis.com).
209
+
3. Create a service account and export its keys into a json file
210
+
- Create a service account:
211
+
212
+
1.[Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts/create) in the Google Cloud Console, providing the following details:
2. Click on the **KEYS** menu item at the top of the page.
222
+
3. Click **ADD KEY** and Create new key.
223
+
4. Select key type **JSON**.
224
+
5. Click **CREATE** to create and download the service account key.
225
+
226
+
> **Remember** to set the **GOOGLE_WALLET_APPLICATION_CREDENTIALS** enviroment variable as the correct path of this Json file, which is recommended to be set on the root of the hosted project to make sure read perms are ok
227
+
228
+
4. Authorize the service account
229
+
230
+
You must authorize the service account in order to call the API. To authorize it, grant the service account access to manage your Issuer Account.
231
+
232
+
Visit the Users page in the [Google Pay and Wallet Console](https://pay.google.com/business/console).
233
+
1. Click Invite a **user**.
234
+
2. Add the service account's email address. For example: ``[email protected]``.
235
+
3. Select **Developer** for Access level.
236
+
4. Click **Invite**.
237
+
238
+
5. Create a class
239
+
Enter to the [Google Wallet Console](https://pay.google.com/business/console/passes/) and click on **create class** with type **GENERIC** (it is very important to be generic-type, otherwise it won't work).
240
+
241
+
>Fill the gaps and click on create, make sure to remember the **CLASS_ID** value since it is the **GOOGLE_WALLET_CLASS_SUFFIX** you'll need to set up on the enviroment variables.
242
+
243
+
>At this point you can also set the **GOOGLE_WALLET_ISSUER_ID** enviroment variable, which Google tells you when visiting the [Google Wallet Console](https://pay.google.com/business/console/passes/)
244
+
245
+
246
+
181
247
#### Set up nginx
182
248
183
249
Needs: Nginx
@@ -300,10 +366,12 @@ You can change the form, titles, texts in [applications/forms.py](applications/f
300
366
#### Update application model
301
367
If you need extra labels for your hackathon, you can change the model and add your own fields.
302
368
303
-
-Update model with specific fields: [applications/models.py](applications/models.py)
369
+
-Create a file inside the application/models folder, and update the model with specific fields (see already created examples): [applications/models.py](applications/models/__init__.py)
304
370
-`python manage.py makemigrations`
305
371
-`python manage.py migrate`
306
372
373
+
374
+
307
375
# Want to Contribute?
308
376
Read these [guidelines](.github/CONTRIBUTING.md) carefully.
0 commit comments