Expand Tuning Doccs

This commit is contained in:
Ariel Rin
2024-05-26 03:22:08 +00:00
parent fe4a8965e3
commit b6e34ace35
14 changed files with 956 additions and 446 deletions

View File

@@ -36,7 +36,7 @@ from allianceauth.framework.api.evecharacter import get_user_from_evecharacter
user = get_user_from_evecharacter(character=my_evecharacter)
```
Now, `user` is a `User` object, or the sentinel username (see [get_sentinel_user](#get-sentinel-user))
Now, `user` is a `User` object, or the sentinel username (see [get_sentinel_user](#get_sentinel_user))
if the `EveCharacter` has no user.
## User API
@@ -88,7 +88,7 @@ main_character = get_main_character_name_from_user(user=my_user)
Now, `main_character` is a `string` containing the user's main character name.
If the user has no main character, the username will be returned. If the user is `None`,
the sentinel username (see [get_sentinel_user](#get-sentinel-user)) will be returned.
the sentinel username (see [get_sentinel_user](#get_sentinel_user)) will be returned.
### get_sentinel_user

View File

@@ -8,7 +8,7 @@ have to load specific CSS or JavaScript yourself.
These bundles include DataTables CSS and JS, jQuery Datepicker CSS and JS, jQueryUI CSS and JS, and more.
A full list of bundles we provide can be found here: https://gitlab.com/allianceauth/allianceauth/-/tree/master/allianceauth/templates/bundles
A full list of bundles we provide can be found here: <https://gitlab.com/allianceauth/allianceauth/-/tree/master/allianceauth/templates/bundles>
To use a bundle, you can use the following code in your template (Example for jQueryUI):

View File

@@ -122,10 +122,6 @@ class MyService(ServiceHook):
All of your apps defined urlpatterns will then be included in the `URLconf` when the core application starts.
#### self.service_ctrl_template
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render_service_ctrl). You are free to redefine or not use this variable at all.
#### title
This is a property which provides a user-friendly display of your service's name. It will usually do a reasonably good job unless your service name has punctuation or odd capitalization. If this is the case, you should override this method and return a string.
@@ -134,7 +130,7 @@ This is a property which provides a user-friendly display of your service's name
#### self.service_ctrl_template
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render-service-ctrl). You are free to redefine or not use this variable at all.
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render_service_ctrl). You are free to redefine or not use this variable at all.
#### delete_user

View File

@@ -18,6 +18,8 @@ The `MenuItemHook` class specifies some parameters/instance variables required f
:undoc-members:
```
## Parameters
### text
The text shown as menu item, e.g., usually the name of the app.

View File

@@ -12,6 +12,8 @@ def register_urls():
return UrlHook(app_name.urls, 'app_name', r^'app_name/')
```
### Parameters
#### urls
The urls module to include. See [the Django docs](https://docs.djangoproject.com/en/dev/topics/http/urls/#example) for designing urlpatterns.