Saravanan666/pypi-org huggingface dataset:
Package: django-opt-out
Allow everybody to unsubscribe your messages, user accounts are not required.Free software: MIT licenseDocumentation:https://django-opt-out.readthedocs.io.FeaturesA single page form for opt-out feedback submissionFeedback options text controlled from django adminPredefined feedback defaults available from django manage commandFeedback translations done in django adminFeedback options selection based on tags supplied to the opt-out urlAbility to preselect a feedback optionAbility to change selected feedback options after submissionAbility to settag:valuepair on opt-out url and store them on submission with user feedbackSignal to modify opt-out form before renderingSignal on opt-out feedback submissionEasily overridable thank you / goodbye viewOpt-out form with a easily overridable base templateDemoTo run an example project for this django reusable app, click the button below and start a demo serwer on HerokuQuickstartInstall Django Opt-out application:pip install django-opt-outAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_opt_out.apps.DjangoOptOutConfig',...)Add Django Opt-out application’s URL patterns:fromdjango_opt_outimporturlsasdjango_opt_out_urlsurlpatterns=[...url(r'^',include(django_opt_out_urls)),...]Add unsubscribe links to your emails:fromdjango_opt_out.utilsimportget_opt_out_pathemail='Django Opt-out <django-opt-out@niepodam.pl>'unsubscribe=get_opt_out_path(email,'some','tags','controlling','questionnaire')# unsubscribe link will not have a domain name and scheme# you can build prefix from request, but I prefer to set it in settingsfromdjango.confimportsettingsunsubscribe=settings.BASE_URL+unsubscribebody='Hello, Regards\n\nUnsubscribe: '+unsubscribefromdjango.coreimportmailmessage=mail.EmailMultiAlternatives(body=body,to=[email])message.extra_headers['List-Unsubscribe']="<{}>".format(unsubscribe)message.send()Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsThis package was created withCookiecutterand thewooyek/cookiecutter-django-appproject template.History0.1.0 (2017-11-03)First release on PyPI.
Package: django-order
Django OrderDjango app allowing users to manually order objects via admin.Provides an additionalordertool within admin with which objects can be ordered by any number of arbitrarysettingsdefined fields. Auser_order_byqueryset method allows for retrieval of objects as they were ordered by users via admin.ContentsDjango OrderInstallationUsageAdminQuerysetsAuthorsChangelog0.0.7 (2011-09-15)0.0.60.0.50.0.4InstallationInstall or adddjango-orderto your Python path.Installdjango-object-toolsas describedhere.Addorderto yourINSTALLED_APPSsetting.Add anORDERABLE_MODELSsetting to your project’ssettings.pyfile. This settings is a dictionary containing model-app label strings for those models you want to make orderable as keys. Values take the form of a tupple containing field names on which you want the relevant model to be orderable. I.e. to make theUsermodel orderable for hypotheticalhomeanduserspages, add the followingORDERABLE_MODELSsetting:ORDERABLE_MODELS = {
    'auth.User': ('home', 'users'),
}UsageAdminOnce a model has been registered as orderable an additionalOrderobject tool should be visible on the model’s change list view.You can order your items using this tool for each field name specified for you orderable model.QuerysetsWith theorderapp installed all queryset objects will have a newuser_order_bymethod. This method behaves exactly the same as Django’s builtinorder_bymethod except that it expects one of the settings defined field names for the model being queried. It will order the queryset based on the field name you provide. For example, to order users for thehomepage in our hypothetical example you would use the method as follows:User.objects.all().user_order_by('home')AuthorsPraekelt FoundationShaun SephtonChangelog0.0.7 (2011-09-15)django-object-tools refactor.0.0.6Tests, docs, cleanup, descending ordering, bugfixes.0.0.5No longer use class_prepared signal.0.0.4#.Initial public release.
Package: django-orderable
Django OrderableAdd manual sort order to Django objects via an abstract base class and admin classes. Project includes:Abstract base ModelAdmin classInline admin classAdmin templatesDemoInstallationGrab from the PyPI:pip install django-orderableAdd to your INSTALLED_APPS:...
'orderable',
...Subclass the Orderable class:from orderable.models import Orderable


class Book(Orderable):
    ...Subclass the appropriate Orderable admin classes:from orderable.admin import OrderableAdmin, OrderableTabularInline


class SomeInlineClass(OrderableTabularInline):
    ...

