fobi.contrib.plugins.form_elements.content.content_image package

Submodules

fobi.contrib.plugins.form_elements.content.content_image.apps module

class fobi.contrib.plugins.form_elements.content.content_image.apps.Config(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

label = 'fobi.contrib.plugins.form_elements.content.content_image'
name = 'fobi.contrib.plugins.form_elements.content.content_image'

fobi.contrib.plugins.form_elements.content.content_image.conf module

fobi.contrib.plugins.form_elements.content.content_image.conf.get_setting(setting, override=None)[source]

Get a setting from fobi.contrib.plugins.form_elements.content.content_image conf module, falling back to the default.

If override is not None, it will be used instead of the setting.

Parameters:
  • setting – String with setting name
  • override – Value to use when no setting is available. Defaults to None.
Returns:

Setting value.

fobi.contrib.plugins.form_elements.content.content_image.defaults module

fobi.contrib.plugins.form_elements.content.content_image.fobi_form_elements module

fobi.contrib.plugins.form_elements.content.content_image.forms module

fobi.contrib.plugins.form_elements.content.content_image.helpers module

fobi.contrib.plugins.form_elements.content.content_image.helpers.handle_uploaded_file(image_file)[source]
Parameters:image_file (django.core.files.uploadedfile.InMemoryUploadedFile) –
Return string:Path to the image (relative).
fobi.contrib.plugins.form_elements.content.content_image.helpers.get_crop_filter(fit_method)[source]
fobi.contrib.plugins.form_elements.content.content_image.helpers.delete_file(image_file)[source]

Delete file from disc.

fobi.contrib.plugins.form_elements.content.content_image.helpers.ensure_unique_filename(destination)[source]

Makes sure filenames are never overwritten.

Parameters:destination (string) –
Return string:
fobi.contrib.plugins.form_elements.content.content_image.helpers.clone_file(source_filename, relative_path=True)[source]

Clones the file.

Parameters:source_filename (string) – Source filename.
Return string:Filename of the cloned file.

fobi.contrib.plugins.form_elements.content.content_image.settings module

  • FIT_METHOD_CROP_SMART (string)
  • FIT_METHOD_CROP_CENTER (string)
  • FIT_METHOD_CROP_SCALE (string)
  • FIT_METHOD_FIT_WIDTH (string)
  • FIT_METHOD_FIT_HEIGHT (string)
  • DEFAULT_FIT_METHOD (string)
  • FIT_METHODS_CHOICES (tuple)
  • FIT_METHODS_CHOICES_WITH_EMPTY_OPTION (list)
  • IMAGES_UPLOAD_DIR (string)

Module contents