Skip to main content

django-df-cards

Project description

Django DF Cards

Model mixins to provide image/title/description and other fields to be displayed as cards.

Installation:

  • Install the package
pip install django-df-cards

Usage:

from df_cards.models import TitledCard, ThumbnailMixin, FullImageMixin

class Post(TitledCard, ThumbnailMixin, FullImageMixin):
    pass

will give you Post model with the following fields:

  • title - CharField
  • description - TextField
  • thumbnail - ImageField
  • full_image - ImageField
  • sequence - PositiveIntegerField

Development

Installing dev requirements:

pip install -e .[test]

Installing pre-commit hook:

pre-commit install

Running tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-df-cards-0.1.1.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

django_df_cards-0.1.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page