indieweb package¶
Subpackages¶
- indieweb.management package
- indieweb.migrations package
- Submodules
- indieweb.migrations.0001_initial module
- indieweb.migrations.0002_auto_20190512_0612 module
- indieweb.migrations.0003_auto_20190518_0207 module
- indieweb.migrations.0004_alter_auth_id_alter_token_id module
- indieweb.migrations.0005_alter_auth_created_alter_auth_modified_and_more module
- Module contents
- indieweb.templatetags package
Submodules¶
indieweb.models module¶
- class indieweb.models.Auth(*args, **kwargs)[source]¶
Bases:
GenKeyMixinStores authorization grants during the IndieAuth flow.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- client_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- code_challenge¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- code_challenge_method¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- me¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified¶
Model for storing IndieAuth authorization codes.
Used during the IndieAuth flow to temporarily store authorization details before exchanging the auth code for an access token.
- objects = <django.db.models.manager.Manager object>¶
- owner¶
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.parentis aForwardManyToOneDescriptorinstance.
- owner_id¶
- redirect_uri¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- scope¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- state¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class indieweb.models.GenKeyMixin(*args, **kwargs)[source]¶
Bases:
ModelMixin that automatically generates a random key on save if not provided.
- key: models.CharField[str, str]¶
- save(*args: Any, **kwargs: Any) None[source]¶
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- class indieweb.models.Profile(*args, **kwargs)[source]¶
Bases:
ModelUser profile with h-card data stored as JSON.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
- h_card¶
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.
- modified¶
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>¶
- photo_url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args: Any, **kwargs: Any) None[source]¶
Save profile and sync quick-access fields with h_card data.
- url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user¶
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- user_id¶
- class indieweb.models.Token(*args, **kwargs)[source]¶
Bases:
GenKeyMixinStores access tokens for authenticated API access.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- client_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- expires_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_expired() bool[source]¶
Return True if the token has an expires_at in the past.
Tokens with
expires_atset toNoneare treated as non-expiring for backwards compatibility with rows created before expiration tracking was added.
- key¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- me¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified¶
Model for storing IndieAuth/Micropub access tokens.
Represents long-lived access tokens that clients can use to authenticate requests to the Micropub endpoint and other IndieWeb services.
- objects = <django.db.models.manager.Manager object>¶
- owner¶
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.parentis aForwardManyToOneDescriptorinstance.
- owner_id¶
- scope¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class indieweb.models.Webmention(*args, **kwargs)[source]¶
Bases:
ModelModel for storing webmentions.
Webmentions are a W3C recommendation for notifying when one site mentions another, enabling cross-site conversations.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- MENTION_TYPE_CHOICES = [('mention', 'Mention'), ('like', 'Like'), ('reply', 'Reply'), ('repost', 'Repost')]¶
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- exception NotUpdated¶
Bases:
ObjectNotUpdated,DatabaseError
- STATUS_CHOICES = [('pending', 'Pending'), ('verified', 'Verified'), ('failed', 'Failed'), ('spam', 'Spam')]¶
- author_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_photo¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- content¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- content_html¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_mention_type_display(*, field=<django.db.models.fields.CharField: mention_type>)¶
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
- get_status_display(*, field=<django.db.models.fields.CharField: status>)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mention_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified¶
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>¶
- published¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- spam_check_result¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- target_url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- verified_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
indieweb.urls module¶
indieweb.views module¶
Module contents¶
includes indieauth, micropub, and webmention endpoints