-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from AnimalFoodBank/wip/20230921-users
[#20230921] Users and Profiles
- Loading branch information
Showing
27 changed files
with
515 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,17 @@ | |
# | ||
# The `django-test-action` action is used to run the tests and requires a | ||
# requirements file and a settings directory path. | ||
# | ||
# The `pypa/gh-action-pip-audit` action is used to audit the requirements file | ||
# for security vulnerabilities. It requires a requirements file and can be | ||
# configured to require hashes for all packages. | ||
# | ||
# See: | ||
# - https://github.com/pypa/gh-action-pip-audit | ||
# - https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | ||
|
||
|
||
name: Django CI (actions) | ||
name: Audit | ||
on: | ||
push: | ||
branches: [main] | ||
|
@@ -46,12 +54,9 @@ jobs: | |
# run: | | ||
# pip install --upgrade pip | ||
|
||
- name: Django Test CI | ||
uses: UKnowWhoIm/[email protected] | ||
with: | ||
requirements-file: afb/requirements.txt | ||
settings-dir-path: afb/afb | ||
parallel-tests: false | ||
|
||
- name: gh-action-pip-audit | ||
uses: pypa/[email protected] | ||
with: | ||
inputs: afb/requirements.txt | ||
summary: true | ||
require-hashes: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,5 +84,5 @@ local_settings.py | |
.env* | ||
!.env.empty | ||
db.sqlite3 | ||
*.txt | ||
.vscode/ | ||
tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
# | ||
# To use pre-commit, install it using pip: | ||
# | ||
# pip install pre-commit | ||
# | ||
# Then, run it on all the files in this repo: | ||
# | ||
# pre-commit run --all-files | ||
# | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
# TODO: Enable black after formatting is standardized. | ||
# - repo: https://github.com/psf/black | ||
# rev: 22.10.0 | ||
# hooks: | ||
# - id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# afb-requests -- 2023-09-21 | ||
|
||
|
||
## Commands | ||
|
||
|
||
```bash | ||
$ pip-compile --output-file=- requirements.in > requirements.txt | ||
|
||
$ pip-compile --upgrade --output-file=- requirements.in | tee requirements.txt | ||
|
||
$ pip-compile --output-file=- > requirements.txt | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
|
||
from django.contrib import admin | ||
from django.contrib.auth.admin import UserAdmin | ||
from .models import Client, Manager, Volunteer, User | ||
|
||
admin.site.register(User, UserAdmin) | ||
admin.site.register(Client) | ||
admin.site.register(Manager) | ||
admin.site.register(Volunteer) | ||
|
||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# | ||
|
||
from django import forms | ||
|
||
from .client import ClientForm | ||
|
||
|
||
class LoginForm(forms.Form): | ||
username = forms.CharField(max_length=100) | ||
password = forms.CharField(widget=forms.PasswordInput) |
Oops, something went wrong.