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

Related tags

Djangodjango
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
Adding Firebase Cloud Messaging Service into a Django Project

Adding Firebase Cloud Messaging Service into a Django Project The aim of this repository is to provide a step-by-step guide and a basic project sample

Seyyed Ali Ayati 11 Jan 03, 2023
A Django app for managing robots.txt files following the robots exclusion protocol

Django Robots This is a basic Django application to manage robots.txt files following the robots exclusion protocol, complementing the Django Sitemap

Jazzband 406 Dec 26, 2022
pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-dev 1.1k Dec 14, 2022
A Redis cache backend for django

Redis Django Cache Backend A Redis cache backend for Django Docs can be found at http://django-redis-cache.readthedocs.org/en/latest/. Changelog 3.0.0

Sean Bleier 1k Dec 15, 2022
A simple demonstration of integrating a sentiment analysis tool in a django project

sentiment-analysis A simple demonstration of integrating a sentiment analysis tool in a django project (watch the video .mp4) To run this project : pi

2 Oct 16, 2021
A web app which allows user to query the weather info of any place in the world

weather-app This is a web app which allows user to get the weather info of any place in the world as soon as possible. It makes use of OpenWeatherMap

Oladipo Adesiyan 3 Sep 20, 2021
Utilities to make function-based views cleaner, more efficient, and better tasting.

django-fbv Utilities to make Django function-based views cleaner, more efficient, and better tasting. 💥 📖 Complete documentation: https://django-fbv

Adam Hill 49 Dec 30, 2022
A simple Blog Using Django Framework and Used IBM Cloud Services for Text Analysis and Text to Speech

ElhamBlog Cloud Computing Course first assignment. A simple Blog Using Django Framework and Used IBM Cloud Services for Text Analysis and Text to Spee

Elham Razi 5 Dec 06, 2022
django+bootstrap5 实现的 个人博客

项目状态: 正在开发中【目前已基本可用】 项目地址: https://github.com/find456789/django_blog django_blog django+bootstrap5 实现的 个人博客 特点 文章的历史版本管理(随时回退) rss、atom markdown 评论功能

名字 3 Nov 16, 2021
Django Girls Tutorial Workshop

Django Girls Tutorial Workshop A log of activities during the workshop. this is an H2 git remote add origin https://github.com/ahuimanu/django_girls_t

Jeffry Babb 1 Oct 27, 2021
Radically simplified static file serving for Python web apps

WhiteNoise Radically simplified static file serving for Python web apps With a couple of lines of config WhiteNoise allows your web app to serve its o

Dave Evans 2.1k Dec 15, 2022
Wagtail - Vue - Django : The initial environment of full-stack local dev web app with wagtail and vue

Wagtail - Vue - Django : The initial environment of full-stack local dev web app with wagtail and vue. A demo to show how to use .vue files inside django app.

Quang PHAM 2 Oct 20, 2022
Meta package to combine turbo-django and stimulus-django

Hotwire + Django This repository aims to help you integrate Hotwire with Django 🚀 Inspiration might be taken from @hotwired/hotwire-rails. We are sti

Hotwire for Django 31 Aug 09, 2022
A pluggable Django application for integrating PayPal Payments Standard or Payments Pro

Django PayPal Django PayPal is a pluggable application that integrates with PayPal Payments Standard and Payments Pro. See https://django-paypal.readt

Luke Plant 672 Dec 22, 2022
REST API with Django and SQLite3

REST API with Django and SQLite3

Luis Quiñones Requelme 1 Nov 07, 2021
Django/Jinja template indenter

DjHTML A pure-Python Django/Jinja template indenter without dependencies. DjHTML is a fully automatic template indenter that works with mixed HTML/CSS

Return to the Source 378 Jan 01, 2023
A package to handle images in django

Django Image Tools Django Image Tools is a small app that will allow you to manage your project's images without worrying much about image sizes, how

The Bonsai Studio 42 Jun 02, 2022
A simple polling app made in Django and Bootstrap

DjangoPolls A Simple Polling app made with Django Instructions Make sure you have Python installed Step 1. Open a terminal Step 2. Paste the given cod

Aditya Priyadarshi 1 Nov 10, 2021
Full control of form rendering in the templates.

django-floppyforms Full control of form rendering in the templates. Authors: Gregor Müllegger and many many contributors Original creator: Bruno Renié

Jazzband 811 Dec 01, 2022
A quick way to add React components to your Django templates.

Django-React-Templatetags This django library allows you to add React (16+) components into your django templates. Features Include react components u

Fröjd Agency 408 Jan 08, 2023