Views documentation¶
Gestion app views¶
-
class
gestion.views.ActiveProductsAutocomplete(**kwargs)¶ Autocomplete view for active
products.-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
gestion.views.KegActiveAutocomplete(**kwargs)¶ Autocomplete view for active
kegs.-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
gestion.views.KegPositiveAutocomplete(**kwargs)¶ Autocomplete view for
kegswith positive stockHold.-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
gestion.views.MenusAutocomplete(**kwargs)¶ Autocomplete view for active
menus.-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
gestion.views.ProductsAutocomplete(**kwargs)¶ Autocomplete view for all
products.-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
gestion.views.addKeg(request)¶ Displays a
gestion.forms.KegFormto add agestion.models.Keg.
-
gestion.views.addMenu(request)¶ Display a
gestion.forms.MenuFormto add agestion.models.Menu.
-
gestion.views.addProduct(request)¶ Displays a
gestion.forms.ProductFormto add a product.
-
gestion.views.add_pintes(request)¶ Displays a
gestion.forms.PinteFormto add one or moregestion.models.Pinte.
-
gestion.views.allocate(pinte_pk, user)¶ Allocate a
gestion.models.Pinteto a user (django.contrib.auth.models.User) or release the pinte if user is None
-
gestion.views.cancel_consumption(request, pk)¶ Delete a
consumption history.- pk
- The primary key of the consumption history to delete.
Delete a
menu history.- pk
- The primary key of the menu history to delete.
-
gestion.views.cancel_reload(request, pk)¶ Delete a
gestion.models.Reload.- pk
- The primary key of the reload to delete.
-
gestion.views.closeDirectKeg(request, pk)¶ Closes a class:gestion.models.Keg.
- pk
- The primary key of the class:gestion.models.Keg to open.
-
gestion.views.closeKeg(request)¶ Displays a
gestion.forms.SelectPositiveKegFormto open agestion.models.Keg.
-
gestion.views.editKeg(request, pk)¶ Displays a
gestion.forms.KegFormto edit agestion.models.Keg.- pk
- The primary key of the
gestion.models.Kegto edit.
-
gestion.views.editProduct(request, pk)¶ Displays a
gestion.forms.ProductFormto edit a product.- pk
- The primary key of the the
gestion.models.Productto edit.
Displays a
gestion.forms.MenuFormto edit agestion.models.Menu.- pk
- The primary key of the
gestion.models.Menuto edit.
-
gestion.views.gen_releve(request)¶ Displays a
forms.gestion.GenerateReleveFormto generate a releve.
-
gestion.views.getProduct(request, pk)¶ Get a
gestion.models.Productby barcode and return it in JSON format.- pk
- The primary key of the
gestion.models.Productto get infos.
Get a
gestion.models.Menuby pk and return it in JSON format.- pk
- The primary key of the
gestion.models.Menu.
-
gestion.views.kegH(request, pk)¶ Display the
historyof requestedgestion.models.Keg.
-
gestion.views.manage(request)¶ Displays the manage view.
Display the list of
menus.
-
gestion.views.openDirectKeg(request, pk)¶ Opens a class:gestion.models.Keg.
- pk
- The primary key of the class:gestion.models.Keg to open.
-
gestion.views.openKeg(request)¶ Displays a
gestion.forms.SelectPositiveKegFormto open agestion.models.Keg.
-
gestion.views.order(request)¶ Processes the given order. The order is passed through POST.
-
gestion.views.pintes_list(request)¶ Displays the list of
gestion.models.Pinte
-
gestion.views.productProfile(request, pk)¶ Displays the profile of a
gestion.models.Product.- pk
- The primary key of the
gestion.models.Productto display profile.
-
gestion.views.productsIndex(request)¶ Displays the products manage static page.
-
gestion.views.ranking(request)¶ Displays the ranking page.
-
gestion.views.refund(request)¶ Displays a
Refund form.
-
gestion.views.release(request, pinte_pk)¶ View to release a
gestion.models.Pinte.- pinte_pk
- The primary key of the
gestion.models.Pinteto release.
-
gestion.views.release_pintes(request)¶ Displays a
gestion.forms.PinteFormto release one or moregestion.models.Pinte.
-
gestion.views.reload(request)¶ Displays a
Reload form.
-
gestion.views.searchMenu(request)¶ Displays a
gestion.forms.SearchMenuFormto search agestion.models.Menu.
-
gestion.views.searchProduct(request)¶ Displays a
gestion.forms.SearchProductto search agestion.models.Product.
-
gestion.views.switch_activate(request, pk)¶ Switch the active status of the requested
gestion.models.Product.- pk
- The primary key of the
gestion.models.Productto display profile.
Switch active status of a
gestion.models.Menu.
Users app views¶
-
class
users.views.ActiveUsersAutocomplete(**kwargs)¶ Autocomplete for active users (
django.contrib.auth.models.User).-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
users.views.AdherentAutocomplete(**kwargs)¶ Autocomplete for adherents (
django.contrib.auth.models.User).-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
users.views.AllUsersAutocomplete(**kwargs)¶ Autcomplete for all users (
django.contrib.auth.models.User).-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
users.views.NonAdminUserAutocomplete(**kwargs)¶ Autocomplete for non-admin users (
django.contrib.auth.models.User).-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
class
users.views.NonSuperUserAutocomplete(**kwargs)¶ Autocomplete for non-superuser users (
django.contrib.auth.models.User).-
get_queryset()¶ Filter the queryset with GET[‘q’].
-
-
users.views.addAdmin(request)¶ Displays a
users.forms.SelectNonAdminUserFormto select a non admin user (django.contrib.auth.models.User) and add it to the admins.
-
users.views.addCotisationHistory(request, pk)¶ Displays a
users.forms.addCotisationHistoryFormto add aCotisation History <users.models.CotisationHistoryto the requested user (django.contrib.auth.models.User).- pk
- The primary key of the user to add a cotisation history
-
users.views.addSuperuser(request)¶ Displays a
users.forms.SelectNonAdminUserFormto select a non superuser user (django.contrib.auth.models.User) and add it to the superusers.
-
users.views.addWhiteListHistory(request, pk)¶ Displays a
users.forms.addWhiteListHistoryFormto add aWhiteListHistoryto the requested user (django.contrib.auth.models.User).
-
users.views.adminsIndex(request)¶ Lists the staff (
django.contrib.auth.models.Userwith is_staff True)
-
users.views.allReloads(request, pk, page)¶ Display all the
reloadsof the requested user (django.contrib.auth.models.User).
-
users.views.all_consumptions(request, pk, page)¶ Display all the consumptions <gestion.models.ConsumptionHistory> of the requested user (
django.contrib.auth.models.User).
Display all the menus <gestion.models.MenuHistory> of the requested user (
django.contrib.auth.models.User).
-
users.views.createGroup(request)¶ Displays a
CreateGroupFormto create a group (django.contrib.auth.models.Group).
-
users.views.createSchool(request)¶ Displays
SchoolFormto add aSchool.
-
users.views.createUser(request)¶ Displays a
CreateUserFormto create a user (django.contrib.auth.models.User).
-
users.views.deleteCotisationHistory(request, pk)¶ Delete the requested
CotisationHistory.- pk
- The primary key of tthe CotisationHistory to delete.
-
users.views.deleteGroup(request, pk)¶ Deletes the requested group (
django.contrib.auth.models.Group).- pk
- The primary key of the group to delete
-
users.views.deleteSchool(request, pk)¶ Deletes a
users.models.School.- pk
- The primary key of the School to delete.
-
users.views.editGroup(request, pk)¶ Displays a
EditGroupFormto edit a group (django.contrib.auth.models.Group).- pk
- The primary key of the group to edit.
-
users.views.editGroups(request, pk)¶ Displays a
users.form.GroupsEditFormto edit the groups of a user (django.contrib.auth.models.User).
-
users.views.editPassword(request, pk)¶ Displays a
users.form.EditPasswordFormto edit the password of a user (django.contrib.auth.models.User).
-
users.views.editSchool(request, pk)¶ Displays
SchoolFormto edit aSchool.- pk
- The primary key of the school to edit.
-
users.views.editUser(request, pk)¶ Displays a
CreateUserFormto edit a user (django.contrib.auth.models.User).
-
users.views.export_csv(request)¶ Displays a
users.forms.ExportFormto export csv files of users.
-
users.views.gen_user_infos(request, pk)¶ Generates a latex document include adhesion certificate and list of cotisations <users.models.CotisationHistory>.
-
users.views.getUser(request, pk)¶ Get requested user (
django.contrib.auth.models.User) and return username, balance and is_adherent in JSON format.- pk
- The primary key of the user to get infos.
-
users.views.groupProfile(request, pk)¶ Displays the profile of a group (
django.contrib.auth.models.Group).
-
users.views.groupsIndex(request)¶ Displays all the groups (
django.contrib.auth.models.Group).
-
users.views.index(request)¶ Display the index for user related actions.
-
users.views.loginView(request)¶ Displays the
users.forms.LoginForm.
-
users.views.logoutView(request)¶ Logout the logged user (
django.contrib.auth.models.User).
-
users.views.profile(request, pk)¶ Displays the profile for the requested user (
django.contrib.auth.models.User).- pk
- The primary key of the user (
django.contrib.auth.models.User) to display profile
-
users.views.removeAdmin(request, pk)¶ Removes an user (
django.contrib.auth.models.User) from staff.- pk
- The primary key of the user (
django.contrib.auth.models.User) to remove from staff
-
users.views.removeRight(request, groupPk, permissionPk)¶ Removes a right from a given group (
django.contrib.auth.models.Group).
-
users.views.removeSuperuser(request, pk)¶ Removes a user (
django.contrib.auth.models.User) from superusers.
-
users.views.removeUser(request, groupPk, userPk)¶ Removes a user (
django.contrib.auth.models.User) from a given group (django.contrib.auth.models.Group).
-
users.views.resetPassword(request, pk)¶ Reset the password of a user (
django.contrib.auth.models.User).
-
users.views.searchUser(request)¶ Displays a
SelectUserFormto search a user (django.contrib.auth.models.User).
-
users.views.superusersIndex(request)¶ Lists the superusers (
django.contrib.auth.models.Userwith is_superuser True).
-
users.views.switch_activate_user(request, pk)¶ Switch the active status of the requested user (
django.contrib.auth.models.User).- pk
- The primary key of the user to switch status
-
users.views.usersIndex(request)¶ Display the list of all users (
django.contrib.auth.models.User).
Preferences app views¶
-
preferences.views.addCotisation(request)¶ View which displays a
CotisationFormto create aCotisation.
-
preferences.views.addPaymentMethod(request)¶ View which displays a
PaymentMethodFormto create aPaymentMethod.
-
preferences.views.cotisationsIndex(request)¶ View which lists all the
Cotisation.
-
preferences.views.deleteCotisation(request, pk)¶ Delete a
Cotisation.- pk
- The primary key of the
Cotisationto delete.
-
preferences.views.deletePaymentMethod(request, pk)¶ Delete a
PaymentMethod.- pk
- The primary key of the
PaymentMethodto delete.
-
preferences.views.editCotisation(request, pk)¶ View which displays a
CotisationFormto edit aCotisation.- pk
- The primary key of the
Cotisationto edit.
-
preferences.views.editPaymentMethod(request, pk)¶ View which displays a
PaymentMethodFormto edit aPaymentMethod.- pk
- The primary key of the
PaymentMethodto edit.
-
preferences.views.generalPreferences(request)¶ View which displays a
GeneralPreferencesFormto edit theGeneralPreferences.
-
preferences.views.get_config(request)¶ Load the
GeneralPreferencesand return it in json format (except forstatutes,rulesandmenu)
-
preferences.views.get_cotisation(request, pk)¶ Return the requested
Cotisationin json format.- pk
- The primary key of the requested
Cotisation.
-
preferences.views.inactive(request)¶ View which displays the inactive message (if the site is inactive).
-
preferences.views.paymentMethodsIndex(request)¶ View which lists all the
PaymentMethod.
coopeV3 app views¶
-
coopeV3.views.coope_runner(request)¶ Just an easter egg
-
coopeV3.views.home(request)¶ Redirect the user either to
manage()view (if connected and staff) orhomepage()view (if connected and not staff) orloginView()view (if not connected).