Saravanan666/pypi-org huggingface dataset:
Package: django-treasuremap
django-treasuremapdjango-treasuremap app, makes it easy to store and display the location on the map using different providers (Google, Yandex, etc).RequirementsPython 2.7+ or Python 3.4+Django 1.11+InstallationUse your favorite Python package manager to install the app from PyPI, e.g.Example:pip installdjango-treasuremapAddtreasuremaptoINSTALLED_APPS:Example:INSTALLED_APPS=(...'treasuremap',...)ConfigurationWithin yoursettings.py, you’ll need to add a setting (which backend to use, etc).Example:TREASURE_MAP={'BACKEND':'treasuremap.backends.google.GoogleMapBackend','API_KEY':'Your API key','SIZE':(400,600),'MAP_OPTIONS':{'zoom':5}}Example usageIn modelsfromdjango.dbimportmodelsfromtreasuremap.fieldsimportLatLongFieldclassPost(models.Model):name=models.CharField(max_length=100)point=LatLongField(blank=True)In adminfromdjango.contribimportadminfromtreasuremap.widgetsimportAdminMapWidgetfrom.modelsimportPost@admin.register(Post)classPostAdmin(admin.ModelAdmin):defformfield_for_dbfield(self,db_field,**kwargs):ifdb_field.name=='point':kwargs['widget']=widgets.AdminMapWidget()returnsuper(PostAdmin,self).formfield_for_dbfield(db_field,**kwargs)In formsfromdjangoimportformsfromtreasuremap.formsimportLatLongFieldclassPostForm(models.Model):point=LatLongField()<head>...<!-- jQuery is required; include if need --><scripttype="text/javascript"src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>...</head><formmethod="POST"action=".">{{ form.media }}
    {% csrf_token %}
    {{ form.as_p }}</form>Depending on what backend you are using, the correct widget will be displayed
