webapps package#

Subpackages#

Submodules#

webapps.admin module#

class webapps.admin.ConnectionProfileAdmin(model, admin_site)[source]#

Bases: ModelAdmin

filter_horizontal = ('users',)#
form#

alias of ConnectionProfileForm

list_display = ('name', 'database_alias', 'url', 'login')#
property media#
search_fields = ('name', 'database_alias', 'login')#
class webapps.admin.ConnectionProfileForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#

Bases: ModelForm

class Meta[source]#

Bases: object

fields = '__all__'#
model#

alias of ConnectionProfile

base_fields = {'database_alias': <django.forms.fields.CharField object>, 'login': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'password': <django.forms.fields.CharField object>, 'url': <django.forms.fields.CharField object>, 'users': <django.forms.models.ModelMultipleChoiceField object>}#
clean_name()[source]#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class webapps.admin.LTOUserAdmin(model, admin_site)[source]#

Bases: UserAdmin

add_fieldsets = ((None, {'classes': ('wide',), 'fields': ('username', 'password1', 'password2', 'email', 'access_level', 'account_valid')}),)#
fieldsets = ((None, {'fields': ('username', 'password')}), ('Personal info', {'fields': ('firstname', 'lastname', 'email')}), ('Permissions', {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups')}), ('Access', {'fields': ('access_level', 'account_valid')}))#
list_display = ('username', 'email', 'access_level', 'account_valid', 'is_staff')#
list_filter = ('access_level', 'is_staff', 'is_superuser')#
property media#
model#

alias of LTOUser

ordering = ('username',)#
search_fields = ('username', 'email')#

webapps.apps module#

class webapps.apps.WebappsConfig(app_name, app_module)[source]#

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'#
name = 'webapps'#
ready()[source]#

Override this method in subclasses to run code when Django starts.

webapps.form module#

class webapps.form.LTOUserForm(*args, **kwargs)[source]#

Bases: UserCreationForm

class Meta[source]#

Bases: object

fields = ['firstname', 'lastname', 'email', 'username', 'password1', 'password2']#
model#

alias of LTOUser

base_fields = {'email': <django.forms.fields.EmailField object>, 'firstname': <django.forms.fields.CharField object>, 'lastname': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}#
clean_email()[source]#
clean_username()[source]#

Reject usernames that differ only in case.

declared_fields = {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}#
property media#

Return all media required to render the widgets on this form.

webapps.models module#

class webapps.models.ConnectionProfile(id, name, url, login, password, database_alias)[source]#

Bases: Model

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

database_alias#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

login#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
password#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

url#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

users#

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class webapps.models.LTOUser(id, last_login, is_superuser, first_name, last_name, is_staff, is_active, date_joined, firstname, lastname, email, username, password, account_valid, access_level)[source]#

Bases: AbstractUser

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

access_level#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

account_valid#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

connection_profiles#

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

date_joined#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

first_name#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

firstname#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_access_level_display(*, field=<django.db.models.fields.CharField: access_level>)#
get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)#
get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)#
groups#

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_staff#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_superuser#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_login#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_name#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lastname#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

logentry_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

password#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user_permissions#

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

username#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

webapps.tests module#

webapps.views module#

webapps.views.auth_login(request)[source]#
webapps.views.connect_profile(request)#
webapps.views.deconnexion(request)[source]#
webapps.views.domaineSelect(request)#
webapps.views.error_404_view(request, exception)[source]#
webapps.views.extract_data(my_file)[source]#
webapps.views.file_upload_view(request)[source]#
webapps.views.file_upload_view2(request)[source]#
webapps.views.getProgram(request, domaine)#

_summary_

Parameters:
  • request (_type_) – _description_

  • domaine (_type_) – _description_

Returns:

_description_

Return type:

_type_

webapps.views.get_data_extract(request)[source]#
webapps.views.home(request)#
webapps.views.logbook(request)#
webapps.views.logbook_del_files(request)[source]#
webapps.views.postProg_info(request)[source]#
webapps.views.register(request)[source]#
webapps.views.search_in(request, allData, search='Ocean')[source]#

Fonction permet d’avoir à partir des données de references les oceans ou les programmes

Parameters:
  • allData (json) – données de references

  • search (str) – “Ocean” ou “Program”

Returns:

prog_dic (json)

webapps.views.sendData(request)#
webapps.views.update_data(request)#

Module contents#