Saravanan666/pypi-org huggingface dataset:
Package: django-dynamic-filters
A django ModelAdmin Filter which adds advanced filtering abilities to the admin.creating filtersusing filtersRequirementsDjango >= 4.0 on Python 3.9+/PyPy3django-admin-sortable2andfurlInstallation & Set upRunpip installdjango-dynamic-filtersto install dynfilters.Add “dynfilters” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'adminsortable2',
    'dynfilters',
]Add “dynfilters” URL to your urls.py file:urlpatterns = [
    ...
    path('dynfilters/', include('dynfilters.urls')),
]Runpython manage.py migrateto create the dynfilters models.Runpython manage.py collectstaticto install the dynfilters media.Integration Examplemodels.pyclassAddress(models.Model):town=models.CharField(max_length=32)classPerson(models.Model):first_name=models.CharField(max_length=32)last_name=models.CharField(max_length=32)birth_date=models.DateField()address=models.ForeignKey(Address,on_delete=models.CASCADE)admin.pyfromdynfilters.filtersimportDynamicFilter@admin.register(Person)classPersonAdmin(admin.ModelAdmin):...list_filter=(DynamicFilter,)dynfilters_fields=['-','first_name','last_name',('first_name|last_name','Name'),# Will generate: Q(first_name=<value>) | Q(last_name=<value>)('birth_date','Date of birth'),# Requires the value to be: DD/MM/YYYY'-',('address__town','City'),]dynfilters_select_related=['address']# Optionaldynfilters_prefetch_related=[]# OptionalOperators & LookupsThe following operators and lookups are supported:operatorsOP_CHOICES=[('-','-'),('!','NOT'),('&','AND'),('|','OR'),('(','('),(')',')'),]lookupsLOOKUP_CHOICES=[('-','---------'),('=','Equals'),('icontains','Contains'),('istartswith','Starts with'),('iendswith','Ends with'),('in','One of'),# Requires the value to be: aaa,bbb,ccc('-','---------'),('range','Date Range'),# Requires the value to be: DD/MM/YYYY,DD/MM/YYYY('year','Date Year'),('month','Date Month'),('day','Date Day'),('-','---------'),('isnull','Is NULL'),('isnotnull','Is not NULL'),('istrue','Is TRUE'),('isfalse','Is FALSE'),('-','---------'),('lt','Less Than'),('gt','Greater Than'),('lte','Less Than or Equal To'),('gte','Greater Than or Equal To'),]SharingThere are two ways dynamic filters can be shared:By marking a filterglobal. The filter will be available to all admin users.By pressing theshareicon. The filter can then be shared by email. When the recipients clicks on the received link, a copy of the filter will be created. The edits made to the copy will not affect the original filter.AlternativesDynfilters was inspired by the look and feel ofdjango-advanced-filters, but is based purely on admin forms and inlines (no JSON).Another interesting package isdjango-filter.And yet another one isdjango-admin-search-builder.
Package: django-dynamic-finder
Django Dynamic Finder=====================A Django version of the Rails Dynamic Finder, using Django Managers.# Install```sh$ pip install django-dynamic-finder```# Setup```python# settings.pyINSTALLED_APPS = (...'django_dynamic_finder',...)``````python# project/app/models.pyfrom django.db import modelsfrom django_dynamic_finder import DynamicFinderManagerclass Model(models.Model):name = models.CharField(max_length=50)objects = DynamicFinderManager()```# Usage```python>>> Model.objects.get_by_name('Jonh')# >>> Model.objects.get(name='Jonh')<Model: #1 - Jonh>>>> Model.objects.filter_by_name('Jonh')# >>> Model.objects.filter(name='Jonh')["<Model: #1 - Jonh>"]>>> Model.objects.exclude_by_name('Jonh')# >>> Model.objects.exclude(name='Jonh')["<Model: #2 - Alice>", "<Model: #3 - Bob>"]>>> Model.objects.filter_by_name_or_name('Jonh', 'Alice')# >>> Model.objects.filter(Q(name='Jonh') | Q(name='Alice'))["<Model: #1 - Jonh>", "<Model: #2 - Alice>"]>>> Model.objects.exclude_by_name_or_id('Jonh', 3)# >>> Model.objects.exclude(Q(name='Jonh') | Q(id=3))["<Model: #2 - Alice>"]>>> Model.objects.filter_by_name_or_id_or_name('Jonh', 3, 'Alice')# >>> Model.objects.filter(Q(name='Jonh') | Q(id=3) | Q(name='Alice'))["<Model: #1 - Jonh>", "<Model: #2 - Alice>", "<Model: #3 - Bob>"]```
Package: django-dynamic-fixture
Django Dynamic FixtureLatest version: 4.0.1 (Sep 2023)Django Dynamic Fixture (DDF) is a complete and simple library to create dynamic model instances for testing purposes.It lets you focus on your tests, instead of focusing on generating some dummy data which is boring and polutes the test source code.Basic ExamplesCheat SheetFull DocumentationBasic ExamplesCustomize only the important details of the test:fromddfimportGfrommy_libraryimportAuthor,Bookdeftest_search_book_by_author():author1=G(Author)author2=G(Author)book1=G(Book,authors=[author1])book2=G(Book,authors=[author2])books=Book.objects.search_by_author(author1.name)assertbook1inbooksassertbook2notinbooksUsing some goodies to keep the test code smaller:fromddfimportGdeftest_search_book_by_author():author1,author2=G('my_library.Author',n=2)book1=G('my_library.Book',authors=[author1])book2=G('my_library.Book',authors=[author2])books=Book.objects.search_by_author(author1.name)assertbook1inbooksassertbook2notinbooksConfiguring data from relationship fields:fromddfimportGdeftest_search_book_by_author():book1=G(Book,main_author__name='Eistein')book2=G(Book)books=Book.objects.search_by_author(book1.main_author.name)assertbook1inbooksassertbook2notinbooksassertbook1.main_author.name=='Eistein'Cheat Sheet# Import the main DDF featuresfromddfimportN,G,F,M,C,P,teach# meaning: New, Get, ForeignKey, Mask, Copier, Print, teach# `N` creates an instance of model without saving it to DBinstance=N(Book)# `G` creates an instance of model and save it into the DBinstance=G(Book)# `F` customize relationship objectsinstance=G(Book,author=F(name='Eistein'))# Same as `F`instance=G(Book,author__name='Eistein')# `M` receives a data mask and create a random string using it# Known symbols: `_`, `#` or `-`# To escape known symbols: `!`instance=N(Book,address=M('Street ___, ### !- --'))assertinstance.address=='Street TPA, 632 - BR'# `C` copies data from one field to anotherinstance=N(Book,address_formatted=C('address'),address=M('Street ___, ### \- --'))assertinstance.address_formatted=='Street TPA, 632 - BR'# `teach` teaches DDF in how to build an instanceteach(Book,address=M('Street ___, ### !- --'))instance=G(Book)assertinstance.address=='Street TPA, 632 - BR'# `P` print instance values for debuggingP(instance)importddfddf.__version__fromddfimportddf_check_modelssucceeded,errors=ddf_check_models()succeeded,errors=ddf_check_models(print_csv=True)succeeded,errors=ddf_check_models(csv_filename='ddf_compatibility_report.csv')
Package: django-dynamic-fixtures
Django Dynamic Fixtures is a Django app which gives you the ability to setup
fixture-data in a more dynamic way. Static fixtures are sometimes too
static in a way that for example even the primary keys are static defined, this
can be very hard to maintain especially in bigger projects. Another example;
when your application depends on data with a recent timestamp your static
fixtures can get ‘outdated’.For all these issues Django Dynamic Fixtures has a solution and even more!Read the documentationdocumentation.
Package: django-dynamic-form-fields
Usagepip installdjango-dynamic-form-fieldsAdddynamic_fieldstoINSTALLED_APPSAdd to your form as a widget:fromtypingimportTypefromdynamic_fields.fieldsimportDynamicChoicesWidgetfrommyapp.modelsimportMyModel,Itemdefget_item_choices(model:Type[Item],value:int):choices=[]item=model.objects.get(id=value)forthinginitem.things:# do something with itemchoices.append({'value':thing.id,'label':thing.name,})returnchoicesclassMyForm(forms.ModelForm):classMeta:model=MyModelfields=('item','dependent_item')widgets={'dependent_item':DynamicChoicesWidget(depends_field='item',model=Item,callback=get_item_choices,no_value_disable=True,include_empty_choice=True,empty_choice_label="Please choose an option",)}Ensure that form media is included with the rest of your view’s mediaRequirementsDjango 1.11-2.2Python 3.5+ (built/tested with 3.6.2)jQuery (built/tested with 1.12.4)How does it work?A view is injected into the project’s urlpatterns which is the handler
for the ajax callback when the dependent field changes. When the
DynamicChoicesWidget template is rendered, it serializes the various
provided values into Python dotted strings to send to the template.
It uses HTML5 data attributes in the markup to pass these values to
the Javascript in order to send to the view to tell it what to do next.The model is serialized intoapp.model, and thecallbackis
serialized into the full dotted path to the method within your code,
e.g;app.form.my_form.get_choices. When the dependent field’s value
is changed, the ajax calls the view with the relevant information
from above, then this goes and imports the path, grabs the model
class for what was provided from django’s model loader, then calls
your method with the class itself, and the value provided by the
dependent field. The output of the callback method is serialized
back into JSON, returned to the Javascript making the call, which
iterates over the options and resets the select box’s options to
those provided.These can be chained (theoretically) for as many fields as required.
It should also (though untested) work with multiple select boxes.Change Log0.3.2No changes.0.3.1Changing formatting of documentation since PyPI doesn’t like bog-standard markdown
these days.0.3.0Bump allowed django to 2.2+Fixed issue found in django 2.2 where the choices JS was being called twice,
causing multiple loads and the selected value to not persist across page reloads.0.1.0/0.2.0Initial version
Package: django-dynamicforms
Dynamically add forms to your site through the admin interface.With django-dynamicforms you can:add forms through the admin interfaceadd (custom) form fields through the admin interfacereuse form fields in different formscustomize predefined forms through the admin interfacesend personalized e-mails to submitters of dynamicformsdownload data posted to forms as CSVInstallpip installdjango-dynamicformsadd'dynamicforms'to yourINSTALLED_APPSadd(r'^dynamicforms/',include('dynamicforms.urls'))to yoururls.pyDependenciesdjango >= 1.3,html2textSettingsThere are two optional settings:DYNAMICFORM_TYPESandDYNAMICFIELD_TYPES, which define custom form and field types respectively. For example:DYNAMICFORM_TYPES = {
    'newsletter-subscription': {
        'VERBOSE_NAME':   'Newsletter subscription',
        'BASE_FORM':      'newsletters.forms.SubscriptionForm',
        'SUCCESS_URL':    '/newsletter/thanks/',
        'TEMPLATE':       'dynamicforms/form.html',
        'TAG_TEMPLATE':   'dynamicforms/_form.html',
        'EMAIL_TEMPLATE': 'dynamicforms/notification.html',
    },
}

DYNAMICFIELD_TYPES = {
    'phone': {
        'VERBOSE_NAME': 'Phone number',
        'FIELD':        'phone.forms.PhoneField',
        'HAS_CHOICES':  False,
        'DEFAULT':      '',
        'WIDGET':       'django.forms.TextInput'
    },
}Response e-mails are sent fromsettings.DEFAULT_FROM_EMAIL.
Notification e-mails are sent fromsettings.SERVER_EMAIL.UsageTemplate tagEvery form has its own page, but can also be included in other pages with:{% load dynamicform_tags %}
...
{% show_dynamicform %}It will always post to its own url, though, and validation errors will have to be corrected there.TemplatesThe templates used to render dynamicforms can be overridden by custom form types, but default to:
-dynamicforms/form.htmlfor the form url
-dynamicforms/_form.htmlfor the template tag
-dynamicforms/notification.emlfor the notification e-mailWishlistadapt labels/help_text/… of (predefined) base form fieldsnicer report of dataoptional integration with messages frameworkdynamicformwizardbetter/more tests
Package: django-dynamic-forms
django-dynamic-formslets you create your forms through the Django admin.
You can add and remove form fields as you need them. That makes it perfect
for creating survey or application forms.Documentation:https://django-dynamic-forms.readthedocs.org/Warningdjango-dynamic-forms0.5.x will only support Django >= 1.7! If you need
support for Django < 1.7 usedjango-dynamic-forms0.4.x!INSTALLATIONAdd'dynamic_forms.apps.DynamicFormsConfig'to theINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'dynamic_forms.apps.DynamicFormsConfig',
    ...
)Add'dynamic_forms.middlewares.FormModelMiddleware'to theMIDDLEWARE_CLASSES(probably at the end):MIDDLEWARE_CLASSES = (
    ...
    'dynamic_forms.middlewares.FormModelMiddleware'
)Add'dynamic_forms.urls'to the URL patterns:urlpatterns = patterns('',
    ...
    url(r'^dynamic_forms/',
        include('dynamic_forms.urls', namespace='dynamic_forms')),
    ...
)ImportantMake sure that you get the namespace straight:dynamic_forms!You can setDYNAMIC_FORMS_EMAIL_RECIPIENTSin your settings to a list of
e-mail addresses. Forms being send via e-mail will then be send to those
addresses instead of those defined insettings.ADMINS. Each recipient will
seeallother recipients. Seesend_mailin the officiall documentation.ExampleChange into theexample/directoryApply all migrations:python manage.py migrateCreate a superuser (if not asked before):python manage.py createsuperuserRunpython manage.py runserverTheadminis available athttp://127.0.0.1:8000/admin/.You can find an example form athttp://127.0.0.1:8000/example-form/.Running the testsMake sure to install tox:$ pip install toxRuntox
Package: django-dynamic-formsets
# django-dynamic-formsetsA lightweight plugin for managing Django formsets with jQuery.## About this pluginThis [jQuery](http://jquery.com/) plugin helps you create more usable [Django](http://www.djangoproject.com/) formsets by allowing clients to add and remove forms on the client-side.It was primarily developed by [Stanislaus Madueke](https://github.com/elo80ka), and re-packaged as a static Django app (with a couple shiny new enhancements and more docs) by [The Dallas Morning News](https://github.com/DallasMorningNews/).This version of this plugin (like its predecessor) is available under the [BSD License]().****## Getting started1.   Download this repo or install from PyPI:```bashpip install django-dynamic-formsets```2.   Then add `dynamic_formsets` to your `INSTALLED_APPS` setting and run `python manage.py collectstatic`.3.   You can now make your formsets dynamic by adding the following lines to a template:```Django{% load static %}...{% comment %}(Your templated DOM here, possibly something like this:){% endcomment %}<form id="my-form" method="post" action="">{% csrf_token %}{{ formset.media }}{% for form in formset %}<div class="individual-form">{{ form.as_p }}</div>{% endfor %}</form>...<script src="{% static "dynamic_formsets/jquery.formset.js" %}" type="text/javascript"> </script><script type="text/javascript">$('.individual-form').formset();</script>```****## ConfigurationOnce you've followed steps 1 to 3 above, you're ready to customize the formset-handling javascript that's now on your page.Detailed information about all the settings you can change in the javascript will be added to this repo very soon.
Package: django-dynamic-image
Django Dynamic ImageDescriptionA django ImageField whose upload_to value is generated from a model method.Installationpipinstalldjango-dynamic-imageUsagefromdjango.dbimportmodelsfromdynamic_image.fieldsimportDynamicImageFieldclassExampleModel(models.Model):name=models.CharField(max_length=56)image=DynamicImageField()defget_upload_to(self,field_name):class_name=self.__class__.__name__.lower()instance_name=self.namereturn"{}/{}".format(class_name,instance_name)
Package: django-dynamicinputs
# Form field with variable list of rowsRequires Django framework and jQuery javascript library.## Installation```pip install dynamicinputs```## UsageAdd "dynamicinputs" to installed apps in django settings file:```pythonINSTALLED_APPS = (...'dynamicinputs',...)```Then it can be used in model:```pythonfrom dynamicinputs import DynamicInputFieldparent_names = DynamicInputField(fields.CharField(label="Names and addresses of parent companies",widget=widgets.Textarea(),help_text="If your publishing company has no parent companies then enter 'none'"),max_count=10,button='Add company'))```Include required css and js files into your template:```{% load static %}<link href="{% static 'dynamicinputs/dynamicinputs.css' %}" rel="stylesheet"/><script type="text/javascript" src="{% static 'dynamicinputs/dynamicinputs.js' %}"></script>```
Package: django-dynamic-mailer
Detailed documentation is in the “docs” directory.Quick startAdd “project-mailer” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'emails',
]Include the polls URLconf in your project urls.py like this:url(r'emails/', include('emails.urls'))),Runpython manage.py migrateto create the emails models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a emails (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/emailsto participate in the emails.
Package: django-dynamic-manipulation
depends on:django-dynamic-rules: an app that allows you to create dynamic rulesrelated to a particular model.https://github.com/imtapps/django-dynamic-rulesWhen a dynamic rule is triggered, it can use a Dynamic Manipulation to
create some other model (referred to as a side effect model). When the
rules are run all of the side effect models will be deleted and re-created
if necessary (as determined by the rule).A manipulation log keeps track of the rule, side effect model, and the
model that triggered the side effect. This is how we know what changes
occurred as a result of the dynamic rule.See the example app for a sample of what this might look
in a shopping cart application. There are lettuce tests that
clearly show a simplified shopping cart use case.(run “./manage.py harvest -a sample -S” to run the lettuce tests)
Package: django-dynamic-model
django-dynamic-modelsOverviewDynamic Django models allow users to define, edit, and populate their own database tables and apply runtime schema changes to the database.django-dynamic-modelsis loosely based on theruntime dynamic modelstalk from DjangoCon 2011. The basic concept involves around dynamic class declaration using the built-intypefunction.typeis used to dynamically declare new Django models at runtime, and it is the goal of this project to provide a simple API to allow developers to get started with dynamic models quickly.This package provides models to help Django developers quickly implement dynamic models for their specific use case, while the handling the runtime schema changes and updates to Django's model registry under the hood. The schema changes are applied in pure Django,withoutthe migrations framework, so none of your dynamic models will affect your migrations files at all.Disclaimer:It is not recommended to use this project for business critical data due to the high potential for data loss. Tables can be dropped very easily, and without backups, even a small user error could be catastrophic.DocumentationSee thewikifor documentation.
Package: django-dynamic-model-admin
django-dynamic-model-adminDefine new type model in Django's admin site. New type model can be managed in admin site, and also provide the auto generated ModelForm.Installpipinstalldjango-dynamic-model-adminReleasesv0.2.2Clean not used imports.v0.2.1Add changeform-tab manager.Use cascading-dropdown widget for real_field_name in ModelDefinitionAdmin.Add custom model names in create_model_definition function.v0.2.0Turn all models and admin sites to abstract class, so that it can be used multiple times.Simplify the management, only keep model-definition-management and data management.v0.1.0First release.
Package: django-dynamic-models
=====Django Dynamic Models=====Django Dynamic Models is a app that enable change model fields if other other apps models.Detailed documentation is in the "docs" directory.Install-----------```pip install --upgrade django-dynamic-models```Quick start-----------1. Add `django_dynamic_models` to your INSTALLED_APPS setting before the apps you need change models like this::INSTALLED_APPS = (...'django_dynamic_models','app_with_models','app_with_changes',)2. Define your model your want to change from another appsimport django_dynamic_models as dymodelsapp_label = 'app_label'class ArticleBase(models.Model):id = models.AutoField(primary_key=True)name = models.CharField(max_length=50)class Meta:abstract  = Truedef __unicode__(self):return u'%s' % self.nameArticle = dymodels.change.load('Article', ArticleBase, app_label)3. In the app need a model change add a file named 'models_changes_registry.py' and add her the new filedsimport django_dynamic_models as dymodelsfrom django.db import modelsdymodels.change.register('Article', **{'brand' : models.CharField(max_length=30, blank = True, null = True),})
Package: django-dynamic-path
django_dynamic_pathA django path() replacement enabling truly dynamic urls.Rather than mapping a regular expression to a view function, you map a "resolver function" to a view function. The resolver function receives the path as an argument, and decides whether or not it wants to handle the request. If it does want to the handle the request, it should return a tuple of args and kwargs, which will be passed to the view function.Use CasesTODO
Package: django-dynamic-preferences
Dynamic-preferences is a Django app, BSD-licensed, designed to help you manage your project settings. While most of the time,
asettings.pyfile is sufficient, there are some situations where you need something more flexible such as:per-user settings (or, generally speaking, per instance settings)settings change without server restartFor per-instance settings, you could actually store them in some kind of profile model. However, it means that every time you want to add a new setting, you need to add a new column to the profile DB table. Not very efficient.Dynamic-preferences allow you to register settings (a.k.a. preferences) in a declarative way. Preferences values are serialized before storage in database, and automatically deserialized when you need them.With dynamic-preferences, you can update settings on the fly, through django’s admin or custom forms, without restarting your application.The project is tested and work under Python 3.7, 3.8, 3.9, 3.10 and 3.11 and with django 3.2 and 4.2.FeaturesSimple to setupAdmin integrationForms integrationBundled with global and per-user preferencesCan be extended to other models if need (e.g. per-site preferences)Integrates with django caching mechanisms to improve performanceDocumentationThe full documentation is athttps://django-dynamic-preferences.readthedocs.org.ChangelogSeehttps://django-dynamic-preferences.readthedocs.io/en/latest/history.htmlContributingSeehttps://django-dynamic-preferences.readthedocs.org/en/latest/contributing.htmlCreditsContributorsThis project exists thanks to all the people who contribute!BackersThank you to all our backers!Become a backer.SponsorsSupport us by becoming a sponsor. Your logo will show up here with a link to your website.Become a sponsor.
Package: django-dynamic-preferences-plus
# What is dynamic-preferences-plus ?Dynamic-preferences-plus is a Django app designed to manage your project settings. While most of the time,
asettings.pyfile is sufficient, there are some situations where you need something more flexible,
such as per-user settings and per-site settings.For per-user settings, you could actually store them inUserProfile. However, it means that every time you want to add a new setting, you need to add a new column to theUserProfileDB table. Not very efficient.Dynamic-preferences-plus allow you to register settings (a.k.a. preferences) in a declarative way, for users,
sites and your whole project. Preferences values are serialized before storage in database,
and automatically deserialized when you want to access them.With dynamic-preferences-plus, you can update settings on the fly, through django’s admin or custom forms, without restarting your application.Links:[Project page](https://github.com/mirk8xr/django-dynamic-preferences)[PyPi package](https://pypi.python.org/pypi/django-dynamic-preferences-plus)# LicenseThe project is licensed under BSD license.