with a marker at the currently position (jQuery is required).SettingsSupport map:Google maptreasuremap.backends.google.GoogleMapBackendYandex maptreasuremap.backends.yandex.YandexMapBackendOther settings:API_KEY- if need, defaultNoneSIZE- tuple with the size of the map, default(400, 400)ONLY_MAP- hide field lat/long, defaultTrueMAP_OPTIONS- dict, used to initialize the map, default{'latitude': 51.562519, 'longitude':-1.603156,'zoom': 5}.latitudeandlongitudeis required, do not use other “LatLong Object”.
Package: django-treebeard
django-treebearddjango-treebeardis a library that implements efficient tree
implementations for the Django Web Framework 2.2 and later.It is written by Gustavo Picón and licensed under the Apache License
2.0.StatusFeaturesdjango-treebeard is:Flexible: Includes 3 different tree implementations with the
same API:Adjacency ListMaterialized PathNested SetsFast: Optimized non-naive tree operationsEasy: Uses Django Model Inheritance with abstract classes to
define your own models.Clean: Testable and well tested code base. Code/branch test
coverage is above 96%.You can find the documentation inhttp://django-treebeard.readthedocs.io/en/latest/Supported versionsdjango-treebeardofficially supportsDjango 3.2, 4.1, 4.2, 5.0Python 3.8 - 3.12PostgreSQL, MySQL, MSSQL, SQLite database back-ends.
Package: django-treebeard-dag
This app implements directed acyclic graphs for Django, with an API that will be
very familiar to people who’ve used Gustavo Picon’s efficient tree implementations
in django-treebeard before.Works for me, but has no unit tests and may not see any improvements from me anytime
soon. Just putting it out there in case it might be a useful starting point for
somebody else.django-treebeard-dag comes with a simplified BSD license, a very liberal license.
See the included LICENSE file for details.
Package: django-treebeard-rvanlaar
django-treebeardis a library that implements efficient tree implementations
for the Django Web Framework 1.8 and later.It is written by Gustavo Picón and licensed under the Apache License 2.0.StatusFeaturesdjango-treebeard is:Flexible: Includes 3 different tree implementations with the same API:Adjacency ListMaterialized PathNested SetsFast: Optimized non-naive tree operationsEasy: Uses Django Model Inheritance with abstract classes to define your own
models.Clean: Testable and well tested code base. Code/branch test coverage is above
96%. Tests are available in Jenkins:Test suite running on different versions of Python and Django:https://travis-ci.org/django-treebeard/django-treebeard/You can find the documentation inhttp://django-treebeard.readthedocs.io/en/latest/Supported versionsdjango-treebeardofficially supportsDjango 1.8 - 2.0Python 2.7, 3.4, 3.5, 3.6PostgreSQL, MySQL, SQLite database back-ends.
Package: django-tree-comments
django-tree-commentsA django library for building comments in tree structure.This library is under heavy development. v0.0.0 is a placeholder version which actually contains nothing. Version numbers of the library followSemVer. However, to avoid version numbers grow too fast, at the experimental stage the library will be released under version number with format 0.0.x that SemVer rules do not apply.FeaturesQuery comments as a tree structure efficiently thanks todjango-tree-queries.No generic relationships, no additional fields needed so that make comment model pure and clean.Provide forms, serializers, utilities and everything you need to help building a complete comment app for your django project.LimitationsSince the core feature for tree structure comments is based on the implementation ofdjango-tree-queries, so this library extends the same limitations from that.UsageAvailable soon...Example projectAvailable soon...
Package: django-treeform
fromdjangoimportformsfromdjango_treeformimportTreeForm,SequenceNode,SequenceclassCharacteristicForm(TreeForm):id=forms.IntegerField()name=forms.CharField()rating=forms.CharField()classPersonForm(TreeForm):id=forms.IntegerField()name=forms.CharField()phone=forms.CharField()Charecteristics=SequenceNode(CharacteristicForm)params=[{"id":1,"name":"abc","phone":"12345","Charecteristics":[{"id":1,"name":"Good Looking","rating":"Average",},{"id":2,"name":"Smart","rating":"Excellent",}]},{"id":2,"name":"abc","phone":"12345","Charecteristics":[{"id":1,"name":"Good Looking","rating":"Average",},{"id":2,"name":"Smart","rating":"Excellent",}]}]form=Sequence(PersonForm)(params)print(form.is_valid())# => Truemore nested formsfromdjangoimportformsfromdjango_treeformimportSequenceNode,TreeFormclassItemForm(forms.Form):name=forms.CharField()classNestedForm(TreeForm):classa(TreeForm):classb(TreeForm):classc(TreeForm):classd(TreeForm):classe(TreeForm):items=SequenceNode(ItemForm)params={"a":{"b":{"c":{"d":{"e":{"items":[{"name":"A"},{"name":"B"}]}}}}}}formlike=NestedForm(params)print(formlike.is_valid())# => Trueexpected={'a':{'b':{'c':{'d':{'e':{'items':[{'name':'A'},{'name':'B'}]}}}}}}assertformlike.cleaned_data==expectedassertformlike.errors=={'a':{'b':{'c':{'d':{'e':{'items':[{},{}]}}}}}}custom validationclassPointForm(forms.Form):x=forms.IntegerField()y=forms.IntegerField()classPointPairForm(TreeForm):left=Node(PointForm)right=Node(PointForm)defclean(self):ifself.has_error():returnifself.cleaned_data["left"]["x"]<self.cleaned_data["right"]["x"]:raiseforms.ValidationError("oops")params={"left":{"x":10,"y":20},"right":{"x":20,"y":"20"}}formlike=PointPairForm(params)print(formlike.is_valid()# => Falseprint(formlike.errors)# => {"left": {}, "right": {}, "__all__": ["oops"]}
Package: django-tree-materialized
RequirementsPython 3.6+A supported version of Django (currently 3.x)Getting ItYou can get Django tree materialized by using pip:$ pip install django-tree-materializedIf you want to install it from source, grab the git repository from GitHub and run setup.py:$ git clone git://github.com/kostya-ten/django_tree_materialized.git
$ cd django_tree_materialized
$ python setup.py installInstallationTo enabledjango_tree_materializedin your project you need to add it toINSTALLED_APPSin your projectssettings.pyINSTALLED_APPS=(# ...'django_tree_materialized',# ...)UsingAdd to yourmodels.pyfromdjango_tree_materialized.modelsimportMPTreeclassYouModel(MPTree):name=models.CharField(max_length=200)Simple examplename=models.YouModel.create(name="Name name")sub=models.YouModel.create(name="Name node2",parent=name)# Get a list of parentsresult=name.get_family()# Return QuerySet objectforiteminresult:print(item.id,item.name,item.level,item.path,item.parent)Methodget_family() - Get a list of parentsget_parent() - Return parentget_root() - Return root objectmove() - Moves one node to anotherMovename=models.YouModel.create(name="Name name")new_name=models.YouModel.create(name="Name node2")result=name.move(new_name)# Return QuerySet new_name object
Package: django-treenavext
django-treenavext=================.. image:: https://travis-ci.org/Natgeoed/django-treenavext.svg?branch=master:target: https://travis-ci.org/Natgeoed/django-treenavextAddding extra features to the treenav project.Settings:---------The following form shows up in the admin interface to extend the MenuItem ofthe *django-treenav* project. It  defaults to 'treenavext.forms.DefaultExtraMetaForm'TREENAVEXT_EXTRA_FORM = 'simpleapp.forms.ExtraMetaForm'Installation------------Install the app with:cd django-treenavextpython setup.py installSettings--------Add to your INSTALLED_APPS and run syncdb:INSTALLED_APPS = (...,'mptt','treenav','treenvext',)
Package: django-treensl
Django application for creating the tree structure in the model (very fast structure).To create a new item in the tree need only choose a parent. The key (id) for the new item will be calculated automatically.
You can get a list of the parents and the range of children without a database query.Implemented to create a new item, delete the item, transfer item to the other parent (and the transfer of the group).Description of the algorithm for constructing the tree can be foundhabr.ruor in thewiki(in Russian)This app is available onPyPI.RequirementsSupportsDjango1.8 and later on Python 2.7,
3.2 - 3.5.Works only with PostgreSQL 9.1 and later!InstallationClonethisrepository. The is an example of a project (appmyappusetreensl)Change the settings for connecting to the correct PostgreSQL DB.or:pip installdjango-treenslAdd apptreenslinsettings.pyCreate a new class of models fromTree32AbstractorTree64Abstract(fromtreensl.models). Add your field in the model (for their fields,do not usethe following names:id,parent_id,lvl,created_children,removed_children,holes). If necessary, change the dimension of the default tree (propertiesLEVELSandCHILDREN). For example seemyapp/models.pyRunpython manage.py makemigrationsThe new file migration, add the 3 lines as in the example filemyapp/migrations/0001_initial.py(the rows are marked with comments# add after makemigrations)Possible dimensions of the treeBeforeexecuting themigrateyou can adjust the settings tree. The dimension of the tree depends on the lengthinteger.Recommended values (in the formatLEVELS/CHILDREN/ROOT_ID):Forint32:3/1623/-2147483648,4/255/-2147483648,5/83/-2147483648,6/39/-2147483648Forint64:3/2642243/-9223372036854775808,4/65535/-9223372036854775808,5/7129/-9223372036854775808,6/1623/-9223372036854775808,7/563/-9223372036854775808,8/255/-9223372036854775808,9/137/-9223372036854775808,10/83/-9223372036854775808Start usageRunpython manage.py migrateNow, to create a new item in the tree need only choose a parent. The key (id) for the new item will be calculated automatically.You can get a list of the parents and the range of children without a database query.For anyidcall functions from thetreensl.calc_values:parents_list(id, LEVELS, CHILDREN, ROOT_ID)- returns a list of the first to the last parentchildren_range(id, LEVELS, CHILDREN, ROOT_ID)- returns a list of the range of childrenLEVELS,CHILDREN,ROOT_ID- settings current tree
Package: django_trees
django_treesSimple way to create, persist and manipulate reliable tree structures using Django models.Installationpip installdjango-treesAPI UsageCreate ModelTo create a model extendAbstractNodeand add desired fields.fromdjango.dbimportmodelsfromdjango_trees.modelsimportAbstractNodeclassFolder(AbstractNode):name=models.CharField(max_length=10)Create Tree NodesTo create a tree node, there is nothing different than creating a normal Django model other than you may specify a parent node.root=Folder.objects.create(name="Root")documents=Folder.objects.create(name="Documents",parent=root)downloads=Folder.objects.create(name="Downloads",parent=root)projects=Folder.objects.create(name="Projects",parent=documents)Get Node DescendantsTo retrieve all of the descendants of a node (including children, grandchildren, great grandchildren, etc) use theget_descendantsmethod. This method will return a flat list of node objects.root.get_descendants()Get Node AncestorsTo retrieve all of the ancestors of a node (including parents, grandparents, great grandparents, etc) use theget_ancestorsmethod. This method will return a flat list of node objects.projects.get_ancestors()Get Node ChildrenTo retrieve all immediate children of the current node use theget_childrenmethod. This method will return a flat list of node objects.projects.get_children()Move NodeTo move a node to a different position in the tree use themovemethod passing the new parent node as an argument.projects.move(root)Bifurcate NodeTo create a separate tree from a branch of an existing tree use thebifurcatemethod. The node object will be removed from the previous tree and it along with its descendants will now be in a new tree.projects.bifurcate()Get ASCII TreeTo get an ascii representation of the tree structure use theget_ascii_treemethod.projects.get_ascii_tree()Demo
Package: django-tree-tag
There is currently no great way to do tree structures in Django templates.Thus, this module contains a tag for rendering trees from sequences.For this, a method for recursion is given, as well as for defining start and endmarkers. A full example of the syntax of this template tag is the following:{% load treetag %}{% tree item_seq %}<ul>                             {# indentation section #}{% for item in tree %}           {# item start #}<li>{{ item.description }}{% subtree item.sub_seq %}   {# subtree renders same as whole tree #}</li>{% endfor %}                     {# item end #}</ul>                            {# outdentation section #}{% endtree %}The syntax defined here thus has two special tags and splits into threesections. The sections are:1. The tree indentation section2. The tree item section3. The tree outdentation sectionStart a tree by enclosing the whole of the tree code with a `tree`/`endtree` tagpair. The `tree` tag needs to receive one argument, a sequence of items. Thissequence will be available inside the tree as a variable named `tree`. Therenaming is necessary so we can map the sequence in subtrees to the same name.The three sections are separated by a `for`-loop looping over the items.In the tree indentation section, place everything that belongs to the 'head' ofa tree, like the start tags of a list or a table.In the item section, place everything that renders the item, as well as thespecial recursive tag that renders the subtree. The `subtree` tag simply takesFinally in the outdentation section, place everything that closes the tree, likethe closing of the list or table tags and any footer material for the tree.Nested trees are not supported at the moment (i.e. placing a `tree` sectioninside of another `tree` section).Alternatives are:* django-mptt: https://github.com/django-mptt/django-mptt/* self-made tree unrolling: https://stackoverflow.com/questions/32044/how-can-i-render-a-tree-structure-recursive-using-a-django-template* hacking the `include` tag: http://blog.elsdoerfer.name/2008/01/22/recursion-in-django-templates/ (please don't do this!)* for simpler cases, the builtin `unordered-list` filter might be sufficient: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#unordered-list
Package: django-tree-view
Django Tree ViewOrganize your view code and templates and in a directory structure, and automatically generate urls for them.Terminology"Tree View" refers the actual view function we've created, which processes a request according to code you write inside your "view tree".Installationpip install django_tree_viewIn your urls.py file, add in a call tomake_tree_view, passing in the python package name (dotted python path) of your view tree:fromdjango_tree_viewimportmake_tree_viewurlpatterns=[make_tree_view('my_view_tree'),]Note: we're not using django's path() here, and we didn't specify a url regex. make_tree_view() returns an object which dynamically resolves urls, matching them whenever there is a corresponding directory (with aview_tree_node.pymodule) inside of your view tree.Note: you can useinclude('some_path/', [make_tree_view()])if you want a url prefix.Optionally, add the full path to your view tree to theDIRSoption of yourDjangoTemplatesbackend:TEMPLATES=[{'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS':[os.path.join(BASE_DIR,'my_view_tree')],...},]This will allow you to place page-specific templates inside the same directory which holds the view code for that url.CSRF ProtectionOur view uses Django'scsrf_exemptdecorator, and selectively applies its own CSRF protection.Any view tree node can opt-out of CSRF protection by settingCSRF_EXEMPT=Trueat the module level.The CSRF protection we use is not Django's default CSRF protection. We use utilities from django_referer_csrf. You may want to check out the documentation for django_referer_csrf, and use their middleware in place of Django's, but this isnotrequired.Organizing Your View TreeTODOTODOWhen DEBUG and reloading, reload empty modules (not sure, but this might already be done)."Single View Tree" approachOur path resolver no longer matches when the "path directory" contains noview_tree_node.pyfile.I think we should change how view trees are "installed". The user should define one globalVIEW_TREE_ROOT. You can "install" reusable apps in your view tree by symlinking to them from your view tree.This makes things easier to understand for the end user. They don't need understandmake_tree_view(). You have a single directory containing your view tree. Period.The challenge: if an app is distributed on pypi, symlinking to it (in a way that can be copied between server environments), is not trivial.
Package: django-treewidget
treewidget for DjangoProvides the model fields TreeForeignKey, TreeOneToOneField, TreeManyToManyField
for tree models with a tree widget for django. Usesjstree(thanks to vakata).Tested with django-mptt 0.15 and django-treebeard 4.7 with Django 4.2.Installationpip install django-treewidgetplace'treewidget'inINSTALLED_APPSfor AJAX tree updates add the routes to your urls.py,
e.g.url(r'^treewidget/', include('treewidget.urls'))UsageJust replace any foreign key, m2m or one2one tree model field with the provided counterpart.
jstree depends on jQuery to work. This module does not provide a jQuery version, use the
admin version or place your own version along with your other assets.CustomizationThe fields understand two additional arguments:settings: Dictionary containing the optional boolean values for 'show_buttons'
(shows "Expand", "Collapse" and "Selected" buttons), 'search' (for in-tree search),
'dnd' (drag and drop support) and 'sort' (apply tree order in frontend). Defaults to{}.treeoptions: Settings directly applied tojstree. Must be a JSON string, if given as
argument to a field, otherwise a python dictionary. Defaults totreewidget.fields.TREEOPTIONS.
Note that some widget settings will override treeoptions to keep working.Both settings can be provided project wide in settings.py asTREEWIDGET_SETTINGSandTREEWIDGET_TREEOPTIONS.It is possible to render a deeper nested subtree by overriding the default
formatter. Just set the parent id to '#' in the formatter'srendermethod for the entries,
that should appear at top level.NOTE: If you use a prefiltered queryset which data does not form a well-formed tree
containing all parents up to the top level, jstree cannot render it correctly.
With 'filtered' in settings set toTruethose querysets will be rendered by
adding missing nodes as not selectable. Make sure, that this does not leak
sensitive tree data (if so, resort to subtree rendering).Examplefromdjango.dbimportmodelsfrommptt.modelsimportMPTTModelfromtreewidget.fieldsimportTreeForeignKeyclassMptt(MPTTModel):name=models.CharField(max_length=32)parent=TreeForeignKey('self',blank=True,null=True,on_delete=models.CASCADE)def__str__(self):returnself.nameRenders like this:To run the provided example project:$>cdexample
$>pipinstallDjango~=4.2
$>pipinstall-rrequirements.txt
$>./manage.pymigrate
$>./manage.pycreatesuperuser
$>./manage.pyloaddatainitial_data
$>./manage.pyrunserverand point your browser tohttp://localhost:8000/admin/exampleapp/example/add/.
After login you see the widgets in action with different settings.
Also seeexampleapp.Examplemodel in admin to get an idea of several tree rendering options.
Package: django-trello-freckle-sprints
A reusable Django app that helps connection Freckle time entries with Trello
cards.On Freckle, when you track time that has been spent on a certain card, just addcXXXto the entry description, whereXXXis the card-ID from Trello
(you can see that in the URL when you open a card).For more information, see chapter Usage below.InstallationTo get the latest stable release from PyPipipinstalldjango-trello-freckle-sprintsTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-trello-freckle-sprints.git#egg=sprintsAddsprintsto yourINSTALLED_APPSINSTALLED_APPS=(...,'sprints',)Add thesprintsURLs to yoururls.pyurlpatterns=[url(r'^sprints/',include('sprints.urls')),]SettingsTRELLO_DEVELOPER_KEYSet this to your [Trello developer key](https://trello.com/1/appKey/generate).TRELLO_DEVELOPER_SECRETSet this to your [Trello developer secret](https://trello.com/1/appKey/generate).TRELLO_OAUTH_TOKENTODO: Describe how to get the tokensSet this to your oauth token. To obtain your secret you can runipdb:from trello.util import create_oauth_token
create_oauth_token(expiration='never', scope='read', key='yourkey', secret='yoursecret')
# follow the instructions and note down your token and secretTRELLO_OAUTH_TOKEN_SECRETSet this to your oauth token secret.FRECKLE_API_TOKENSet this to your Freckle API token. You can find it underSettings > API.FRECKLE_ACCOUNT_NAMESet this to your Freckle account name. This is the subdomain you use when
logging into Freckle.UsageSprint planningTo get an overview over your current backlog, visit/sprints/backlog/.
Enter the Trello board ID, the lists numbers that contain your backlog and your
hourly rate.You will see a table that shows the estimated time and cost for each card in
the selected lists. The total will give you an idea about how expensive the
whole project will be in total, given the current feature scope.In order to plan your next sprint, enable the checkboxes next to each card
until the selected total matches the budget or hours that you can spend on the
sprint.Sprint overviewTo get an overview over a sprint, visit/sprints/sprint/.TODO: Explain moreContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-trello-freckle-sprintsmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branch