Django datatables and widgets, both AJAX and traditional. Display-only ModelForms.

Overview

django-jinja-knockout

PyPI package https://circleci.com/gh/Dmitri-Sintsov/django-jinja-knockout.svg?style=shield https://img.shields.io/travis/Dmitri-Sintsov/django-jinja-knockout.svg?style=flat Watch selenium tests recorded videos. Join the chat at https://gitter.im/django-jinja-knockout/Lobby Donate to support further development

Screenshot of the sample project:

https://raw.githubusercontent.com/wiki/Dmitri-Sintsov/djk-sample/djk_edit_inline.png

More screenshots with descriptions are available at: https://github.com/Dmitri-Sintsov/djk-sample/wiki

Documentation (in development): https://django-jinja-knockout.readthedocs.org/

  • Supports Django 2.2 LTS, 3.0, 3.1; Python 3.6 / 3.7 / 3.8 / 3.9.

Please contribute to the localization of the project:

Localization:

  • Chinese: goldmonkey
  • Dutch: Melvyn Sopacua
  • Polish: pawelkoston
  • Spanish: Julio Cesar Cabrera Cabrera, kiwnix

Key features

  • AJAX based django.admin-like paginated datatables (grids) with sorting / filters and custom actions.

  • Integrates Jinja2 into existing Django templates (DTL).

  • Bootstrap 3 / Bootstrap 4 / Jinja2 / Knockout.js for Django projects.

  • No deep knowledge of Knockout.js is required: it has ready working components.

  • Dynamic adding / removing of inline formsets with Knockout.js, protected from XSS.

  • Default template renderers for Django forms / related forms / inline formsets with the possibility to override these to customize the visual layout.

  • ForeignKeyGridWidget provides ForeignKeyRawIdWidget-like functionality to select ModelForm foreign key field value via AJAX query / response.

  • Django raw queries with filter() / exclude() / order() / values() / values_list() and SQL slicing support via FilteredRawQuerySet, suitable for usage in ListView / ListSortingView / KoGridView derived classes.

  • ListQuerySet to query Python lists, including prefetch_related() results.

  • Jinja2 templates can be integrated into existing Django templates via custom template library tag:

    {% extends 'base_min.html' %}
    {% load jinja %}
    {% load static %}
    
    {% block main %}
    {% jinja 'bs_list.htm' with _render_=1 view=view object_list=object_list is_paginated=is_paginated page_obj=page_obj %}
    {% endblock main %}
    

Overview

Knockout.js uses unobtrusive data-bind HTML attributes with JSON-like values with causes no conflict to server-side double braces template syntax of DTL / Jinja2: no need to escape templates.

Combining client-side Knockout.js templates and server-side Jinja2 templates allows to write more powerful and compact template code.

Jinja2 is faster and is more powerful than built-in DTL templates. Jinja2 templates may be called from DTL templates by using custom template tag library {% load jinja %}.

Uses

It's not a pure SPA framework, but a mixed approach of server-side pages with embedded AJAX content and client-side scripts. Although it may be used for SPA as well. Classical Web applications aren't "outdated" in any way - because such applications are much better indexable by web crawlers, Python is better language than Javascript in general, also server-side has less glitches than browsers.

Version 1.1.0

Optional separate action handlers for HTTP methods.

RangeFilter / DateFilter / DateTimeFilter ListSortingView filters for numeric / DateField / DateTimeField Django model fields.

ListQuerySet supports ordering by prefetched reverse relation list field name: qs.order_by('reverse_relation_list__field_name')

Automatic client-side localization.

Support of Selenium 4. Additional Selenium commands. Improved Selenium logging.

Documentation

The full documentation is at https://django-jinja-knockout.readthedocs.org.

Quick notes

Cookiecutter Tools Used in Making This Package

  • cookiecutter
  • cookiecutter-djangopackage
