Saravanan666/pypi-org huggingface dataset:
Package: django-xadmin-mirror
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.Live Demohttp://demo.xadmin.ioUser: adminPassword: adminFeaturesDrop-in replacement of Django adminTwitter Bootstrap based UI with theme supportExtensible with plugin supportBetter filter, date range, number range, etc.Built-in data export with xls, csv, xml and json formatDashboard page with widget supportIn-site bookmarkingFull CRUD methodsScreenshotsGet StartedInstallXadmin is best installed via PyPI. To install the latest version, run:pipinstalldjango-xadminor Install from github source:pipinstallgit+git://github.com/sshwsfc/django-xadmin.gitTestpipinstallvirtualenvpipinstalltoxtox# or tox -lInstall Requiresdjango>=1.4django-crispy-forms>=1.2.3 (For xadmin crispy forms)django-reversion([OPTION] For object history and reversion feature, please select right version by your django, seechangelog)xlwt([OPTION] For export xls files)xlsxwriter([OPTION] For export xlsx files)DocumentationEnglish (coming soon)ChineseChangelogs0.5.0Update fontawesome to 4.0.3Update javascript files to compact fa icons new versionUpdate tests for the new instance method of the AdminSite classAdded demo graphsAdded quickfilter plugin.Adding apps_icons with same logic of apps_label_title.Add xlsxwriter for big data export.Upgrade reversion models admin list page.Fixed reverse many 2 many lookup giving FieldDoesNotExist error.Fixed user permission check in inline model.DetailOnline GroupQQ群 : 282936295Run Demo Locallycddemo_app./manage.pyrunserverOpenhttp://127.0.0.1:8000in your browser, the admin user password isadminHelpHelp Translate :http://trans.xadmin.io
Package: django-xblog
django-xblogBlogging application for your Django siteBuild StatusInstallationInstall from PyPi:pipinstalldjango-xblogUsing git:mkdirblog_projectcdblog_projectvirtualenv..bin/activategitclonegit@github.com:rubeon/django-xblog.gitcddjango-xblogpythonsetupinstallThis will install xblog and its requirements.Creating a SiteAfter the above, go through the usual process:django-adminstartprojectmysitecdmysite/
vimysite/settingsAdd the dependencies toINSTALLED_APPS:INSTALLED_APPS=[...# following are for xblog'django.contrib.sites','markdown_deux','xblog',]# Define a site, if not done already!SITE_ID=1MIDDLEWARE=[# add sites middleware# ...'django.contrib.sites.middleware.CurrentSiteMiddleware',]./manage.pymigrate
./manage.pycreatesuperuser--username=admin--email=admin@example.com
Password:
Password(again):
Superusercreatedsuccessfully.
./manage.pyrunserverURL SetupAdd a place to your site's rooturls.pyreach your blog, and don't forget to
add thexblognamespace:fromdjango.urlsimportpath,includeimportxblog.urlsurlpatterns=[path('admin/',admin.site.urls),path('blog/',include(xblog.urls,namespace="xblog"),]Creating usersXBlog uses the Django authentication framework to keep track of users.Usersare linked toAuthors, which can serve as the User profile model.Author profiles are created automatically in theUsermodel'spost_savesignal. Seexblog/models.py:create_profilefor reference.Adding to your templatesXBlog defines the following content blocks:maincontent- the main Blog content with archives, posts, etc.rightnav- Blog roll, archive links, etc.leftnav- navigation block including ...(FIXME: whut?)extrahead- adds meta tags depending on the content being shown:<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title>{% block extrahead %}{% endblock %}subpagetitle- returns title of article or archive<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title>pagestyle- can be placed inbodytag for CSS styling:<bodyclass="{% block pagestyle}{% endblock %}">blogheaders- Returns metadata about blog, such as EditURI, author, etc., for you HTML<head>section<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title>
  {% block extrahead %}{% endblock %}navigation- Can be pulled into your navigation block to allow blog-specific navigation elements:<nav><ul><li>Top</li>{% block navigation %}{% endblock %}</ul></nav>
Package: django-xe-currencies
django-xe-currenciesdjango-xe-currenciesallows you to create your own currency exchange
API synced with XE datafeed service.Quickstart:Install django-xe-currencies:$ pip install django-xe-currenciesAdd tinymce and xe_currencies to INSTALLED_APPS in settings.py for
your project:INSTALLED_APPS = (
    ...
    'xe_currencies',
)Add xe_currencies.urls to urls.py for your project:urlpatterns = patterns('',
    ...
    url(r'^currencies/', include('xe_currencies.urls'))
)Specify XE_DATAFEED_URL in your settings.py:XE_DATAFEED_URL = 'http://www.xe.com/dfs/datafeed2.cgi?xeuser'To make a synchronization with XE datafeed run:python manage.py xe_syncAccess api at the next url:http://yourdomain.com/currencies/api/v1/currencies/exchange/?from=EUR&to=USD&amount=100&format=jsonThis example will return exchange data in JSON format:{"from": "EUR", "to": "USD", "result": "143.45 USD"}To retrieve currencies list use:http://example.com/currencies/api/v1/currencies/?format=jsonUsing exchange in your code:from xe_currencies.api.resources import exchange

exchange('EUR', 'USD', 100)
Package: django-xfield
INTRODUCTIONThis is a Django utility package to handle zero or more form inputs of the same name.It is not uncommon to find a situation where you need to allow zero or more values for the same field. For example:Enter your favorite colors:1.    [ red       ] [+] [-]
2.    [ purple    ] [+] [-]
3.    [ green     ] [+] [-]As an alternative to Django’s Formset, you can choose to do the following with django-xfield:# forms.py
class FavColorForm(forms.Form):
    colors = ExpandableField(fields.CharField, min_values=3, max_length=100)# views.py
def echo_fav_colors(request):
    form = FavColorForm(request.POST)
    if form.is_valid():
        # because 'colors' is an expandable field, it returns a list of all values submitted by the name 'colors'
        colors = self.cleaned_data['colors']
        assert colors == ['red', 'purple', 'green']
        ...django-xfield introduces 2 classes (they are closures in disguise):ExpandableFieldandExpandableWidget, both are factories that return a subclass
of the class that you provide as the first positional argument.ExpandableFieldaccepts 2 optional arguments -min_valuesandmax_valuesand pass the
rest of the arguments, if provided, to the actual field class for initialization.min_valuesthe minimum number of values that user must provided, default to 0max_valuesthe maximum number of values that user can supply, default to None (WARNINGnot implemented)For example, “colors” is assigned a subclass of CharField that returns a list with a minimum of 3 items/values in it.Just like a normal field, you can supply a different widget if the default is not what you want. However, the widget must be an instance of the
class thatExpandableWidgetreturns (recall thatExpandableWidgetis a closure, not a class). For example:class FavColorForm(forms.Form):
    colors = ExpandableField(fields.CharField, min_values=3, max_length=100, widget=ExpandableWidget(Textarea, min_values=3))NOTEIt is necessary to pass the samemin_values/max_valuesif you are supplying a customExpandableWidget.This simplify the server-side as well as client-side (Javascript) programming. For a list of working examples, please visithttp://demo.phuihock.com/xfield/.
Alternatively, you can also run the demo locally:$ git clone git://github.com/phuihock/django-xfield.git
$ virtualenv --distribute django-xfield
$ cd django-xfield
$ source bin/activate
$ pip install -r req.txt
$ python manage.py runserverThen, go tohttp://127.0.0.1:8000/What works for me may not work for everyone else. If you find this utility useful and need example of specific use case, I’ll be glad to provide some.
Also, checkout the demo app.INSTALLATION$ pip install django-xfieldThis is not a Django app, so you don’t have to add it to INSTALLED_APPS.CAVEATdjango-xfield works with simple field types, such as CharField, IntegerField, ChoiceField - that returns a single value. It doesnotsupport MultiValueField or any subclass of it. That said, do not use this with SplitDateTimeField or your MultiValueField subclass.BUGSLikely. If you find one, please file an issue.TODOThis should go to issues, but just for the record, this thing needs tests, a lot of tests.
Package: django-x_file_accel_redirects
This app allowes you to protect static files served by nginx with authorization
of your django projectProtecting filesThis example will show how to protect 2 file positions from downloading:{static_url}/files/fbi{static_url}/files/ciaIn this example we will assume that static url is /static/Steps to protect files:in nginx config disable access to desired locations:location/static/files/fbi{denyall;}location/static/files/cia{denyall;}Add internal path to serve this files.
We will add “root” directory to serve both locations with one configuration option:# needed for x-file-accelllocation/internal/files/{internal;alias$project_base/static/files/;}Configure x_file_accel_redirects app:Setsettings.X_FILE_ACCEL = True.add"x_file_accel_redirects"tosettings.INSTALLED_APPS.Add app to your root url config, e.g.:urlpatterns+=patterns('',(r'^protected/',include('x_file_accel_redirects.urls')),)In django admin create new instance of x_file_accel_redirects.AccelRedirect with next values:Description: anything meaningful.URL prefix: any latin letters without slashes, e.g. “downloads”.Login required: True.Internal path: “/internal/files/””  (as specified in nginx config).serve document root: optionaly you can specify path to directory with needed files
to serve them with django staticfiles app whensettings.X_FILE_ACCEL == False.When everything is configured and restarted you will be able to get file$project_base/static/files/fbi/secrets/ufo.txtby next url:/protected/downloads/fbi/secrets/ufo.txt(/downloads/ if from “prefix” field of AccelRedirect)
Package: django-xformula
django-xformulaDjango query evaluator, is built on top of XFormula language front-end.This project is still in development.If you're interested, you may check the note inXFormularepository.Features:Bidirectional operatorsSame syntax for both Python and Django query evaluationOperations contain at least oneQuerySet, will be evaluated asQuerySetOperations contain at least oneQ, will be evaluated asQOperations contain at least oneCombinable, will be evaluated asCombinableOperations contain at least oneField, will be evaluated asCombinableOperations contain at least oneModelinstance, will be evaluated asValuewhich contains the model instance's primary keyOther operations work like how Python doesZero built-in variable by defaultsWhen a variable name is used but does not exist in the specified built-ins,
it will be evaluated asFobjectCustomizable attribute getter; manage which attributes can be used in formulas
(Getting an attribute of an object is forbidden by default, and raisesForbiddenAttributeerror which inherits Django'sPermissionDeniedclass)Customizable caller; manage which functions can be called in formulas
(Calling a callable is forbidden by default, and raisesForbiddenCallerror
which inherits Django'sPermissionDeniedclass)LicenseMIT
Package: django-xhtml2pdf
AttentionThis project is wrapper code between the django project and the xhtml2pdf
project, both have a few maintaining so maybe are not ideal for your project.Please get in touch if you would like to take over maintainership.What it does is simply allow people to create xhtml2pdf templates using all the
cool django things like STATIC_URL etc.. (like one would for a webpage
template), and the utils function makes all the images and ressources appear in
the pdf.UsageSimply do the following:from django_xhtml2pdf.utils import generate_pdf

def myview(response):
    resp = HttpResponse(content_type='application/pdf')
    result = generate_pdf('my_template.html', file_object=resp)
    return resultClass-based viewsYou can use the provided PdfMixin with any view that subclasses TemplateView,
example:from django.views.generic.detail import DetailView
from django_xhtml2pdf.views import PdfMixin
from .models import Product

class ProductPdfView(PdfMixin, DetailView):
    model = Product
    template_name = "product_pdf.html"It will output the rendered content of the view in pdf.DecoratorSimply do the following:from django_xhtml2pdf.utils import pdf_decorator

@pdf_decorator
def myview(request):
    return render(request, 'mytemplate.html')Change de pdf file name:from django_xhtml2pdf.utils import pdf_decorator

@pdf_decorator(pdfname='new_filename.pdf')
def myview(request):
    return render(request, 'mytemplate.html')
Package: django-xiti
Django app to include Xiti loading code into your templatesThis is a very basic app that does not contains any view, just a template tag to build the HTML code to load Xiti in your site pages.It relies on Xiti parameters defined in your settings.LinksDownload hisPyPi package;Clone it on hisrepository;RequiresDjango>= 1.4;InstallFirst install the packagepip install django-xitiAdd it to your installed Django apps in settings :INSTALLED_APPS = (
    ...
    'xiti',
    ...
)Then fill your Xiti paramters in your settings:XITI_CONF = {
    'xiti_serverid': '', # Xiti server ID for usage on http protocole
    'xiti_serverid_secure': '', # Xiti server ID for usage on https protocole
    'xtsite': '', # Xiti site ID, also named 's'
    'xtn2': '', # level 2 site ID, also named 's2'
    'xtpage': '', # page name (with the use of :: to create chapters), also named 'p'
    'xtdi': '', # implication degree, also named 'di'
    'xt_an': '', # user ID, also named 'an'
    'xt_ac': '', # category ID, also named 'ac'
    'xt_multc': '', # all the xi indicators (like "&x1=...&x2=....&x3=...")
}All these parameters are generated for your site from your Xiti account.xiti_serveridandxtsitevalues are required. If required values are not filled,xiti_codeusage will raise a exceptionXitiSettingsError.Loading ‘xtcore.js’Finally,you must have the Xiti Javascript core filextcore.jsin your static. This file is not shipped into this app because it can be different from a site to another, you need to download it from your Xiti account.When you got it, just put it asjs/xtcore.jsinto your staticfiles directory. If you want to use another path or to load it differently you can override templatexiti/include_js.htmlin your templates directory.Generally, you should not try to load it without this template, because Xiti Javascript core must be loaded after parameters are defined else it won’t be able to use them, resulting in blank report.UsageJust use the template tag into your templates:{% load xiti_tags %}
{% xiti_code %}This tag does not accept any argument.
Package: django-xliff
Full documentation is atRead the Docs.XML Localization Interchange File Format (XLIFF) is an XML-based format created to standardize the way localizable data are passed between tools during localization.OASISstandardized XLIFF in 2002. Django-XLIFF conforms toversion 1.2.XLIFF is a bit more verbose than the Django’s standard XML output. Sample output looks like (extra white space added for readability:<?xml version="1.0" encoding="utf-8"?><xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"version="1.2"xmlns:d="https://docs.djangoproject.com/"><filedatatype="database"source-language="en-us"original="simpleapp.tag.2"><body><groupresname="simpleapp.tag.2"restype="row"><trans-unitresname="data"translate="no"id="data"restype="x-SlugField"><source>tag2</source></trans-unit><trans-unitd:keytype="pk"d:to="contenttypes.contenttype"restype="x-ForeignKey"d:rel="ManyToOneRel"resname="content_type"translate="no"id="content_type"><source>37</source></trans-unit><trans-unitresname="object_id"translate="no"id="object_id"restype="x-PositiveIntegerField"><source>200</source></trans-unit></group></body></file></xliff>
Package: django-xlink
Authors:Justin Quick <justquick@gmail.com>Version:0.1pip install django-xlink==0.1.1Django Cross Link takes in particular URLs on an external site and periodically
combs through those URLs searching for links back to your site. The cross
site links are stored in the database for future use and displayRequirementsXLink requireslxmlfor HTML parsing:pip install lxmlSetupAddxlinkto yourINSTALLED_APPSand run./manage.py syncdbAdd some queries in the admin so xlink knows which URLs to comb through and which
domain (usually your own site’s) you want to search for cross linking.Next run the management command./manage.py xlink_searchwhich will take the queries
and populate them with results of cross site links.I recomend putting the management command in a cronjob every hour or so to make
the results appear in real time.TODOSpider pages starting at one URL looking for cross site links
Package: django-xls2po
django-xls2po is a Django management command to convert django-po2xls generated .xls files to .po filesContentsWarningInstallationConfigurationUsageContributingLicensingContactsWarningdjango-xls2po does not support plural.InstallationObtain your copy of source code from the git repository:$ git clonehttps://github.com/vint21h/django-xls2po.git. Or download the latest release fromhttps://github.com/vint21h/django-xls2po/tags/.Run$ python ./setup.py installfrom the repository source tree or unpacked archive. Or use pip:$ pip installdjango-xls2po.ConfigurationAdd"xls2po"tosettings.INSTALLED_APPS.INSTALLED_APPS+=["xls2po",]UsageJust run:$ python ./manage.pyxls-to-poDjango management command from project folder and if you havedjango-po2xlsgenerated .xls files near of your .po files they will be overwritten by .xls files content.ContributingFork itInstallGNU MakeInstall and configurepyenvandpyenv-virtualenv pluginInstall and configuredirenvCreate environment config from examplecp.env.example.envInstall development dependencies:makeinstallCreate your fix/feature branch:gitcheckout-bmy-new-fix-or-featureCheck code style and moreover:makecheckRun tests:maketestPush to the branch:gitpushoriginmy-new-fix-or-featureCreate a new Pull RequestLicensingdjango-xls2po is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
For complete license text see COPYING file.ContactsProject Website:https://github.com/vint21h/django-xls2po/Author: Alexei Andrushievich <vint21h@vint21h.pp.ua>For other authors list see AUTHORS file.
Package: django-xlspopulator
django_xlspopulatorEasy to use .xls Django model populator.How to:First you need to install latest version ofxlrd: pip install xlrd==1.1.0In order for this to work, you need exactly match your model's field names and xls's first row values(column names), like this:classTest(models.Model):one=models.CharField(max_length=150)two=models.CharField(max_length=150)three=models.CharField(max_length=150)four=models.CharField(max_length=150)Then you need to createpopulate.pyfile at the one level with yourmanage.pyPut following code there:# populate.pyimportosimportdjangofromdjango_xlspopulator.populatorimportPopulatoros.environ.setdefault('DJANGO_SETTINGS_MODULE','YOURPOJECT.settings')django.setup()fromYOURAPP.modelsimportTestpop=Populator('C:/Users/Guido/Desktop/testfile.xls',Test)pop.populate()Populator object takes three arguments:path to the .xls file in form of a stringDjango model objectSheet number, int(0 by defaulft, specify it if you want to use other sheet)Runpopulate.pyfrom the terminal and wait. For my old machine with SQLite it took 5 mins to populate model from file that had 4 columns and 10000 rows.
Package: django-xmlmapping
Library to map XML data to a Django data model, and persist the data in the data base.
Supports any data base supported by Django itself.It has 2 dependencies:django-jsonfieldandlxml.For now, it has just been tested with: Python 2.7, Django 1.4, django-jsonfield 0.8.10 and lxml 2.3.4
but feel free to try it with other versions and let me know.For installation instructions, see the fileINSTALL.rstin this
directory; for instructions on how to use this application, and on
what it provides, see the fileoverview.rstin thedocs/directory.Next things to doSee the roadmap on Trello:https://trello.com/b/NwQGznbAwrite tests caseswrite more documentationtest with older versions of python and djangohandle XML attributeshandle Booleans, numbers, …handle date parsinghandle more feed formatsmake it possible to download a file right in the apphandle mapping of nested modelscreate advanced transformers
Package: django-xmlrpc
Django_xmlrpcoffers a means by which a Django developer can expose their
views (or indeed any other function) using XML-RPC.This is a fork of the original version made by Svetlyak40wt compatible with
Django >= 1.8 and Python >= 2.5.If you want to usedjango_xmlrpcfor an older version of Django or Python,
please use an old release.ContentsInstallationUsageInstallationYou could retrieve the last sources fromhttp://github.com/Fantomas42/django-xmlrpcand run the installation script$ python setup.py installor use pip$ pip install -e git://github.com/Fantomas42/django-xmlrpc.git#egg=django-xmlrpcUsageRegisterdjango_xmlrpcin your INSTALLED_APPS section of your project’
settings.There are two ways to register methods that you want to handle:In your project’s settings.XMLRPC_METHODS = (('path.to.your.method', 'Method name'),
                  ('path.to.your.othermethod', 'Other Method name'),)In a file calledxmlrpc.pyin your application directory.XMLRPC_METHODS = (('path.to.your.method', 'Method name'),
                  ('path.to.your.othermethod', 'Other Method name'),)A registered method should look like this:from django_xmlrpc.decorators import xmlrpc_func

@xmlrpc_func(returns='string', args=['string'])
def test_xmlrpc(text):
    """Simply returns the args passed to it as a string"""
    return "Here's a response! %s" % str(text)Finally we need to register the url of the XML-RPC server. Insert something
like this in your project’s urls.py:from django_xmlrpc.views import handle_xmlrpc

url(r'^xmlrpc/$', handle_xmlrpc, name='xmlrpc'),
Package: django-xor-formfields
# Mutually Exclusive Form Fields[![Build Status](https://travis-ci.org/dschep/django-xor-formfields.svg?branch=master)](https://travis-ci.org/dschep/django-xor-formfields)Easily add mutually exclusive fields to Django forms.## Install### PyPI```pip install django-xor-formfields```### Source```python setup.py install```## Example mutually exclusive form field (TextInput & Select):```# with a widget inferenceMutuallyExclusiveValueField(fields=(forms.TypedChoiceField(choices=[(1,1), (2,2)], coerce=int),forms.IntegerField()))# manual widget creation (allows for the placeholder attr & other customization)MutuallyExclusiveValueField(fields=(forms.IntegerField(), forms.IntegerField()),widget=MutuallyExclusiveRadioWidget(widgets=[forms.Select(choices=[(1,1), (2,2)]),forms.TextInput(attrs={'placeholder': 'Enter a number'}),]))```## Using FileOrUrlFieldThis library also includes a more complete field that inherits from`MutuallyExclusiveValueField` that allows users to upload files via an URL or afile upload. The field accepts a `to` parameter accepting the following values:`None, 'url', 'file'`. This value causes the field to perform either nonormalization, normalizatoin to an url (by storing uploaded files as media) orto a file (by downloading urls to an `InMemoryUploadedFile`).### Example:```FileOrUrlField(None) # returns UploadedFile objects or URL based on user inputFileOrUrlField(to='file') # always validates to an UploadedFileFileOrUrlField(to='url', upload_to='foobar') # always validates to an URL```#### AWS note:The `FileOrUrlField` supports a they keyword argument `no_aws_qs` whichdisables aws querystring authorization if using AWS via `django-storages`## Tests & coverage!to run the tests simply run:```DJANGO_SETTINGS_MODULE=xorformfields.test_settings django-admin.py test xorformfields```Coverage results are available here: https://dschep.github.io/django-xor-formfields/htmlcov/