mini_buildd.models.source module¶
- class mini_buildd.models.source.Archive(extra_options, pickled_data, url, ping)¶
Bases:
mini_buildd.models.base.Model
- URLOPEN_TIMEOUT = 15¶
- url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- ping¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class Admin(model, admin_site)¶
Bases:
mini_buildd.models.base.Model.Admin
- search_fields = ['url']¶
- exclude = ('pickled_data', 'extra_options')¶
- mbd_model¶
alias of
mini_buildd.models.source.Archive
- property media¶
- clean(*args, **kwargs)¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- mbd_get_matching_release(source, gnupg)¶
- mbd_ping()¶
Ping and update the ping value.
- mbd_get_reverse_dependencies()¶
Return all sources (and their deps) that use us.
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- objects = <django.db.models.manager.Manager object>¶
- source_set¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class mini_buildd.models.source.Architecture(extra_options, pickled_data, name)¶
Bases:
mini_buildd.models.base.Model
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod mbd_host_architecture()¶
- classmethod mbd_supported_architectures(arch=None)¶
Get all supported architectures (some archs also natively support other archs).
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- architectureoption_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- chroot_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- distribution_set¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>¶
- source_set¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class mini_buildd.models.source.Component(*args, **kwargs)¶
Bases:
mini_buildd.models.base.Model
A Debian component (like ‘main’, ‘contrib’, ‘non-free’).
Sorting: ‘main’ should be first, the others in no special order. You may just use standard python sorted() on an iterable of components.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- distribution_set¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>¶
- source_set¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class mini_buildd.models.source.Source(id, extra_options, pickled_data, status, last_checked, auto_reactivate, origin, codename, description, codeversion, codeversion_override)¶
Bases:
mini_buildd.models.base.StatusModel
- origin¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- codename¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- apt_keys¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- codeversion¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- codeversion_override¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- archives¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- components¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- architectures¶
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class Admin(model, admin_site)¶
Bases:
mini_buildd.models.base.StatusModel.Admin
- list_display = ['colored_status', '__str__', 'origin', 'codeversion', 'codename']¶
- search_fields = ['origin', 'codeversion', 'codename']¶
- ordering = ['origin', '-codeversion', 'codename']¶
- readonly_fields = ['codeversion', 'archives', 'components', 'architectures', 'description']¶
- fieldsets = (('Identity', {'fields': ('origin', 'codename', 'extra_options', 'apt_keys')}), ('Extra', {'classes': ('collapse',), 'fields': ('description', 'codeversion', 'codeversion_override', 'archives', 'components', 'architectures')}))¶
- filter_horizontal = ('apt_keys',)¶
- get_readonly_fields(_request, obj=None)¶
Forbid to change identity on existing source (usually a bad idea; repos/chroots that refer to us may break).
- classmethod mbd_filter_active_base_sources()¶
Filter active base sources; needed in chroot and distribution wizards.
- mbd_model¶
alias of
mini_buildd.models.source.Source
- property media¶
- mbd_release_file_values()¶
Compute a dict of values a matching release file must have.
- mbd_is_matching_release(release)¶
Check that this release file matches us.
- mbd_get_archive()¶
Get fastest archive.
- mbd_get_apt_line(limit_components=None)¶
- mbd_get_apt_pin()¶
Apt ‘pin line’ (for use in a apt ‘preference’ file).
- mbd_prepare()¶
- mbd_sync()¶
- mbd_remove()¶
- mbd_check()¶
Rescan all archives, and check that there is at least one working.
- mbd_get_dependencies()¶
- mbd_get_reverse_dependencies()¶
Return all chroots and repositories that use us.
- clean(*args, **kwargs)¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- chroot_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- distribution_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)¶
- get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)¶
- get_status_display(*, field=<django.db.models.fields.IntegerField: status>)¶
- id¶
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>¶
- prioritysource_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class mini_buildd.models.source.PrioritySource(id, extra_options, pickled_data, source, priority)¶
Bases:
mini_buildd.models.base.Model
- source¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class Admin(model, admin_site)¶
Bases:
mini_buildd.models.base.Model.Admin
- exclude = ('pickled_data', 'extra_options')¶
- mbd_model¶
- property media¶
- mbd_get_apt_preferences()¶
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- distribution_set¶
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
andTopping.pizzas
areManyToManyDescriptor
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.
- objects = <django.db.models.manager.Manager object>¶
- source_id¶