Comments
  • Default selection/Not required selection ForeignKeyGridWidget

    Default selection/Not required selection ForeignKeyGridWidget

    I have 2 issues and solving either will do what I need. Everything shows up and works. I might be asking about features, but I feel like I am missing something obvious.

    Marking fields as not required does not seem to work. The text is not bold so I can tell there is a change. I still get Select a valid choice. That choice is not one of the available choices.

    'KoGridRelationView' referenced below. registrar = models.ForeignKey(AccountRegistrarModel, on_delete=models.CASCADE, blank=True, null=True, verbose_name='Default Registrar') widgets = {'registrar': ForeignKeyGridWidget(grid_options={ 'pageRoute': 'account_registrar_fk_widget', 'dialogOptions': {'size': 'size-wide'}, # Override default search field label (optional): 'searchPlaceholder': 'Search For account', 'required': False, }),

    I see you did that here on line 38. but its for a different thing i think? https://github.com/Dmitri-Sintsov/djk-sample/blob/3805ad9b9731df6933feda86a75e9aa3b616399a/club_app/forms.py

    other thing I would like to do is set default options. Like there are 20 themes but the user has a favorite. This would also solve the above problem in a messy patch way with a universal default of none option.

    Everything else has been so easy once I found it. But I have looked for a day or two now and I cant figure it out. Hope to make some pull requests soon best I can.

    opened by bobsburgers 10
  • Please Help - Middleware Error

    Please Help - Middleware Error

    Error related to middleware

    DJK_MIDDLEWARE

    TypeError: init() takes 1 positional argument but 2 were given

    Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x10c636940>
    Traceback (most recent call last):
      File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 589, in __call__
        return self.original_func(*self.args, **self.kwargs)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
        fn(*args, **kwargs)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 140, in inner_run
        handler = self.get_handler(*args, **options)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
        handler = super().get_handler(*args, **options)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 65, in get_handler
        return get_internal_wsgi_application()
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 44, in get_internal_wsgi_application
        return import_string(app_path)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/utils/module_loading.py", line 17, in import_string
        module = import_module(module_path)
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/Users/Tushar/workspace/hcl/hcl/hcl/wsgi.py", line 16, in <module>
        application = get_wsgi_application()
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
        return WSGIHandler()
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 140, in __init__
        self.load_middleware()
      File "/Users/Tushar/workspace/hcl/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 39, in load_middleware
        mw_instance = middleware(handler)
    TypeError: __init__() takes 1 positional argument but 2 were given
    
    

    My Settings.py

    """
    Django settings for hcl project.
    
    Generated by 'django-admin startproject' using Django 2.0.
    
    For more information on this file, see
    https://docs.djangoproject.com/en/2.0/topics/settings/
    
    For the full list of settings and their values, see
    https://docs.djangoproject.com/en/2.0/ref/settings/
    """
    
    import os
    import random
    from distutils.version import LooseVersion
    
    import environ
    from django import get_version
    from django.utils import timezone
    
    root = environ.Path(__file__) - 0  # three folder back (/a/b/c/ - 3 = /)
    get_env_variable = environ.Env(DEBUG=(bool, False), )
    environ.Env.read_env()
    
    # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
    BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    
    # Quick-start development settings - unsuitable for production
    # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
    
    # SECURITY WARNING: keep the secret key used in production secret!
    SECRET_KEY = get_env_variable('SECRET_KEY')
    
    # SECURITY WARNING: don't run with debug turned on in production!
    DEBUG = get_env_variable('DEBUG')
    
    ALLOWED_HOSTS = []
    
    # Application definition
    JS_ERRORS_ALERT = DEBUG
    # Requires proper setup of Django email error logging.
    JS_ERRORS_LOGGING = not DEBUG
    
    DJK_APPS = (
        'hcl',
        'models_',
        'event_app',
    )
    
    INSTALLED_APPS = (
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        'django.contrib.sites',
        'django_jinja',
        'django_jinja.contrib._humanize',
        'django_jinja_knockout',
        'django_jinja_knockout._allauth',
        )+DJK_APPS+(
        'allauth',
        'allauth.account',
        # Required for socialaccount template tag library despite we do not use social login
        'allauth.socialaccount'
    )
    
    DJK_MIDDLEWARE = 'hcl.middleware.ContextMiddleware'
    
    MIDDLEWARE = [
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.messages.middleware.MessageMiddleware',
        'django.middleware.clickjacking.XFrameOptionsMiddleware',
        'django.middleware.security.SecurityMiddleware',
    ]
    
    if LooseVersion(get_version()) >= LooseVersion('1.11'):
        MIDDLEWARE.append(DJK_MIDDLEWARE)
    else:
        MIDDLEWARE_CLASSES = MIDDLEWARE
        MIDDLEWARE.extend([
            'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
            DJK_MIDDLEWARE,
        ])
    AUTHENTICATION_BACKENDS = (
        # Needed to login by username in Django admin, regardless of `allauth`
        'django.contrib.auth.backends.ModelBackend',
        # `allauth` specific authentication methods, such as login by e-mail
        'allauth.account.auth_backends.AuthenticationBackend',
    )
    
    LOGGING = {
        'version': 1,
        'disable_existing_loggers': False,
        'filters': {
            'require_debug_false': {
                '()': 'django.utils.log.RequireDebugFalse',
            }
        },
        'handlers': {
            'file': {
                'level': 'DEBUG',
                'class': 'logging.FileHandler',
                'filename': os.path.join(BASE_DIR, 'logs', 'django_log.sql'),
            },
            'mail_admins': {
                'level': 'ERROR',
                'filters': ['require_debug_false'],
                'class': 'django.utils.log.AdminEmailHandler',
                'include_html': True,
            }
        },
        'loggers': {
            'django': {
                'handlers': ['file', 'mail_admins'],
                'level': 'DEBUG',
                'propagate': True,
            },
        },
    }
    
    ROOT_URLCONF = 'hcl.urls'
    
    try:
        # Django > 1.9
        from django.template.context_processors import i18n
        i18n_processor = 'django.template.context_processors.i18n'
    except ImportError:
        from django.core.context_processors import i18n
        i18n_processor = 'django.core.context_processors.i18n'
    
    
    TEMPLATES = [
        {
            "BACKEND": "django_jinja.backend.Jinja2",
            "APP_DIRS": True,
            "OPTIONS": {
                "match_extension": ".htm",
                "app_dirname": "jinja2",
                'context_processors': [
                    i18n_processor,
                    # For simple cases it is enough to include original template context processor (commented out).
                    'hcl.context_processors.template_context_processor'
                    # 'django_jinja_knockout.context_processors.template_context_processor'
                ]
            },
        },
        {
            'BACKEND': 'django.template.backends.django.DjangoTemplates',
            'DIRS': [],
            'APP_DIRS': True,
            'OPTIONS': {
                'context_processors': [
                    'django.template.context_processors.debug',
                    'django.template.context_processors.request',
                    'django.contrib.auth.context_processors.auth',
                    'django.contrib.messages.context_processors.messages',
                    # Next line is required only if project uses Django templates (DTL).
                    'hcl.context_processors.template_context_processor'
                ],
            },
        },
    ]
    
    WSGI_APPLICATION = 'hcl.wsgi.application'
    
    # Database
    # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
    
    DATABASES = {
        'default': get_env_variable.db(),
        'sqllite': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
        },
    'TEST': {
                'NAME': ':memory:',
                # 'NAME': os.path.join(BASE_DIR, 'test.sqlite3'),
            },
    }
    
    # Password validation
    # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
    
    AUTH_PASSWORD_VALIDATORS = [
        {
            'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
        },
        {
            'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        },
        {
            'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
        },
        {
            'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
        },
    ]
    
    # Internationalization
    # https://docs.djangoproject.com/en/2.0/topics/i18n/
    
    LANGUAGE_CODE = 'en-us'
    
    TIME_ZONE = 'UTC'
    
    USE_I18N = True
    
    USE_L10N = True
    
    USE_TZ = True
    
    
    # Static files (CSS, JavaScript, Images)
    # https://docs.djangoproject.com/en/1.8/howto/static-files/
    
    STATIC_URL = '/static/'
    
    STATIC_ROOT = os.path.join(BASE_DIR, 'static')
    
    # List of finder classes that know how to find static files in
    # various locations.
    STATICFILES_FINDERS = (
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
        # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
    )
    
    # Next setting is required so multiple Django instances running at the same host/IP with different ports
    # do not interfere each other (apollo13).
    SESSION_COOKIE_NAME = 'djk_sessionid'
    
    # As this is the test application, registration with SMTP confirmation is not supported.
    # Use:
    """ python manage.py createsuperuser """
    # or:
    """
    python manage.py shell
    from django.contrib.auth.models import User
    user = User.objects.create_user('user', email='[email protected]', password='test123')
    user.save()
    exit()
    """
    
    # For 'allauth'.
    SITE_ID = 1
    # Prevents infinite redirect when user has no permission to access current view.
    ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = False
    ALLAUTH_DJK_URLS = True
    
    # Login / logout for allauth.
    LOGIN_URL = '/accounts/login/'
    LOGIN_REDIRECT_URL = "/"
    LOGOUT_URL = '/accounts/logout/'
    
    # Pagination settings.
    OBJECTS_PER_PAGE = 3 if DEBUG else 10
    
    # unit testing settings
    FIXTURE_DIRS = (
        os.path.join(BASE_DIR, 'fixtures'),
    )
    
    random.seed(timezone.now().timestamp())
    

    Please help what am I missing ??

    opened by tusharcoder 4
  • Would you consider relicensing to a permissive license?

    Would you consider relicensing to a permissive license?

    Can the license be changed back to BSD or perhaps changed to Apache 2.0 if you no longer want to use the BSD license.

    This library is awesome, but unfortunately the GPL is arguably the worst family in terms of legal risks. No joke, I was once told by a project manager it would be cheaper to hire a javascript developer to build a react app and just use Django Rest Framework, than it would be to get their lawyers to 'approve' the use of this library because its GPL.

    If the GPL change was an deliberate copyright/copyleft ethics driven choice, fair enough, its your code, and I respect your choice. But I can't tell from the commit message so all I can do is ask. 😄

    opened by techdragon 3
  • Request for help

    Request for help

    Hi Dmitri, I'm new to django. I'm using python 3.6.1 with django 1.11.2 and django_jinja_knockout from git (master). I am trying to get a simple grid working, the simplest grid as described in the Usage section of the docs. I am not overriding middleware.py or the context processor. I have a breakpoint in template_context_process() in your library. The break point gets hit on requests, such as http://127.0.0.1:8000/admin/

    I have defined a url

    url(r'^customer(?P<action>/?\w*)/$', SimpleCustomerGrid.as_view(), name='customer_grid',
             kwargs={'view_title': 'Simple customer grid'}),
    
    

    and the view object is:

    class SimpleCustomerGrid(KoGridView):
        model = Customer
        grid_fields = '__all__'
        # Remove next line to disable columns sorting:
        allowed_sort_orders = '__all__'
    
    

    visiting the url http://127.0.0.1:8000/customer/ gives this error:

    AttributeError at /customer/
    
    'WSGIRequest' object has no attribute 'client_routes'
    

    and the breakpoint on template_context_process() is not being hit. I have looked and looked for differences between what I'm doing and the sample app, and I can't find the problem. Why is a visit to /customer/ not triggering the breakpoint in template_context_process() ?

    opened by timrichardson 3
  • format_lazy missing import on ./forms/renderers.py

    format_lazy missing import on ./forms/renderers.py

    Missing import format_lazy on ./forms/renderers.py

    this commit adds a dependency fix for old python versions adding format_lazy to the main tpl.py commit e5c9f7478f4d46a003743a1f3be293f55fd5c7b8 Author: Dmitriy Sintsov [email protected] Date: Thu Jun 21 11:55:44 2018 +0300

    this one remove it. commit 15b76980dedbe1459127264fac9ff7c93ac4681d Author: Dmitriy Sintsov [email protected] Date: Tue Feb 19 18:44:26 2019 +0300

    opened by bobsburgers 2
  • KoGridView grid_fields use m2m field throws Invalid JSON data

    KoGridView grid_fields use m2m field throws Invalid JSON data

    Hi, first of all, thanks for this work, it really helps to simplify stuff.

    Now my question, it's possible to use and m2m field as a grid_fields in KoGridView? I ask this because I have an KoGridView and in grid_fields I want to display Django user groups like this:

    grid_fields = [
            ("username", "Username"),
            ("first_name", "Name"),
            ("last_name", "Last Name"),
            ("groups", "Groups"),
        ]
    

    But when it's time to render the KoGridView throws this error:

    Invalid JSON data, key path: 0 / entries / 1 / groups, val type: django.db.models.fields.related_descriptors.create_forward_many_to_many_manager..ManyRelatedManager

    I need to specify this differently in grid_fields? I also tried 'groups__name' but the result it's always None. Also tried to format it in get_row_str_fields() method, but same error comes.

    How it's the correct way to achive this? The only way is with virtual fields?

    opened by elros244 2
  • Does this still work with Django 2.2

    Does this still work with Django 2.2

    Hi, I found the implementation fo RawFilteredQueryset through an old stack overflow question. This is exactly what we were looking for. Any thing we should watch out for running it in Django 2.2 ? Any reason it would break upgrade to 3.x ?

    https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/7cfe1105cefe62a04c16dd1f350b342731b0aca5/django_jinja_knockout/query.py#L38

    Thanks

    opened by talolard 2
  • jinja2 contextfunction depreciated

    jinja2 contextfunction depreciated

    jinja2 dependency has removed contextfunction

    https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0

    need to change requirements to something like Jinja2~=3.0.3

    https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/requirements.txt

    opened by bobsburgers 1
  • Reduce the possibility of circular import in forms.base and templatetags/fields.py

    Reduce the possibility of circular import in forms.base and templatetags/fields.py

    I was having circular import problems in my project with django-jinja-knockout, this commit solves it in a similar way i have seen on the commit history.

    opened by kiwnix 1
  • Check if removecomponent function is defined before calling it

    Check if removecomponent function is defined before calling it

    When adding bs_tabs inside a form that is displayed inside a modal (for example an edit form from a grid element), when closing the modal an error shows that component.removeComponent is undefined. Adding this check avoids this error, but I don't know if this is the correct solution or the bootstrap tabs need a definition of this function.

    opened by kiwnix 0
  • Check if sites is enabled before trying to use/include it

    Check if sites is enabled before trying to use/include it

    Fixed an error when using the MockRequestFactory and django.contrib.sites is not in installed apps:

    The error happening was:

    RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
    
    opened by kiwnix 0
Releases(v2.1.0)
  • v2.1.0(Jun 18, 2022)

  • v2.0.0(Apr 4, 2022)

    Built-in es6 modules support for modern browsers.

    Optional SystemJS loader support for IE11 via django_deno.

    Optional minified terser bundles support both for es6 modules and for SystemJS loader via django_deno.

    datatables support separate cell click actions, not just row actions.

    More throughout support for datatables annotated fields / virtual fields via grid_fields dicts.

    Optional lazy registration of client-side components.

    Numerous fixes, including improved related grid view kwargs auto-detection, see pageRouteKwargsKeys and pageRouteKwargsKeys example.

    ListRangeFilter for ListSortingView range fields.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Feb 9, 2021)

    Optional separate action handlers for HTTP methods.

    RangeFilter / DateFilter / DateTimeFilter ListSortingView filters for numeric / DateField / DateTimeField Django model fields.

    ListQuerySet supports ordering by prefetched reverse relation list field name: qs.order_by('reverse_relation_list__field_name')

    Automatic client-side localization.

    Support of Selenium 4. Additional Selenium commands. Improved Selenium logging.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jun 17, 2020)

    Django 3.1a1 / Bootstrap 4.5 / Knockout 3.5 support.

    MultipleKeyGridWidget edit many to many relationships for Django models.

    PageContext to inject view title / client data / client routes / custom scripts to templates via TemplateResponse.

    Improved Bootstrap popovers support.

    Support for Nested components in formsets.js (empty_form) 'anonymous_template' Knockout binding.

    UrlPath class supports automatic re_path() generation with positional named keyword arguments.

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Jan 31, 2019)

    • Supports both Bootstrap 4 and Bootstrap 3 via pluggable djk_ui application.
    • Renderer classes provides customizable layouts for fields / forms / related forms / inline formsets.
    • Underscore.js templates support template attributes merging and custom tags.
    • Nested / sparse components.
    • Nested serializer.
    Source code(tar.gz)
    Source code(zip)
  • 0.7.1(Feb 15, 2018)

    Grids (datatables) compound columns support. New built-in action type 'pagination'.

    Optional built-in Javascript error logger.

    AJAX forms / viewmodels improvements and refactoring.

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Sep 12, 2017)

    AJAX actions are rewritten as server-side ActionsView class and client-side counterpart App.Actions. It is now used as foundation for most of AJAX code, including grid datatables and new App.EditForm / App.EditInline client-side components.

    New widget widgets.PrefillWidget to select pre-filled text from the list of supplied values.

    Selective skipping of DisplayText field widget rendering.

    Basic version of ViewmodelValidator for AJAX submitted forms.

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Apr 18, 2017)

    Rewritten recursive underscore.js template processor.

    Displaying verbose field names in grid rows, grid row actions and in ForeignKeyGridWidget related model field placeholder.

    Clean-up of client-side components code.

    Better support for grids that use RAW queries with LEFT JOIN, which may have multiple rows with the same pkVal.

    Improvements in Selenium automation testing: better handling of automation commands, more of commands implemented, much larger test coverage.

    Numerous bugfixes, including related field queries support in FilteredRawQuerySet.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Mar 3, 2017)

    • Compatibility to Django 1.10+ new-style middleware (thanks to Melvyn Sopacua).
    • Fixed pagination when multiple filter field choices are selected in views.ListSortingView.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Feb 23, 2017)

    ListSortingView now supports multiple_choices option of the choices filter.

    Large monolithic views.py was split into separate base.py / detail_edit.py / list.py / ajax.py class-based views.

    Alternative breadcrumbs layout of field filters widgets in ko_grid_body() macro used by KoGridView.

    Various bugfixes and security fixes.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Feb 7, 2017)

    Large improvements in Selenium testing support: additional commands are implemented, auto-retry on DOM timeout, fixtures loading / saving which allows to skip already debugged parts of tests, saving developer's time.

    ContextMiddleware supports request mocking and request-time storage.

    FilteredRawQuerySet supports Q expressions (Q objects) with relation mapping.

    BaseFilterView / KoGridView - basic support for Q expressions (currently is used for None value of field filter), support for in query for choice filter value via the list of values.

    Even better support of optional Django model get_str_fields() method in DisplayText widget and in Knockout.js grids.

    Various bugfixes.

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Nov 17, 2016)

    AJAX grids implement new types of filters. Autodiscover of foreign key filter fields options when possible.

    Two new types of querysets - one to filter / order / silce raw queries, second one implements large part of Django queryset functionality for lists of Django model instances, returned by .prefetch_related().

    ListSortingView (non-AJAX datatables) improvements.

    SendmailQueue is extensible now via optional ioc class, which allows to use database / celery to implement background email queues.

    Source code(tar.gz)
    Source code(zip)
