archivebox.core package

Submodules

archivebox.core.admin module

archivebox.core.admin.update_snapshots(modeladmin, request, queryset)[source]
archivebox.core.admin.update_titles(modeladmin, request, queryset)[source]
archivebox.core.admin.overwrite_snapshots(modeladmin, request, queryset)[source]
archivebox.core.admin.verify_snapshots(modeladmin, request, queryset)[source]
archivebox.core.admin.delete_snapshots(modeladmin, request, queryset)[source]
class archivebox.core.admin.SnapshotAdminForm(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: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of core.models.Snapshot

fields = '__all__'
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'tags': <core.forms.TagField object>, 'timestamp': <django.forms.fields.CharField object>, 'title': <django.forms.fields.CharField object>, 'updated': <django.forms.fields.DateTimeField object>, 'url': <django.forms.fields.URLField object>}
declared_fields = {'tags': <core.forms.TagField object>}
media
class archivebox.core.admin.SnapshotAdmin(model, admin_site)[source]

Bases: core.mixins.SearchResultsAdminMixin, django.contrib.admin.options.ModelAdmin

list_display = ('added', 'title_str', 'url_str', 'files', 'size')
sort_fields = ('title_str', 'url_str', 'added')
readonly_fields = ('id', 'url', 'timestamp', 'num_outputs', 'is_archived', 'url_hash', 'added', 'updated')
search_fields = ['url__icontains', 'timestamp', 'title', 'tags__name']
fields = ('id', 'url', 'timestamp', 'num_outputs', 'is_archived', 'url_hash', 'added', 'updated', 'title', 'tags')
list_filter = ('added', 'updated', 'tags')
ordering = ['-added']
actions = [<function delete_snapshots>, <function overwrite_snapshots>, <function update_snapshots>, <function update_titles>, <function verify_snapshots>]
actions_template = 'admin/actions_as_select.html'
form

alias of SnapshotAdminForm

list_per_page = 40
get_urls()[source]
get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

tag_list(obj)[source]
id_str(obj)[source]
title_str(obj)[source]
files(obj)[source]
size(obj)[source]
url_str(obj)[source]
grid_view(request)[source]
media
class archivebox.core.admin.TagAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

list_display = ('slug', 'name', 'id')
sort_fields = ('id', 'name', 'slug')
readonly_fields = ('id',)
search_fields = ('id', 'name', 'slug')
fields = ('id', 'name', 'slug')
media
class archivebox.core.admin.ArchiveBoxAdmin(name='admin')[source]

Bases: django.contrib.admin.sites.AdminSite

site_header = 'ArchiveBox'
index_title = 'Links'
site_title = 'Index'
get_urls()[source]
add_view(request)[source]
archivebox.core.admin.path(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)

archivebox.core.apps module

class archivebox.core.apps.CoreConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

name = 'core'

archivebox.core.models module

archivebox.core.settings module

archivebox.core.tests module

archivebox.core.urls module

archivebox.core.urls.path(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)

archivebox.core.views module

class archivebox.core.views.HomepageView(**kwargs)[source]

Bases: django.views.generic.base.View

get(request)[source]
class archivebox.core.views.SnapshotView(**kwargs)[source]

Bases: django.views.generic.base.View

get(request, path)[source]
class archivebox.core.views.PublicIndexView(**kwargs)[source]

Bases: django.views.generic.list.ListView

template_name = 'public_index.html'
model

alias of core.models.Snapshot

paginate_by = 100
ordering = ['title']
get_context_data(**kwargs)[source]

Get the context for this view.

get_queryset(**kwargs)[source]

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.

get(*args, **kwargs)[source]
class archivebox.core.views.AddView(**kwargs)[source]

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

template_name = 'add.html'
form_class

alias of core.forms.AddLinkForm

get_initial()[source]

Prefill the AddLinkForm with the ‘url’ GET parameter

test_func()[source]
get_context_data(**kwargs)[source]

Insert the form into the context dict.

form_valid(form)[source]

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

archivebox.core.welcome_message module

archivebox.core.wsgi module

WSGI config for archivebox project.

It exposes the WSGI callable as a module-level variable named application.

For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/

Module contents