-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
721 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from django import forms | ||
|
||
from .widgets import ClearableBlobInput | ||
from .widgets import SingleAttachmentInput | ||
|
||
|
||
class BlobField(forms.FileField): | ||
widget = ClearableBlobInput | ||
class SingleAttachmentField(forms.FileField): | ||
widget = SingleAttachmentInput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from django.forms.widgets import ClearableFileInput | ||
|
||
|
||
class ClearableBlobInput(ClearableFileInput): | ||
class SingleAttachmentInput(ClearableFileInput): | ||
# make this widget work with the Django admin | ||
choices = [] | ||
|
||
|
||
class AdminBlobInput(ClearableBlobInput): | ||
class AdminSingleAttachmentInput(SingleAttachmentInput): | ||
template_name = "anchor/widgets/admin_blob_input.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.