Login System Django

Login-System-Django Login System Using Django Tech Used Django Python Html Run Locally Clone project git clone https://link-to-project Get project for

Nandini Chhajed 6 Dec 12, 2021
An insecure login and registration website with Django.

An insecure login and registration website with Django.

Luis Quiñones Requelme 1 Dec 05, 2021
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
Basic implementation of Razorpay payment gateway 💳 with Django

Razorpay Payment Integration in Django 💥 In this project Razorpay payment gateway 💳 is integrated with Django by breaking down the whole process int

ScaleReal 12 Dec 12, 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
Django datatables with htmx.

Django datatables with htmx.

Regis Santos 7 Oct 23, 2022
I managed to attach the Django Framework to my Telegram Bot and set a webhook

I managed to attach the Django Framework to my Telegram Bot and set a webhook. I've been developing it from 10th of November 2021 and I want to have a basic working prototype.

Valentyn Vovchak 2 Sep 08, 2022
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes

Bleach Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. Bleach can also linkify text safely, appl

Mozilla 2.5k Dec 29, 2022
Use watchfiles in Django’s autoreloader.

django-watchfiles Use watchfiles in Django’s autoreloader. Requirements Python 3.7 to 3.10 supported. Django 2.2 to 4.0 supported. Installation Instal

Adam Johnson 43 Dec 14, 2022
Domain-driven e-commerce for Django

