~ | | Adds a page to the admin panel which allows an admin to upload a custom emoji
|
~ | | by uploading a name, shortcode, description, and image. These fields are
|
~ | | editable whenever the user re-vists the page. The emoji data is loaded from,
|
| ~ | Adds a ListEditEmojiDictionaryField (inherited from Michelle Aubin's
|
| ~ | ListEditDictionaryField class), which takes in a dictionary of values and
|
| ~ | splits it into a tuple of (key, value1, value2, value3). |
- | | and saved into SiteConfiguration, while the image data is loaded from and
|
- | | saved to DefaultStorage. |
| |
|
~ | | |
| ~ | EmojiFileInput class is a subclass of ClearableFileInput, which takes in a
|
| + | file upload from the user, and saves it into the context variable. In future
|
| + | implementations, the get_context() method can also be used to render image
|
| + | previews if the file uploaded is a valid image file. |
| |
|
| | |
| |
|
| | Further work that needs to be done: |
- | | * Adding labels to the form fields, and removing the extra "name" field at the
|
- | | very top of the form. |
| | * Rendering a preview of the emoji when loading the page (through get_context()
|
~ | | in EmojiFileUpload). |
| ~ | in EmojiFileUpload). Right now, the uploaded image file is being passed as a
|
| + | bytestream, but it needs to be passed as a file or image object in order
|
| + | to be rendered. |