Skip to content

Commit 1711e75

Browse files
committed
Added all libraries docs
1 parent e009b76 commit 1711e75

18 files changed

+334
-110
lines changed

DEV.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
- Ip block on failed login tries & ip blocklist ✋ (Optional)
1515
- Dark mode 🌚 🌝 Light mode (Optional)
1616

17+
## Documentation
18+
19+
There's a really extended documentation for configurations or development of the application [here](/docs/README.md).
20+
1721
## Development
1822

1923
The development if this Django app can be made by Python or Docker-Compose.

docs/README.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,93 @@
11
# Documentation
22

33
Here is the full documentation for the project at the moment. We have divided it into two types: documentation for
4-
configuring applications and documentation for development utilities.
4+
configuration and documentation for development utilities.
55

6-
## Configuring applications
6+
<details><summary>
7+
8+
## Configuration
9+
</summary>
10+
11+
This configurations will be divided in application configurations and libraries configurations.
12+
13+
<details><summary>
14+
15+
### Apps
16+
</summary>
17+
18+
[//]: # (Stats, User, Event, Application, Meals, Review, Messages)
19+
20+
- **[Friends](configuration/friends.md)**: This optional app enables the participants to apply with their friends and then for the organizers to group their applications
21+
in order to invite all the friends.
22+
23+
</details>
24+
25+
<details><summary>
26+
27+
### Libraries
28+
</summary>
29+
30+
- **[Admin honeypot](configuration/admin_honeypot.md)**: Fake Django admin login screen to log and notify admins of attempted unauthorized access.
31+
- **[Allauth](configuration/allauth.md)**: Integrated set of Django applications addressing authentication, registration, account management as well as
32+
3rd party (social) account authentication.
33+
- **[Axes](configuration/axes.md)**: Axes is a Django plugin for keeping track of suspicious login attempts for your Django based website and implementing simple brute-force attack blocking.
34+
- **[Captcha](configuration/captcha.md)**: Django reCAPTCHA form field/widget integration app.
35+
- **[Colorfield](configuration/colorfield.md)**: Simple color field for your models with a nice color-picker in the admin-interface.
36+
- **[Compressor](configuration/compressor.md)**: Compresses linked and inline JavaScript or CSS into a single cached file.
37+
- **[Cors headers](configuration/corsheaders.md)**: A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses.
38+
- **[Crontab](configuration/crontab.md)**: Dead simple crontab powered job scheduling for django.
39+
- **[Django Bootstrap 5](configuration/django_filter.md)**: Bootstrap 5 for Django.
40+
- **[Django CSP](configuration/django_csp.md)**: Adds Content-Security-Policy headers to Django applications.
41+
- **[Django filter](configuration/django_filter.md)**: It allows users to filter down a queryset based on a model’s fields, displaying the form to let them do this.
42+
- **[Django JWT](configuration/django_jwt_oidc.md)**: Django library that implements the authentication for OpenId SSO with JWT from oauth2.
43+
- **[Django password validator](configuration/django_password_validators.md)**: Additional libraries for validating passwords in Django 2.2.25 or later.
44+
- **[Django tables 2](configuration/django_tables2.md)**: An app for creating HTML tables.
45+
46+
</details>
47+
</details>
48+
49+
<details><summary>
750

851
## Development utilities
52+
</summary>
953

1054
This utilities will be divided in generic utilities and app specific utilities.
1155

56+
<details><summary>
57+
1258
### Generic
59+
</summary>
60+
61+
[//]: # (Email, Utils.py, Nav, Theme, Tables, Singleton, Timezone)
1362

1463
- **[BootstrapFormMixin](utility/bootstrap_form_mixin.md)**: A utility to assist in the rendering of a form using Bootstrap 5.
1564
- **[TabsViewMixin](utility/tabs_view_mixin.md)**: A utility to help the creation of necessary methods for displaying a view with tabs, which will automatically render when used in your views.
1665
- **[PermissionRequiredMixin](utility/permission_required_mixin.md)**: Improvement of the Django PermissionRequiredMixin class. Inherit this if you create new permission mixins please.
1766

67+
</details>
68+
69+
<details><summary>
1870

1971
### App specific
72+
</summary>
73+
74+
#### Application
75+
76+
- **[Application Forms](utility/application_form.md)**: Generic class to create types of applications (Hacker, Mentor, etc.) that integrates automatically the forms with the Application Model.
77+
78+
#### Event.Messages
79+
80+
- **[MessageServiceManager](utility/messages.md)**: Explanation of how this services work and how to use it to send quick messages to the participants.
81+
82+
</details>
83+
84+
</details>
2085

21-
- **[Application Forms](utility/application_form.md) [Application App]**: Generic class to create types of applications (Hacker, Mentor, etc.) that integrates automatically the forms with the Application Model.
22-
- **[MessageServiceManager](utility/messages.md) [Event.Messages App]**: Explanation of how this services work and how to use it to send quick messages to the participants.
86+
<style>
87+
details summary > * {
88+
display: inline;
89+
}
90+
details {
91+
margin-top: 25px;
92+
}
93+
</style>

docs/configuration/admin_honeypot.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Django-admin-honeypot [+](https://django-admin-honeypot.readthedocs.io/en/latest/)
2+
3+
Fake Django admin login screen to log and notify admins of attempted unauthorized access.
4+
5+
## Features
6+
7+
- Automatically notifies admins (from the `ADMINS_EMAIL` environment variable) if a user tries to enter the fake admin page.
8+
- Real page path can be set with the `ADMIN_URL` environment variable to hide it from attackers.
9+
10+
## Integration to Hackassistant
11+
12+
- Integrated the library with configurations that can be found at the library documentation.
13+
14+
## Future work
15+
16+
- Maybe make honeypot for register page or others.

docs/configuration/allauth.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Django-allauth [+](https://django-allauth.readthedocs.io/en/latest/)
2+
3+
Integrated set of Django applications addressing authentication, registration, account management as well as
4+
3rd party (social) account authentication.
5+
6+
## Features
7+
8+
- GitHub login: Environment variables `GITHUB_CLIENT_ID` & `GITHUB_SECRET`.
9+
10+
## Integration to Hackassistant
11+
12+
Set the configurations you want on `SOCIALACCOUNT_PROVIDERS` in [`settings.py`](/app/settings.py).
13+
In addition to the library configuration you must add the key `'ICON'` to you 3rd party configuration dictionary.
14+
With this the button will be added automatically to the login and register page.
15+
16+
## Future work
17+
18+
- Integrate more 3rd party social accounts

docs/configuration/axes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Django-axes [+](https://django-axes.readthedocs.io/en/latest/)
2+
3+
Axes is a Django plugin for keeping track of suspicious login attempts for your Django based website and implementing simple brute-force attack blocking.
4+
5+
## Features
6+
7+
- Stops bruteforce attacks to the login page. It looks at the IP and blocks if it misses 3 times in a row.
8+
9+
## Integration to Hackassistant
10+
11+
- Integrated on the login page and can be configured with the library configurations
12+
13+
## Future work
14+
15+
- No future work

docs/configuration/captcha.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Django-recaptcha [+](https://pypi.org/project/django-recaptcha/)
2+
3+
Django reCAPTCHA form field/widget integration app.
4+
5+
## Features
6+
7+
- Automatically adding captcha to public pages that could be entered with bots by setting the `RECAPTCHA_PUBLIC_KEY` &
8+
`RECAPTCHA_PRIVATE_KEY` environment variable.
9+
- Supports ReCaptchaV2Checkbox, ReCaptchaV2Invisible & ReCaptchaV3 with the `RECAPTCHA_WIDGET` environment variable. (Use `RECAPTCHA_REQUIRED_SCORE` for v3. Default: 0.85)
10+
- Can be modified for the login & register pages with the boolean environment variables `RECAPTCHA_REGISTER` & `RECAPTCHA_LOGIN`.
11+
12+
## Integration to Hackassistant
13+
14+
- Integrated the library with a django form [`RecaptchaForm`](/user/forms.py) and integrated the dark/light theme as well.
15+
- You can use this everywhere by adding the form if the `active` class method returns `True`.
16+
17+
## Future work
18+
19+
- Add this in every public page that can fill forms with bots.

docs/configuration/colorfield.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Django-colorfield [+](https://pypi.org/project/django-colorfield/)
2+
3+
Simple color field for your models with a nice color-picker in the admin-interface.
4+
5+
## Features
6+
7+
- Integrates a color picker to a model field.
8+
9+
## Integration to Hackassistant
10+
11+
- Used for color selection in the Promotional code feature.
12+
13+
## Future work
14+
15+
- More colorfields.

docs/configuration/compressor.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Django Compressor [+](https://django-compressor.readthedocs.io/en/stable/)
2+
3+
Compresses linked and inline JavaScript or CSS into a single cached file.
4+
5+
## Features
6+
7+
- Compress Bootstrap 5 styles for the application at [theme.scss](/app/static/css/theme.scss).
8+
9+
## Integration to Hackassistant
10+
11+
Just installed as the library documentation says and installed a [cron job](crontab.md) to renew the compression as it has expiration.
12+
13+
## Future work
14+
15+
This can be useful in the future for other compressions.

docs/configuration/corsheaders.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Django-cors-headers [+](https://pypi.org/project/django-cors-headers/)
2+
3+
A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses.
4+
5+
## Features
6+
7+
- This allows in-browser requests to your Django application from other origins.
8+
9+
## Integration to Hackassistant
10+
11+
- This is used by the [Django JWT](configuration/django_jwt_oidc.md) and allows the other services to use apis from the Hackassistant.
12+
- You can add more pages with the configuration in the library documentation.
13+
14+
## Future work
15+
16+
- No APIs for the moment but can be implemented for your hackathon organization.

0 commit comments

Comments
 (0)