Domain-driven e-commerce for Django Oscar is an e-commerce framework for Django designed for building domain-driven sites. It is structured such that

Oscar 5.6k Jan 01, 2023
Official clone of the Subversion repository.

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. All documentation is in the "docs" directo

Raymond Penners 3 May 06, 2022
scaffold django rest apis like a champion 🚀

dr_scaffold Scaffold django rest apis like a champion âš¡ . said no one before Overview This library will help you to scaffold full Restful API Resource

Abdenasser Elidrissi 133 Jan 05, 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
Bringing together django, django rest framework, and htmx

This is Just an Idea There is no code, this README just represents an idea for a minimal library that, as of now, does not exist. django-htmx-rest A l

Jack DeVries 5 Nov 24, 2022
Mobile Detect is a lightweight Python package for detecting mobile devices (including tablets).

Django Mobile Detector Mobile Detect is a lightweight Python package for detecting mobile devices (including tablets). It uses the User-Agent string c

Botir 6 Aug 31, 2022
Drf-stripe-subscription - An out-of-box Django REST framework solution for payment and subscription management using Stripe

Drf-stripe-subscription - An out-of-box Django REST framework solution for payment and subscription management using Stripe

Oscar Y Chen 68 Jan 07, 2023
A Django backed for PostgreSQL using Psycopg 3

A Django backend for PostgreSQL using Psycopg 2 The backend passes the entire Django test suite, but it needs a few modifications to Django and to i

Daniele Varrazzo 42 Dec 16, 2022
Intellicards-backend - A Django project bootstrapped with django-admin startproject mysite

Intellicards-backend - A Django project bootstrapped with django-admin startproject mysite

Fabrizio Torrico 2 Jan 13, 2022
A Django Webapp performing CRUD operations on Library Database.

CRUD operations - Django Library Database A Django Webapp performing CRUD operations on Library Database. Tools & Technologies used: Django MongoDB HT

1 Dec 05, 2021
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