faucet.admin

Define admin related functionality for faucet.

Copyright (C) 2018 Gitcoin Core

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

GeneralAdmin

GeneralAdmin(self, model, admin_site)

Define the Faucet specific admin handling.

list_display

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

ordering

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

FaucetRequestAdmin

FaucetRequestAdmin(self, model, admin_site)

Setup the FaucetRequest admin results display.

list_display

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

ordering

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

raw_id_fields

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

search_fields

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

get_queryset

FaucetRequestAdmin.get_queryset(self, request)

Override the get_queryset method to include FK lookups.

get_profile_email

FaucetRequestAdmin.get_profile_email(self, obj)

Get the profile email address.

get_profile_username

FaucetRequestAdmin.get_profile_username(self, obj)

Get the profile username.

FaucetRequestAdmin.link(self, instance)

Handle faucet request specific links.

Args: instance (FaucetRequest): The faucet request to build a link for.

Returns: str: The HTML element for the faucet request link.