class SomeAdminClass(OrderableAdmin):
    list_display = ('__unicode__', 'sort_order_display')
    ...jQuery and jQuery UI are used in the Admin for the draggable UI. You may override the versions with your own (rather than using Google's CDN):class SomeAdminClass(OrderableAdmin):
    class Media:
        extend = False
        js = (
            'path/to/jquery.js',
            'path/to/jquery.ui.js',
        )Notesclass MetaIf your subclass ofOrderabledefinesclass Metathen make sure it subclassesOrderable.Metaone so the model is sorted bysort_order. ie:class MyOrderable(Orderable):
    class Meta(Orderable.Meta):
        ...Custom ManagersSimilarly, if your model has a custom manager, subclassorderable.managers.OrderableManagerinstead ofdjango.db.models.Manager.TransactionsSaving orderable models invokes a fair number of database queries, and in order
to avoid race conditions should be run in a transaction.Adding Orderable to Existing ModelsYou will need to populate the requiredsort_orderfield. Typically this is
done by adding the field in one migration with a default of0, then creating
a data migration to set the value to that of its primary key:for obj in orm['appname.Model'].objects.all():
    obj.sort_order = obj.pk
    obj.save()Multiple Models using OrderableWhen multiple models inherit from Orderable thenext()andprevious()methods will look for the next/previous model with a sort order. However you'll
likely want to have the various sort orders determined by a foreign key or some
other predicate. The easiest way (currently) is to override the method in
question.
Package: django-orderable-inlines
Drag-to-reorder inline model admins for DjangoInstallationpip install django-orderable-inlinesAddorderable_inlinesto yourINSTALLED_APPS.Examplemodels.py:from django.db import models

class Gallery(models.Model):
    name = models.CharField(max_length=16)

class Photo(models.Model):
    gallery = models.ForeignKey(Gallery)
    image = models.ImageField(upload_to='gallery_photos')
    order = models.PositiveIntegerField(default=1)admin.py:from django.contrib import admin
from gallery.models import Gallery, Photo
from orderable_inlines import OrderableTabularInline

class PhotoInline(OrderableTabularInline):
    model = Book
    orderable_field = 'order'

class GalleryAdmin(admin.ModelAdmin):
    inlines = [
        PhotoInline,
    ]

admin.site.register(Gallery, GalleryAdmin)
Package: django-orderable-tree
Django TreeOverviewA tree structure for hierarchical data. Optimised for fast insertion/moving of nodes around the tree.RequirementsDjango 3.2+Python 3.8+InstallationAdddjango_treetoINSTALLED_APPS.UsageSimply extend theBaseTreeNodeclass in your application: e.g.fromdjango.dbimportmodelsfromdjango_tree.modelsimportBaseTreeNodeclassCategory(BaseTreeNode):name=models.CharField(max_length=255)def__str__(self):returnself.name# Will contain an OrderedDict of categories organised into a tree structure.categories=Category.objects.build_tree()TestingInstall dev dependencies:poetry install.Install a supported version of Django:pip install django==3.2Run the tests:DB_NAME="django_tree" python -m pytest tests .
Package: django-ordered-field
=============================django-ordered-field=============================.. image:: https://badge.fury.io/py/django-ordered-field.svg:target: https://badge.fury.io/py/django-ordered-field.. image:: https://travis-ci.org/kimgea/django-ordered-field.svg?branch=master:target: https://travis-ci.org/kimgea/django-ordered-field.. image:: https://codecov.io/gh/kimgea/django-ordered-field/branch/master/graph/badge.svg:target: https://codecov.io/gh/kimgea/django-ordered-fieldA django field to make it easy to order your model instances. If you have made an ordered list and you change the position of the list item instance then all the other list iteminstances belonging to that list has their position automatically updated to keep the list ordered without holes and list items with duplicate positions.``OrderedField field`` is a global ordering field for the entire table.``OrderedCollectionField`` order instances with respect to one or more other fields on the instance.Requires--------* python>=3.6* django>=2.0Documentation-------------The full documentation is at https://django-ordered-field.readthedocs.io.Quickstart----------Install django-ordered-field::pip install git+https://github.com/kimgea/django-ordered-field.gitIn your models.py add the field you want ``OrderedField`` or ``OrderedCollectionField``:.. code-block:: pythonfrom django_ordered_field import OrderedFieldclass YourModel(models.Model):name = models.CharField(max_length=100)order = OrderedField()And your ready to go.Features--------* ``OrderedField`` will keep correct ordering between all instances in the enire table* ``OrderedCollectionField`` can seperate the table in different collection based on one or more columns and keep order in each collection* ``update_auto_now`` will update all other fields containing auto_now=True with django.utils.timezone.now if it is set to True* ``extra_field_updates`` can be used to update other fields when their order is changed* ``self_updates_on_collection_change`` can be used to update self (current instance) when it changes collection. Setting ``self_updates_on_collection_change_like_regular`` to True will make it use the values from the extra_field_updatesLimitations--------* Must user model.save(). queryset methods does not work* Order field cant be unique or in an uniqu_togheter constraint* After a position has been updated, other members of the collection are updated using a single SQL UPDATE statement, this means the save method of the other instances won't be called. As a partial work-around use the ``update_auto_now``, ``extra_field_updates`` and the ``self_updates_on_collection_change`` functionalities.Credits-------Based on django-positions (it did not work for django 2 at the time):*  django-positions_.. _django-positions: https://github.com/jpwatts/django-positionsTools used in rendering this package:*  Cookiecutter_*  `cookiecutter-djangopackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackageHistory-------0.1.0 (2018-04-28)++++++++++++++++++* First release on PyPI.
Package: django-ordered-listview
About----This library is aimed to simplify creation of user sorted lists.Inspired by https://gist.github.com/piquadrat/3833430Installation----1. Install with pip or setup.py2. Add ordered_listview into `INSTALLED_APPS`. ::INSTALLED_APPS += ['ordered__listview']3. Add template tags lib into builtins. ::add_to_builtins('ordered_listview.templatetags.ordered_listview')  // Or load with {% load ordered_listview %}4. Inherit your view from `OrderedListView`. And setup your ordering fields. ::from ordered_listview import OrderedListViewclass UserListView(OrderedListView):allowed_order_by = [('username', _('Login')),('userfile__file__size', _('Size')),('date_joined', _('Sing up date'))]default_order_by = 'created'5. Add a tag into you your template. ::{% include "ordered_listview/fields.html" %}Customization----1. To change get attribute name, just set `OrderedListView.order_by` attribute ::class UserListView(OrderedListView):order_by = "order_by"2. If you need to provide your own template create inside your `templates``ordered_listview` directory with `fields.html` and `field.html` in.fields.html - list of sortable fieldsfield.html - order field and state template3. If you want to ignore null values during sort, add fields to null_ignore_fields.class UserListView(OrderedListView):null_ignore_fields = ['quantity']class UserListView(OrderedListView):null_ignore_fields = '*'  # For all fields
Package: django-ordered-model-grappelli
[![Build Status](https://secure.travis-ci.org/gbezyuk/django-ordered-model-grappelli.png?branch=master)](https://travis-ci.org/gbezyuk/django-ordered-model-grappelli)This is a fork of original django-ordered-model by bfirsh. Text bellow is left unchanged.django-ordered-model allows models to be ordered and provides a simple admin
interface for reordering them.Based onhttps://djangosnippets.org/snippets/998/andhttps://djangosnippets.org/snippets/259/Requires:Django >=1.5Installation$ python setup.py installUsageAddordered_modelto yourSETTINGS.INSTALLED_APPS.Inherit your model fromOrderedModelto make it ordered:from django.db import models
from ordered_model.models import OrderedModelclass Item(OrderedModel):name = models.CharField(max_length=100)class Meta(OrderedModel.Meta):passModel instances now have a set of methods to move them relative to each other.
To demonstrate those methods we create two instances ofItem:foo = Item.objects.create(name=”Foo”)
bar = Item.objects.create(name=”Bar”)### Swap positionsfoo.swap(bar)This swaps the position of two objects.### Move position up on positionfoo.up()
foo.down()Moving an object up or down just makes it swap its position with the neighouring
object directly above of below depending on the direction.### Move to arbitrary positionfoo.to(12)
bar.to(13)Move the object to an arbitrary position in the stack. This essentially sets the
order value to the specified integer. Objects between the original and the new
position get their order value increased or decreased according to the direction
of the move.### Move object above or below referencefoo.above(bar)
foo.below(bar)Move the object directly above or below the reference object, increasing or
decreasing the order value for all objects between the two, depending on the
direction of the move.### Move to top of stackfoo.top()This sets the order value to the lowest value found in the stack and increases
the order value of all objects that were above the moved object by one.### Move to bottom of stackfoo.bottom()This sets the order value to the highest value found in the stack and decreases
the order value of all objects that were below the moved object by one.## Subset OrderingIn some cases, ordering objects is required only on a subset of objects. For example,
an application that manages contact lists for users, in a many-to-one/many relationship,
would like to allow each user to order their contacts regardless of how other users
choose their order. This option is supported via theorder_with_respect_toparameter.A simple example might look like so:class Contact(OrderedModel):user = models.ForeignKey(User)
phone = models.CharField()
order_with_respect_to = ‘user’Admin integrationTo add arrows in the admin change list page to do reordering, you can use theOrderedModelAdminand themove_up_down_linksfield:from django.contrib import admin
from ordered_model.admin import OrderedModelAdmin
from models import Itemclass ItemAdmin(OrderedModelAdmin):list_display = (‘name’, ‘move_up_down_links’)admin.site.register(Item, ItemAdmin)Test suiteRequires Docker.$ script/test
Package: django-organice-theme
This is the mother theme of all themes fordjango-organice.  A theme is a simple Django app, which contains
a collection of static files (assets) and templates.  AMakefilefor asset management is also included.django-organice-themeis composed of:bootstrap-sass(Twitter Bootstrap v3, and Sass)Compass(CSS authoring framework using Sass)UglifyJS v2(JavaScript minifier)Official ThemesHere is a list of django Organice themes supported by us:django-organice-theme-rssk(first Organice theme ever)django-organice-theme-fullpage(Organice.io theme based on fullPage.js)If you have a nice theme and would like to include it into this listlet us know by e-mailor make a pull request on this README file.Rolling Your Own ThemePreparations:Visithttp://organice.io/themesand find a theme that is as close as it gets of what you want.Go to that theme’s repository page, make a copy of the whole project, and rename it (e.g. tomytheme).Loop until you’re happy:Add or adapt the style sheet (.scss), JavaScript (.js), and other files inmytheme/static/.Runmake assetsin order to compile the Sass files to CSS, and combine and minify both CSS und JavaScript.Adapt the template files inmytheme/templates/, and test the results on your development system.Download and ContributionsOfficial repositories: (kept in sync)Bitbucket:https://bitbucket.org/Organice/django-organice-themeGitHub:https://github.com/Organice/django-organice-themeGetting HelpDocumentation is available athttp://docs.organice.ioQuestions? Please useStackOverflow.  Tag your questions withdjango-organice.Found a bug? Please use either theBitbucketorGitHubissue tracker (you choose)
Package: django-organice-theme-fullpage
Adjango Organicetheme with full-page display as used by Organice.ioThis theme uses functionality of some really awesome projects:fullPage.jsby Alvaro Trigopure CSS Fork-Me ribbonby Simon WhitakerHow To Use This ThemeInstall this Django app along withdjango-organice:pip install django-organice-theme-fullpageAddorganice_theme_fullpageto yourINSTALLED_APPS:'organice_theme_fullpage',
'organice_theme',
'organice',
...How To Modify This ThemeThis theme depends on the base themedjango-organice-theme, the asset build process will re-use resources
from it.  Make sure you clone both repositories on the same directory level.  Your folder structure should look
something like this:.
├── django-organice-theme
│   ├── organice_theme
│   │   ├── static
│   │   └── templates
├── django-organice-theme-fullpage
│   ├── organice_theme_fullpage
│   │   ├── static
│   │   └── templatesThen, loop until you’re happy:Add or adapt the style sheet (.scss), JavaScript (.js), and other files inorganice_theme_fullpage/static/.Runmake assetsin order to compile the Sass files to CSS, and combine and minify both CSS und JavaScript.Adapt the template files inorganice_theme_fullpage/templates/, and test the results on your development system.NOTE:Themes that intend to override the base theme’s styles and JavaScript must define the following two lines intemplates/base.html:{% block theme_css %}{% static 'css/styles.css' %}{% endblock theme_css %}
{% block theme_js %}{% static 'js/scripts.js' %}{% endblock theme_js %}Download and ContributionsOfficial repositories: (kept in sync)Bitbucket:https://bitbucket.org/bittner/django-organice-theme-fullpageGitHub:https://github.com/bittner/django-organice-theme-fullpageGetting HelpDocumentation is available athttp://docs.organice.ioQuestions? Please useStackOverflow.  Tag your questions withdjango-organice.Found a bug? Please use either theBitbucketorGitHubissue tracker (you choose)
Package: django-organice-theme-rssk
Adjango Organicetheme created for Kreuzlingen Rudolf Steiner school (RSSK).How To Use This ThemeInstall this Django app along withdjango-organice:pip install django-organice-theme-rsskAddorganice_theme_rsskto yourINSTALLED_APPS:'organice_theme_rssk',
'organice_theme',
'organice',
...How To Modify This ThemeThis theme depends on the base themedjango-organice-theme, the asset build process will re-use resources
from it.  Make sure you clone both repositories on the same directory level.  Your folder structure should look
something like this:.
├── django-organice-theme
│   ├── organice_theme
│   │   ├── static
│   │   └── templates
├── django-organice-theme-rssk
│   ├── organice_theme_rssk
│   │   ├── static
│   │   └── templatesThen, loop until you’re happy:Add or adapt the style sheet (.scss), JavaScript (.js), and other files inorganice_theme_rssk/static/.Runmake assetsin order to compile the Sass files to CSS, and combine and minify both CSS und JavaScript.Adapt the template files inorganice_theme_rssk/templates/, and test the results on your development system.NOTE:Themes that intend to override the base theme’s styles and JavaScript must define the following two lines intemplates/base.html:{% block theme_css %}{% static 'css/styles.css' %}{% endblock theme_css %}
{% block theme_js %}{% static 'js/scripts.js' %}{% endblock theme_js %}Download and ContributionsOfficial repositories: (kept in sync)Bitbucket:https://bitbucket.org/bittner/django-organice-theme-rsskGitHub:https://github.com/bittner/django-organice-theme-rsskGetting HelpDocumentation is available athttp://docs.organice.ioQuestions? Please useStackOverflow.  Tag your questions withdjango-organice.Found a bug? Please use either theBitbucketorGitHubissue tracker (you choose)
Package: django-organisms
Organisms is a simple Django app to represent organisms.Download and InstallThis package is registered as “django-organisms” in PyPI and is pip
installable:pipinstalldjango-organismsIfdjangois not found on your system,pipwill install it too.Quick StartAdd‘organisms’to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = (
    ...
    'organisms',
)Runpython manage.py migratecommand to createorganismsmodel.(Optional)The following step is only needed if you have
django-tastypie installed to create a REST API for your project and
would like to have API endpoints fordjango-organisms.Add the following to your project’surls.pyfile:# There are probably already other imports here, such as:
# from django.conf.urls import url, patterns, include

# If you have not already done so, import the tastypie API:
from tastypie.api import Api

# Import the OrganismResource:
from organisms.api import OrganismResource

# If you have not already done so, initialize your API and
# add the OrganismResource to it
v0_api = Api()
v0_api.register(OrganismResource())

# In the urlpatterns, include the urls for this api:
urlpatterns = patterns('',
    ...
    (r'^api/', include(v0_api.urls))
)Usage of Management CommandThis app includes a management commandmanagement/commands/organisms_create_or_update.py,
which can be used to populate the organisms table in the database.
It takes 3 arguments:taxonomy_idscientific_namecommon_nameFor example, to populate the Human object in the database, we would enter:pythonmanage.pyorganisms_create_or_update--taxonomy_id=9606--scientific_name="Homo sapiens"--common_name="Human"
Package: django-orgco
Copyright (c) 2013, Friedrich Paetzke (f.paetzke@gmail.com)
All rights reserved.django-orgco implements a template tag to use orgco easily in django templates.How to useInstall the package viapip$pipinstalldjango-orgcoAdd the package to your installed apps in settings.py.INSTALLED_APPS=(...'django_orgco',...)Then use it. Here is an example:my_template.html:{% load orgdoc %}

{% orgdoc %}
* header is here

- short1 :: long1
- short2 :: long2
- short3 :: long3

| th1 | th2 |
|-----+-----|
| td1 | td2 |
{% endorgdoc %}To enable code highlighting addhighlighttoorgdoc:{% orgdoc highlight %}
is_ok = True
{% endorgdoc %}The tag does not produce safe output by default. You have to mark it as safe yourself:{% load orgdoc %}
{% orgdoc highlight %}
{{ code|safe }}
{% endorgdoc %}