Skip to content

Commit f7deaa1

Browse files
Merge branch 'main' into feature/volunteer-languages-templatetag
2 parents 87132dd + ffa8367 commit f7deaa1

File tree

4 files changed

+1048
-51
lines changed

4 files changed

+1048
-51
lines changed

docs/developer/howto.md

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,47 @@ docker-compose logs -f
1515

1616
## Creating Migration Files
1717

18-
With docker:
18+
=== "With Docker"
1919

20-
```
21-
make manage makemigrations
22-
```
20+
```
21+
make manage makemigrations
22+
```
2323

24-
Without Docker
24+
=== "Without Docker"
2525

26-
```
27-
python manage.py makemigrations
28-
```
26+
```
27+
python manage.py makemigrations
28+
```
2929

3030
## Running Migrations
3131

32-
With docker:
32+
=== "With Docker"
3333

34-
```
35-
make manage migrate
36-
```
34+
```
35+
make manage migrate
36+
```
3737

38-
Without Docker
38+
=== "Without Docker"
3939

40-
```
41-
python manage.py migrate
42-
```
40+
```
41+
python manage.py migrate
42+
```
4343

4444
## Emails in local env
4545

4646
When you sign up you'll receive an email with a code to verify your account. In Development those emails don't leave your machine so here's the steps to get the code.
4747

48-
### With Docker
48+
=== "With Docker"
4949

50-
The docker compose development environment includes a
51-
[maildev](https://maildev.github.io/maildev/)
52-
instance for previewing emails locally.
50+
The docker compose development environment includes a
51+
[maildev](https://maildev.github.io/maildev/)
52+
instance for previewing emails locally.
5353

54-
It is accessible at <http://localhost:1080> and will show all emails sent by the application.
54+
It is accessible at <http://localhost:1080> and will show all emails sent by the application.
5555

56-
### Without Docker
56+
=== "Without Docker"
5757

58-
Check your terminal, the email will be printed out for you.
58+
Check your terminal, the email will be printed out for you.
5959

6060
## Set up your Account as a Staff user
6161

@@ -66,17 +66,17 @@ Check your terminal, the email will be printed out for you.
6666
5. Your account is now verified.
6767
6. On the terminal, go to Django shell:
6868

69-
With Docker:
69+
=== "With Docker"
7070

71-
```
72-
make manage shell
73-
```
71+
```
72+
make manage shell
73+
```
7474

75-
Without Docker
75+
=== "Without Docker"
7676

77-
```
78-
python manage.py shell
79-
```
77+
```
78+
python manage.py shell
79+
```
8080

8181
7. Set your account as a staff and superuser:
8282

@@ -147,39 +147,45 @@ LANGUAGES = (
147147
```
148148

149149
2. Then you should run the `makemessages` command:
150-
1. With Docker:
151-
```
152-
make create_translations LANG=<locale-code>
153-
```
154150

155-
For example for Brazilian Portuguese:
151+
=== "With Docker"
156152

157-
```
158-
make create_translations LANG=pt_BR
159-
```
153+
```
154+
make create_translations LANG=<locale-code>
155+
```
160156

161-
2. Without Docker:
162-
```
163-
python manage.py makemessages -l <locale-code>
164-
```
157+
For example for Brazilian Portuguese:
165158

166-
For example for Brazilian Portuguese:
159+
```
160+
make create_translations LANG=pt_BR
161+
```
167162

168-
```
169-
python manage.py makemessages -l pt_BR
170-
```
163+
=== "Without Docker"
164+
165+
```
166+
python manage.py makemessages -l <locale-code>
167+
```
168+
169+
For example for Brazilian Portuguese:
170+
171+
```
172+
python manage.py makemessages -l pt_BR
173+
```
171174

172175
Note that for the creation of new languages we use ISO/IEC 15897 for formatting the language tag.
173176

174177
3. Translate a couple of messages in the generated `.po` file;
175178

176-
4. Then complile the translations:
177-
1. With Docker:
179+
4. Then compile the translations:
180+
181+
=== "With Docker"
182+
178183
```
179184
make compile_translations
180185
```
181186

182-
2. Without Docker:
187+
=== "Without Docker"
188+
183189
```
184190
python manage.py compilemessages
185191
```

docs/developer/setup.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,36 @@ Then run the server:
199199
python manage.py runserver
200200
```
201201

202+
## Generate Sample Data (Optional)
203+
204+
For local development and testing, you can generate sample data to populate your database with realistic test content. This command creates:
205+
206+
- **9 Users**: 1 admin, 1 staff member, 5 volunteers, and 2 sponsor contacts
207+
- **8 PyLadies Chapters**: Chapters from different regions globally (San Francisco, NYC, London, Berlin, Tokyo, São Paulo, Lagos, Sydney)
208+
- **7 Volunteer Roles**: Frontend Dev, Backend Dev, Content Writer, Social Media Manager, Designer, Reviewer, Event Coordinator
209+
- **6 Teams**: Website, Social Media, Content, Design, Program Committee, Sponsorship
210+
- **5 Volunteer Profiles**: With various application statuses (approved, pending, waitlisted, rejected)
211+
- **5 Sponsorship Tiers**: Ranging from $2,500 to $25,000
212+
- **5 Sponsorship Profiles**: With different progress statuses
213+
214+
**Important**: This command only works when `DEBUG=True` in your settings to prevent accidental use in production environments.
215+
216+
=== "With Docker"
217+
218+
```sh
219+
make manage generate_sample_data
220+
```
221+
222+
=== "Without Docker"
223+
224+
```sh
225+
python manage.py generate_sample_data
226+
```
227+
228+
All generated users have the password: `password123`.
229+
230+
The command is idempotent, meaning you can run it multiple times without creating duplicate data.
231+
202232
## Documentation Setup
203233

204234
The documentation is built using [MKDocs](https://www.mkdocs.org/) and markdown.

0 commit comments

Comments
 (0)