Views

class gardenhub.views.AccountRemoveView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeletionMixin, django.views.generic.base.TemplateView

Remove the logged-in user’s GardenHub account.

delete(request, *args, **kwargs)

Call the delete() method on the fetched object and then redirect to the success URL.

class gardenhub.views.AccountSettingsView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.FormView

Account settings screen for the logged-in user.

form_class

alias of gardenhub.forms.AccountSettingsForm

form_valid(form)

If the form is valid, redirect to the supplied URL.

class gardenhub.views.AccountView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.TemplateView

Profile edit screen for the logged-in user.

class gardenhub.views.ApiCrops(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, gardenhub.mixins.UserCanEditPlotMixin, django.views.generic.detail.DetailView

Return JSON about crops.

model

alias of gardenhub.models.Plot

class gardenhub.views.GardenDetailView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, gardenhub.mixins.UserCanEditGardenMixin, django.views.generic.detail.DetailView

View a single garden.

model

alias of gardenhub.models.Garden

class gardenhub.views.GardenListView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

A list of all gardens the logged-in user can edit.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

class gardenhub.views.GardenUpdateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, gardenhub.mixins.UserCanEditGardenMixin, django.views.generic.edit.UpdateView

Edit form for an individual garden.

form_class

alias of gardenhub.forms.GardenForm

form_valid(form)

If the form is valid, save the associated model.

model

alias of gardenhub.models.Garden

class gardenhub.views.HomePageView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.TemplateView

Welcome screen with calls to action.

class gardenhub.views.LogoutView(**kwargs)

Bases: django.contrib.auth.views.LogoutView

Logs out the user and redirects them to the login screen.

class gardenhub.views.OrderCancelView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.auth.mixins.UserPassesTestMixin, django.views.generic.edit.DeleteView

delete(request, *args, **kwargs)

Call the delete() method on the fetched object and then redirect to the success URL.

model

alias of gardenhub.models.Order

class gardenhub.views.OrderCreateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.auth.mixins.UserPassesTestMixin, django.views.generic.edit.CreateView

This is a form used to submit a new order. It’s used by gardeners, garden managers, or anyone who has the ability to edit a plot.

form_class

alias of gardenhub.forms.OrderForm

form_valid(form)

If the form is valid, save the associated model.

get_form(*args, **kwargs)

Return an instance of the form to be used in this view.

get_form_kwargs()

Return the keyword arguments for instantiating the form.

model

alias of gardenhub.models.Order

class gardenhub.views.OrderDetailView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.auth.mixins.UserPassesTestMixin, django.views.generic.detail.DetailView

Review an individual order that’s been submitted. Anyone who can edit the plot may view or cancel these orders.

model

alias of gardenhub.models.Order

class gardenhub.views.OrderListView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

Manage orders page to view all upcoming orders.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

class gardenhub.views.PasswordResetConfirmView(**kwargs)

Bases: django.contrib.auth.views.PasswordResetConfirmView

form_valid(form)

If the form is valid, redirect to the supplied URL.

class gardenhub.views.PasswordResetView(**kwargs)

Bases: django.contrib.auth.views.PasswordResetView

form_valid(form)

If the form is valid, redirect to the supplied URL.

class gardenhub.views.PickCreateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.auth.mixins.UserPassesTestMixin, django.views.generic.edit.CreateView

Form enabling a picker to submit a Pick for a given plot.

form_valid(form)

If the form is valid, save the associated model.

get_context_data(**kwargs)

Insert the form into the context dict.

get_form_kwargs()

Return the keyword arguments for instantiating the form.

model

alias of gardenhub.models.Pick

class gardenhub.views.PlotCreateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.auth.mixins.UserPassesTestMixin, django.views.generic.edit.CreateView

form_class

alias of gardenhub.forms.PlotForm

form_valid(form)

If the form is valid, save the associated model.

model

alias of gardenhub.models.Plot

class gardenhub.views.PlotListView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

A list of all plots the logged-in user can edit.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

class gardenhub.views.PlotUpdateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, gardenhub.mixins.UserCanEditPlotMixin, django.views.generic.edit.UpdateView

Edit form for an individual plot.

form_class

alias of gardenhub.forms.PlotForm

form_valid(form)

If the form is valid, save the associated model.

get_form(*args, **kwargs)

Return an instance of the form to be used in this view.

model

alias of gardenhub.models.Plot

gardenhub.views.account_activate_view(request, token)

When a new user is invited, an email call to action will send them to this view so they can fill out their profile and activate their account.