This commit is contained in:
Johnny 2018-10-29 00:19:57 +00:00
parent b6c0ae8585
commit a5779f5a30

View file

@ -14,7 +14,7 @@
Web/Django standard initiative (@strikaco) Web/Django standard initiative (@strikaco)
- Features - Features
- Adds a series of web-based forms and generic views - Adds a series of web-based forms and generic class-based views
- Accounts - Accounts
- Register - Enhances registration; allows optional collection of email address - Register - Enhances registration; allows optional collection of email address
- Form - Adds a generic Django form for creating Accounts from the web - Form - Adds a generic Django form for creating Accounts from the web
@ -46,6 +46,7 @@ Web/Django standard initiative (@strikaco)
- Enables use of Django Messages framework to communicate with users in browser - Enables use of Django Messages framework to communicate with users in browser
- Implements webclient/website `_shared_login` functionality as Django middleware - Implements webclient/website `_shared_login` functionality as Django middleware
- 'account' and 'puppet' are added to all request contexts for authenticated users - 'account' and 'puppet' are added to all request contexts for authenticated users
- Adds unit tests for all web views
- Cosmetic - Cosmetic
- Prettifies Django 'forgot password' workflow (requires SMTP to actually function) - Prettifies Django 'forgot password' workflow (requires SMTP to actually function)
- Prettifies Django 'change password' workflow - Prettifies Django 'change password' workflow
@ -54,13 +55,13 @@ Web/Django standard initiative (@strikaco)
### Typeclasses ### Typeclasses
- Add new methods on all typeclasses, useful specifically for viewing the object in the web/admin: - Add new methods on all typeclasses, useful specifically for object handling from the website/admin:
+ `web_get_admin_url()`: Returns a path that, if followed, will display the object in the Admin backend. + `web_get_admin_url()`: Returns the path to the object detail page in the Admin backend.
+ `web_get_create_url()`: Returns a path for a view allowing the creation of new instances of this object. + `web_get_create_url()`: Returns the path to the typeclass' creation page on the website, if implemented.
+ `web_get_absolute_url()`: Django construct; returns a path that should display the object in a DetailView. + `web_get_absolute_url()`: Returns the path to the object's detail page on the website, if implemented.
+ `web_get_update_url()`: Returns a path that should display the object in an UpdateView. + `web_get_update_url()`: Returns the path to the object's update page on the website, if implemented.
+ `web_get_delete_url()`: Returns a path that should display the object in a DeleteView. + `web_get_delete_url()`: Returns the path to the object's delete page on the website, if implemented.
- All typeclasses has new helper class method `create`, which encompasses useful functionality - All typeclasses have new helper class method `create`, which encompasses useful functionality
that used to be embedded for example in the respective `@create` or `@connect` commands. that used to be embedded for example in the respective `@create` or `@connect` commands.
- DefaultAccount now has new class methods implementing many things that used to be in unloggedin - DefaultAccount now has new class methods implementing many things that used to be in unloggedin
commands (these can now be customized on the class instead): commands (these can now be customized on the class instead):
@ -68,10 +69,9 @@ Web/Django standard initiative (@strikaco)
+ `get_username_validators`: Return list of validators for username validation (see + `get_username_validators`: Return list of validators for username validation (see
`settings.AUTH_USERNAME_VALIDATORS`) `settings.AUTH_USERNAME_VALIDATORS`)
+ `authenticate`: Method to check given username/password. + `authenticate`: Method to check given username/password.
+ `normalize_username`: Normalizes names so you can't fake names with similar-looking Unicode + `normalize_username`: Normalizes names so (for Unicode environments) users cannot mimic existing usernames by replacing select characters with visually-similar Unicode chars.
chars. + `validate_username`: Mechanism for validating a username based on predefined Django validators.
+ `validate_username`: Mechanism for validating a username. + `validate_password`: Mechanism for validating a password based on predefined Django validators.
+ `validate_password`: Mechanism for validating a password.
+ `set_password`: Apply password to account, using validation checks. + `set_password`: Apply password to account, using validation checks.
### Utils ### Utils