Django's class-based generic views are awesome, let's have more of them.

Related tags

Django django
Overview

Build Status Coverage Status Documentation Status

Django Extra Views - The missing class-based generic views for Django

Django-extra-views is a Django package which introduces additional class-based views in order to simplify common design patterns such as those found in the Django admin interface.

Full documentation is available at read the docs.

Installation

Install the stable release from pypi (using pip):

pip install django-extra-views

Or install the current master branch from github:

pip install -e git://github.com/AndrewIngram/django-extra-views.git#egg=django-extra-views

Then add 'extra_views' to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'extra_views',
    ...
]

Features

  • FormSet and ModelFormSet views - The formset equivalents of FormView and ModelFormView.
  • InlineFormSetView - Lets you edit a formset related to a model (using Django's inlineformset_factory).
  • CreateWithInlinesView and UpdateWithInlinesView - Lets you edit a model and multiple inline formsets all in one view.
  • GenericInlineFormSetView, the equivalent of InlineFormSetView but for GenericForeignKeys.
  • Support for generic inlines in CreateWithInlinesView and UpdateWithInlinesView.
  • Support for naming each inline or formset in the template context with NamedFormsetsMixin.
  • SortableListMixin - Generic mixin for sorting functionality in your views.
  • SearchableListMixin - Generic mixin for search functionality in your views.
  • SuccessMessageMixin and FormSetSuccessMessageMixin - Generic mixins to display success messages after form submission.

Still to do

Add support for pagination in ModelFormSetView and its derivatives, the goal being to be able to mimic the change_list view in Django's admin. Currently this is proving difficult because of how Django's MultipleObjectMixin handles pagination.

Quick Examples

FormSetView

Define a FormSetView, a view which creates a single formset from django.forms.formset_factory and adds it to the context.

from extra_views import FormSetView
from my_forms import AddressForm

class AddressFormSet(FormSetView):
    form_class = AddressForm
    template_name = 'address_formset.html'

Then within address_formset.html, render the formset like this:

<form method="post">
  ...
  {{ formset }}
  ...
  <input type="submit" value="Submit" />
</form>

ModelFormSetView

Define a ModelFormSetView, a view which works as FormSetView but instead renders a model formset using django.forms.modelformset_factory.

from extra_views import ModelFormSetView


class ItemFormSetView(ModelFormSetView):
    model = Item
    fields = ['name', 'sku']
    template_name = 'item_formset.html'

CreateWithInlinesView or UpdateWithInlinesView

Define CreateWithInlinesView and UpdateWithInlinesView, views which render a form to create/update a model instance and its related inline formsets. Each of the InlineFormSetFactory classes use similar class definitions as the ModelFormSetView.

from extra_views import CreateWithInlinesView, UpdateWithInlinesView, InlineFormSetFactory


class ItemInline(InlineFormSetFactory):
    model = Item
    fields = ['sku', 'price', 'name']


class ContactInline(InlineFormSetFactory):
    model = Contact
    fields = ['name', 'email']


class CreateOrderView(CreateWithInlinesView):
    model = Order
    inlines = [ItemInline, ContactInline]
    fields = ['customer', 'name']
    template_name = 'order_and_items.html'


class UpdateOrderView(UpdateWithInlinesView):
    model = Order
    inlines = [ItemInline, ContactInline]
    fields = ['customer', 'name']
    template_name = 'order_and_items.html'

Then within order_and_items.html, render the formset like this:

<form method="post">
  ...
  {{ form }}

  {% for formset in inlines %}
    {{ formset }}
  {% endfor %}
  ...
  <input type="submit" value="Submit" />
</form>
Comments
  • Big Documentation Clean Up

    Big Documentation Clean Up

    This is a clean up and expansion of the documentation. It's the first time I've done any restructuring of docs so please let me know if you see any improvements needed. Maybe the formset views section is so large that they should be divided up into more manageable pages.

    I didn't modify the ListView documentation much as I'm not sure what their future is.

    opened by sdolemelipone 17
  • How do you pass variables as kwargs to formset forms?

    How do you pass variables as kwargs to formset forms?

    If I have a View like this:

    class CreateListingView(NamedFormsetsMixin, CreateWithInlinesView):
        model = MyModel
        form_class = MyModelForm
        inlines = [InlineFormsetInlineDerp1, InlineFormsetInlineDerp2]
        inlines_names = ['derp1', 'derp2']
    

    Is there a function on that view like this:

    def get_formset_kwargs(...):
        kwargs.update({'my_variable': some.variable})
    

    So that in my FORM of the formset I can do this:

    class Derp1Form(forms.ModelForm):
        def __init__(self, *args, **kwargs):
            self.my_variable= kwargs.pop('my_variable', None)
            super().__init__(*args, **kwargs)
            .....
    

    I have been hunting through this documentation and through the source, and haven't been able to do this yet, but this is a pretty common pattern. Almost thinking of going back to my FBV as I am wasting too much time on this library.

    opened by coler-j 12
  • Find someone to take over ownership of this project

    Find someone to take over ownership of this project

    As is probably clear from the number of open issues and pull requests, I'm not really paying much attention to this project. The reason is a combination of not really working with formsets (or even Django views) much anymore, and a lack of free time outside of work to commit to the project.

    So I'm looking for someone who is interested in taking over ownership of the project. It could be trialled by me adding the person as a contributor, and letting them look at the open issues and pull requests and getting things down to a reasonable number. Ideally this person would already be a moderately active open source contributor, so that we don't end up back in the current situation but under a different owner.

    I expect that once the backlog of issues is cleared, most work will just be related to keeping dependencies updated, and adding compatibility with future Django versions.

    Anybody interested?

    opened by AndrewIngram 12
  • Changing the model forms used in CreateWithInlinesView

    Changing the model forms used in CreateWithInlinesView

    I want to create a batch of invites. So there is a main form where I can name the batch and then an inline formset to allow the user to add 1+ email addresses. I want to control the forms used in each instance.

    While it seems to make use of my custom main form, it doesn't seem to be working for the inlines. It is just showing all fields for every inline.

    Here is an approximation of my setup:

    models.py

    class Batch(models.Model):
        name = models.CharField(...)
    
        other_field = ...
    
    class Invite(models.Model):
        email = models.EmailField(...)
        batch = models.ForeignKey(Batch)
    
        other_fields = ...
    

    forms.py

    from extra_views import InlineFormSet
    
    class BatchModelForm(forms.ModelForm):
        class Meta:
            model = Batch
            fields = ["name", ]
    
    class InviteModelForm(forms.ModelForm):
        class Meta:
            model = Invite
            fields = ["email", ]
    
    class InviteInlineFormSet(InlineFormSet):
        model = Invite
        form_class = InviteModelForm  # This doesn't seem to work
    

    views.py

    from .forms import InviteInlineFormSet, BatchModelForm
    from .models import Batch
    
    class BatchInviteView(CreateWithInlinesView):
        model = Batch
        form_class = BatchModelForm
        inlines = [InviteInlineFormSet, ]
    
        def get_success_url(self):
            ...
    

    I would expect the form_class attribute of the InviteInlineFormSet to give me control over the inline model form but this doesn't seem to be the case (while form_class = BatchModelForm on the BatchInviteView is correctly giving me control of the main model form class)

    Ready to work on Documentation 
    opened by timmyomahony 9
  • FieldDoesNotExist at /products/product/add/ ProductImages has no field named 'content_type'

    FieldDoesNotExist at /products/product/add/ ProductImages has no field named 'content_type'

    model 1

    class Products(models.Model):
        product_category = models.ForeignKey(ProductCategory)
        product_sub_category =  models.ForeignKey(ProductCategory)
        product_name = models.CharField(max_length = 200)
       is_active = models.BooleanField(default = True)
       and so on...
    

    model 2

    class ProductImages(models.Model):
        product = models.ForeignKey( Products )
        product_image = models.FileField(_('Attachment'), upload_to='attachments')
        is_active = models.BooleanField(default = True)
    

    GenericInlineFormSet

    class ProductImagesInline(GenericInlineFormSet):
        model = ProductImages
    

    CreateWithInlinesView

    class ProductCreate(CreateWithInlinesView):
        model = Products
        inlines = [ ProductImagesInline ]
        template_name = "products/product_add.html"
        fields = ['product_category', 'product_sub_category', 'product_name', 'size', 'color', 'price', 'price_info', 'description_1', 'description_2', 'about_product', 'features', 'specification']
        success_url = "products/product-list"
    

    I have cloned the repo and have used as app. I am trying to create a Product form and in the same form I want to add filefield to select and upload images. I am getting the above error. Frankly I did not understand how extra_views works. I just followed the readme and stuck here.

    Traceback:
    File "/home/kishor/workspace/gpsstops/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
      111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/kishor/workspace/gpsstops/env/local/lib/python2.7/site-packages/django/views/generic/base.py" in view
      69.             return self.dispatch(request, *args, **kwargs)
    File "/home/kishor/workspace/gpsstops/env/local/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
      87.         return handler(request, *args, **kwargs)
    File "/home/kishor/workspace/gpsstops/extra_views/advanced.py" in get
      123.         return super(BaseCreateWithInlinesView, self).get(request, *args, **kwargs)
    File "/home/kishor/workspace/gpsstops/extra_views/advanced.py" in get
      85.         inlines = self.construct_inlines()
    File "/home/kishor/workspace/gpsstops/extra_views/advanced.py" in construct_inlines
      69.             inline_formset = inline_instance.construct_formset()
    File "/home/kishor/workspace/gpsstops/extra_views/formsets.py" in construct_formset
      31.         formset_class = self.get_formset()
    File "/home/kishor/workspace/gpsstops/extra_views/generic.py" in get_formset
      42.         result = generic_inlineformset_factory(self.inline_model, **self.get_factory_kwargs())
    File "/home/kishor/workspace/gpsstops/env/local/lib/python2.7/site-packages/django/contrib/contenttypes/forms.py" in generic_inlineformset_factory
      70.     ct_field = opts.get_field(ct_field)
    File "/home/kishor/workspace/gpsstops/env/local/lib/python2.7/site-packages/django/db/models/options.py" in get_field
      398.         raise FieldDoesNotExist('%s has no field named %r' % (self.object_name, name))
    
    Exception Type: FieldDoesNotExist at /products/product/add/
    Exception Value: ProductImages has no field named 'content_type'
    
    opened by kishorpawar 9
  • Add initial_data support for formset

    Add initial_data support for formset

    There was a minor bug in the ModelFormsetMixin that was overriding the construct_formset method and not calling the get_initial_data method. It was a quick one line fix. Please pull as we have several developers using your excellent package.

    opened by henward0 9
  • ManagementForm Missing on CreateWithInlinesView

    ManagementForm Missing on CreateWithInlinesView

    How/Where is the management form in the context? I tried both {{ inlines.management_form }} and {{ form.management_form }}, but these don't work - hence the form doesn't validate.

    Using the simplest case, almost directly from the documentation:

    class SQDetailsInline(InlineFormSet):
        model = SQDetails
        fields = ('terminal','merchant',)
        exclude = ('pk','id','account')
        can_delete = False
        fk_name = 'account'
    
    class CreateOrderView(CreateWithInlinesView):
        model = SQAccount
        inlines = [SQDetailsInline]
        template_name = 'enter-order.html'
    
        def formset_valid(self,form):
            print form # this is here to force a 500
    
    opened by burhan 9
  • Formset kwargs (New)

    Formset kwargs (New)

    An up to date pull request for #115. Also addresses #123. A few notes on what I've done here:

    • Wherever possible. attempted to imitate functionality from FormView. That means calling get_initial and get_prefix to get class level attributes, but leaving all other kwargs to be set in either formset_kwargs or factory_kwargs. exclude and fields have been left at the class level for analogous reasons.
    • When setting mutable attributes at the class level, returning a copy of them to prevent them being modified.
    • can_delete is set to the default value automatically by the respective formset_factory of the class, so there is no need for us to set it by default.

    I was hoping to remove get_extra_form_kwargs completely but we need to wait until support is dropped for django 1.8.

    opened by sdolemelipone 8
  • passing initial data to a formset, doesn't show data_changed as true / does not save data

    passing initial data to a formset, doesn't show data_changed as true / does not save data

    Not sure if this is a deeper problem with Django ModelForms, or just this package.

    If I have a ModelFormSetView, to add Persons objects to a Trip object. I want to add some initial data to the forms, default names for each person, "Person 1", "Person 2" etc.

    class AddPersonsFormSetView(ModelFormSetView):
        model = Person
        template_name = 'AddPersons.html'
        extra = 1
        success_url = '/trip/%s/expense/add/'
    
         def get_formset_kwargs(self):
             kwargs = super(AddPersonsFormSetView, self).get_formset_kwargs()
             num_persons = self.kwargs['num_persons']
    
             ## inital data will give the name Person <increment> 
             initial = [ 
                 { 'name' : "Person %s" % i , 'trip' : self.kwargs['trip_id'] }  for i in range( 1, int(num_persons)+ 1)
             ]
    
             kwargs.update({'initial': initial })
             return kwargs
    

    Now if I change the values in the form, it saves correctly. If I leave the default values as they are, the PersonForm generated by the factory does not see the data_changed() as True, so doesn't save anything.

    I can work around this by creating the form, overriding the has_changed method, and specifying it in the get_factory_kwargs() method of the AddPersonFormSetView but this isn't an obvious solution until you step through the code. It doesn't not feel seem correct behaviour to ignore default values.

    class PersonForm(ModelForm):
        class Meta:
            model=Person   
    
        def has_changed(self):
            """
            Overriding this, as the initial data passed to the form does not get noticed, 
            and so does not get saved, unless it actually changes
            """
            changed_data = super(ModelForm, self).has_changed()
            return bool(self.initial or changed_data)
    
    
    
    class AddPersonsFormSetView(ModelFormSetView):
        ... 
        ... 
        def get_factory_kwargs(self):
            kwargs = super(AddPersonsFormSetView, self).get_factory_kwargs()
            kwargs['form'] = PersonForm
            return kwargs
    
    Ready to work on 
    opened by colinkingswood 8
  • Nested Formsets

    Nested Formsets

    Is it possible to do nested formsets with django-extra-views? I'm thinking of something along these lines: http://yergler.net/blog/2009/09/27/nested-formsets-with-django/ ... If it is possible, how would I do it?

    A secondary question: Is it possible to have a formset with nested forms? So I have a formset of Survey objects and I want each to also render/save/update a related model of

    opened by blanchardjeremy 8
  • Documentation build at readthedocs.io is failing

    Documentation build at readthedocs.io is failing

    https://readthedocs.org/projects/django-extra-views/builds/5606569/

    Ideas on what we can do to get it buliding again...looks like the last build attempt was in June 2017... @jonashaag do you have access at readthedocs? Could you take a look or grant me some login details so I can try and get it working? Thanks.

    opened by sdolemelipone 7
  • Add form_kwargs and get_form_kwargs for inline forms for solving issue #256

    Add form_kwargs and get_form_kwargs for inline forms for solving issue #256

    Using this Stack Overflow answer and this section of the Django documentation, I have solve the issue of missing form_kwargs as attribute of the formset_kwargs dictionary as mentioned in this section of the django-extra-views docs .

    To make the process of passing parameter to inline forms more easier and consistent, I have additionally added the form_kwargs and the get_form_kwargs for passing parameters into each inline forms at runtime or not.

    With these changes, to change the arguments which are passed into each form within the formset, two options are now available:

    • The first approach is done either by the form_kwargs argument passed in to the FormSet constructor as previously mentionned in the documentation (I have solved the bug issue);
    • The second approach (newly added) is done by simply declaring the form_kwargs option in the inline formset class or override the get_form_kwargs for passing parameters of inline forms at runtime.

    Here are some examples of using these news features. Note that, I use a fake Attribute class for the demonstration in theses examples, where the current user is passed into each inline forms:

    class AttributeInline(InlineFormSetFactory):
        model = models.Attribute
        form_class = AttributeForm
        form_kwargs = {"user": 1}
    

    Or override the get_form_kwargs for passing parameters of inline forms at runtime:

    class AttributeInline(InlineFormSetFactory):
        model = models.Attribute
        form_class = AttributeForm
    
        def get_form_kwargs(self):
            form_kwargs = super(AttributeInline, self).get_form_kwargs()
            form_kwargs["user"] = self.request.user
            return form_kwargs
    

    It is important to note that it can still be done using the get_formset_kwargs interface see docs. However, the form_kwargs declaration and get_form_kwargs interface are just more easier and consistent.

    Thanks,

    D. W. Liedji

    opened by dw-liedji 9
  • form_kwargs and get_form_kwargs for inline forms missing

    form_kwargs and get_form_kwargs for inline forms missing

    Hello everyone.

    Please, which parameter or method should one use if one wants to add parameter to inline forms at runtime or not. I have tried to use the formset_kwargs and setting the form_kwargs attribute of the formset_kwargs dictionary as shown in this section of the django-extra-views docs but it was not working as expected. I obtained the following error:

    Exception Type: KeyError at /creditium/inventories/product-types/add/
    Exception Value: 'form_kwargs'
    

    Here is the full traceback:

    Environment:
    
    Request Method: GET
    Request URL: http://127.0.0.1:8000/creditium/inventories/product-types/add/
    
    Django Version: 4.1.4
    Python Version: 3.8.8
    
    Traceback (most recent call last):
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
        response = get_response(request)
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/django/views/generic/base.py", line 103, in view
        return self.dispatch(request, *args, **kwargs)
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/django/views/generic/base.py", line 142, in dispatch
        return handler(request, *args, **kwargs)
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/extra_views/advanced.py", line 137, in get
        return super().get(request, *args, **kwargs)
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/extra_views/advanced.py", line 95, in get
        inlines = self.construct_inlines()
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/extra_views/advanced.py", line 79, in construct_inlines
        inline_formset = inline_instance.construct_formset()
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/extra_views/advanced.py", line 31, in construct_formset
        formset = super().construct_formset()
      File "/home/liedji/.local/share/virtualenvs/quanta-Yd3H_Mzp/lib/python3.8/site-packages/extra_views/formsets.py", line 38, in construct_formset
        return formset_class(**self.get_formset_kwargs())
      File "/home/liedji/liedji/djangoro/quanta/apps/inventories/views.py", line 315, in get_formset_kwargs
        kwargs["form_kwargs"].update({"initial": {"organization": 1}})
    
    Exception Type: KeyError at /creditium/inventories/product-types/add/
    Exception Value: 'form_kwargs'
    

    So, can we fix this to allow passing parameter to inline forms ? In addition, having a simple interface called form_kwargs et get_form_kwargs for inline forms for doing that will be more easier and more consistent for passing parameters of inline forms at runtime or not.

    opened by dw-liedji 0
  • View to use for non-model forms

    View to use for non-model forms

    Which view should one use if one wants to create forms/formsets that are not attached to models, ie something like CreateWithInlinesView with associated InlineFormsetFactory where there are no models?

    Or, a technique for managing such?

    Thanks

    opened by typonaut 3
  • setting “python_requires” with =3.5" is a better way to declare Python compatibility">

    setting “python_requires” with ">=3.5" is a better way to declare Python compatibility

    Hello! I notice that the dependency of this distribution

    install_requires=["Django >=2.1"]
    

    I found that Django>=2.1 requires Python>=3.5 , and you declare supported python:3.5+ in README. I guess you want to set python>=3.5. But I think it is a better way to declare Python compatibility by using the keyword argument python_requires than declaring that in README.rst:

    • Descriptions in python_requires will be reflected in the metadata
    • “pip install” can check such metadata on the fly during distribution selection , and prevent from downloading and installing the incompatible package versions.
    • If the user does not specify any version constraint, pip can automatically choose the latest compatible package version for users.

    Way to improve: modify setup() in setup.py, add python_requires keyword argument:

    setup(…
         python_requires=">=3.5",
         …)
    

    Thanks for your attention. Best regrads, PyVCEchecker

    opened by PyVCEchecker 1
  • [Feature] Use slug fields instead of pk in formset templates

    [Feature] Use slug fields instead of pk in formset templates

    Problem

    Let's assume, we have two models.

    models.py:

    class Survey(models.Model):
        uid = models.UUIDField(verbose_name='UID', unique=True, default=uuid7, editable=False)
        title = models.CharField(_('title'), max_length=255)
        description = models.TextField('description')
        is_active = models.BooleanField(
            'active',
            default=True,
            help_text='Designates whether this object should be treated as active. Unselect this instead of deleting objects.',
        )
        ...
    
    
    class Feature(models.Model):
        uid = models.UUIDField(verbose_name='UID', unique=True, default=uuid7, editable=False)
        survey = models.ForeignKey(
            Survey,
            on_delete=models.CASCADE,
            verbose_name='survey',
            related_name='features',
            related_query_name='feature',
        )
        display_name = models.CharField('display name', max_length=255)
        is_active = models.BooleanField(
            'active',
            default=True,
            help_text='Designates whether this object should be treated as active. Unselect this instead of deleting objects.',
        )
        ....
    

    Now we would like to use UpdateWithInlinesView.

    Let's view our form html:

    ...
    <input type="hidden" name="features-0-id" value="7" id="id_features-0-id">
    ...
    <input type="hidden" name="features-1-id" value="8" id="id_features-1-id">
    ...
    <input type="hidden" name="features-2-id" value="9" id="id_features-2-id">
    

    We have Feature instance ids there for each of formset members. It's acceptable for most of projects but we may want to use slug fields (uid in this case).

    We have motivation to do it if we use integer PK (for performance reasons) and would like to prevent marketing tracking from our competitors (they may create new features every month and compare feature ids to each other to answer questions like how much new surveys do we have in this month and so on).

    form html:

    ...
    <input type="hidden" name="features-0-id" value="0183a330-a8d5-77c2-a3d7-166d6f1c1fe7" id="id_features-0-id">
    ...
    

    Solution

    We replace slugs (uids) to ids here during processing POST data. First step: we create uids list. Second step: we load features list of dicts with id and uid data from database based on uids values. Third step: we replace slugs to id if we know how to do it (we read features).

    class FeatureUpdateInline(InlineFormSetFactory):  # type: ignore
        ...
        form_class = FeatureInlineForm
        formset_class = BaseFeatureFormSet
        model = Feature
        fields = ('display_name', )
        ...
    
        @staticmethod
        def process_post_data(obj, post_data):
            object_id = str(obj.id)
            changes = {}
            uids = []
            # 1
            for field_name, value in post_data.items():
                if field_name.endswith('-id'):
                    uids.append(value)
            # 2
            features = obj.features.filter(is_active=True, uid__in=uids).values('id', 'uid')
            # 3
            for field_name, value in post_data.items():
                if field_name.endswith('-id'):
                    for feature in features:
                        if value == str(feature['uid']):
                            changes[field_name] = str(feature['id'])
    
            return changes
    
        def get_formset_kwargs(self):
            kwargs = super().get_formset_kwargs()
            if self.request.method in ("POST", "PUT"):
    
                kwargs['data'].update(self.process_post_data(obj=self.object, post_data=kwargs['data']))
                print(kwargs['data'].dict())
    
            return kwargs
    
    
    class SurveyUpdateView(
        ...
        NamedFormsetsMixin,
        UpdateWithInlinesView,
    ):
        ...
        form_class = SurveyUpdateForm
        inlines = [FeatureUpdateInline]
        inlines_names = ['Features']
        ...
    

    Suggestions

    1. Do you have suggestions how to refactor this code?
    2. Can we somehow add this feature to django-extra-views?
    opened by lorddaedra 3
Releases(0.7.1)
Owner
Andy Ingram
Andy Ingram
The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.

django-crispy-forms The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered

null 4.6k Jan 7, 2023
Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

foorilla LLC 4 May 18, 2022
Django query profiler - one profiler to rule them all. Shows queries, detects N+1 and gives recommendations on how to resolve them

Django Query Profiler This is a query profiler for Django applications, for helping developers answer the question "My Django code/page/API is slow, H

Django Query Profiler 116 Dec 15, 2022
A generic system for filtering Django QuerySets based on user selections

Django Filter Django-filter is a reusable Django application allowing users to declaratively add dynamic QuerySet filtering from URL parameters. Full

Carlton Gibson 3.9k Jan 3, 2023
Displaying objects on maps in the Django views and administration site.

DjangoAdminGeomap library The free, open-source DjangoAdminGeomap library is designed to display objects on the map in the Django views and admin site

Vitaly Bogomolov 31 Dec 28, 2022
Get inside your stronghold and make all your Django views default login_required

Stronghold Get inside your stronghold and make all your Django views default login_required Stronghold is a very small and easy to use django app that

Mike Grouchy 384 Nov 23, 2022
Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.

Django Activity Stream What is Django Activity Stream? Django Activity Stream is a way of creating activities generated by the actions on your site. I

Justin Quick 2.1k Dec 29, 2022
Reusable, generic mixins for Django

django-braces Mixins for Django's class-based views. Documentation Read The Docs Installation Install from PyPI with pip: pip install django-braces Bu

Brack3t 1.9k Jan 5, 2023
Flashback is an awesome, retro IRC based app built using Django

Flashback Flashback is an awesome, retro IRC based app built using Django (and the Django Rest Framework) for the backend as well as React for the fro

Unloading Gnat 1 Dec 22, 2021
Awesome Django Markdown Editor, supported for Bootstrap & Semantic-UI

martor Martor is a Markdown Editor plugin for Django, supported for Bootstrap & Semantic-UI. Features Live Preview Integrated with Ace Editor Supporte

null 659 Jan 4, 2023
Awesome Django Blog App

Awesome-Django-Blog-App Made with love django as the backend and Bootstrap as the frontend ! i hope that can help !! Project Title Django provides mul

ANAS NABIL 2 Feb 8, 2022
Repo for All the Assignments I have to submit for Internship Application !😅

Challenges Repository for All the Assignments I have to submit for Internship Application ! ?? As You know, When ever We apply for an Internship, They

keshav Sharma 1 Sep 8, 2022
Add Chart.js visualizations to your Django admin using a mixin class

django-admincharts Add Chart.js visualizations to your Django admin using a mixin class. Example from django.contrib import admin from .models import

Dropseed 22 Nov 22, 2022
Automatic class scheduler for Texas A&M written with Python+Django and React+Typescript

Rev Registration Description Rev Registration is an automatic class scheduler for Texas A&M, aimed at easing the process of course registration by gen

Aggie Coding Club 21 Nov 15, 2022
An orgizational tool to keep track of tasks/projects and the time spent on them.

Django-Task-Manager Task Tracker using Python Django About The Project This project is an orgizational tool to keep track of tasks/projects and the ti

Nick Newton 1 Dec 21, 2021
Create a netflix-like service using Django, React.js, & More.

Create a netflix-like service using Django. Learn advanced Django techniques to achieve amazing results like never before.

Coding For Entrepreneurs 67 Dec 8, 2022
A Django based shop system

django-SHOP Django-SHOP aims to be a the easy, fun and fast e-commerce counterpart to django-CMS. Here you can find the full documentation for django-

Awesto 2.9k Dec 30, 2022
💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

Fast to learn, fast to code, fast to run Django Ninja - Fast Django REST Framework Django Ninja is a web framework for building APIs with Django and P

Vitaliy Kucheryaviy 3.8k Jan 1, 2023
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.

The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango. It requires a django-leaflet package.

Vsevolod Novikov 33 Nov 11, 2022