Saravanan666/pypi-org huggingface dataset:
Package: django-evolution
Django Evolution is an add-on to theDjangoweb framework that helps manage
changes to the database schema.“But wait, why would I want this? Doesn’t Django have migrations built-in?
Isn’t this the same thing?”Yes, yes it does, and it mostly is. In fact, Django Evolution works
comfortably alongside Django’s migrations, helping you get the best out of
both.There are cases where you might want an alternative to migrations:You’re still stuck on Django 1.6 or earlier and need to make changes to
your database.Django 1.6 is the last version without built-in support for migrations,
and there are still codebases out there using it. Django Evolution can
help keep upgrades manageable, and make it easier to transition all or
part of your codebase to migrations when you finally upgrade.You’re distributing a self-installable web application, possibly used in
large enterprises, where you have no control over when people are going to
upgrade.Django’s migrations assume some level of planning around when changes are
made to the schema and when they’re applied to a database. The more changes
you make, and the more versions in-between what the user is running and
what they upgrade to, the longer the upgrade time.If a customer is in control of when they upgrade, they might end up withyearsof migrations that need to be applied.Migrations apply one-by-one, possibly triggering the rebuild of a
table many times during an upgrade. Django Evolution, on the other hand,
can apply years worth of evolutions at once, optimized to perform as few
table changes as possible. This can take days, hours or evensecondsoff
the upgrade time.What versions of Django are supported?Django Evolution 2.x supports Django 1.6 through 4.2, and Python 2.7 through
3.12.For older versions of Django, see Django Evolution 0.7.There’s built-in support for evolving SQLite, Postgres, MySQL, and MariaDB
databases.I can’t imagine anything better… How do I start?We have abunch of documentationjust for you!There, you’ll find out how toinstall it,configure itfor your project,generate evolutions, andapply them.Plus,answersto all^W some of your burning questions, like “how do these work
with migrations?” and “why is my syncdb/migrate command weird now?”Who’s using Django Evolution today?There’s dozens of us! Dozens!AtBeanbagwe’re using it inReview Board, our open source code review
product, used by thousands of companies world-wide. So we know it works.
Review Board predated Django’s migrations by a whole lot of years, and
continues to benefit from the optimized upgrade times of evolutions today.
Package: django-evostream
# django-evostream[![Code Climate](https://codeclimate.com/github/tomi77/django-evostream/badges/gpa.svg)](https://codeclimate.com/github/tomi77/django-evostream)## InstallationInstall package via `pip`:pip install django-evostreamActivate `Django` application:INSTALLED_APPS = (...'evostream',...)Setup `EvoStream` HTTP API address:EVOSTREAM_URL = '127.0.0.1:7777'## API Usagefrom evostream.commands import list_streamsprint list_streams()## CLI Usage`django-evostream` provide `Django` commands to manage `EvoStream`.Example:./manage.py liststreams## Documentationhttp://pythonhosted.org/django-evostream/
Package: django-ew-polls
Polls is a Django app to conduct web-based polls. For each question,
visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-exact-target
This library serves as a connector betweendjangoand theExact Target REST API. It will support more of the API in the future, but currently only supports TriggeredSends.InstallationInstall using pip.:$ pip install django-exact-targetAdd your exact target client settings to your Django project’s settings.py file.:EXACT_TARGET_CLIENT_ID = 'my-client-id...'
EXACT_TARGET_CLIENT_SECRET = 'my-client-secret...'UsageDispatch aTriggeredSend. See alsomessage definition sends.:from exacttarget.messages import TriggeredSend

sender = TriggeredSend('my-triggered-send-id')
sender.dispatch('foo@example.com', {
    # SubscriberAttributes
    "Region": "West",
    "City": "Indianapolis",
    "State": "IN"
})ResourcesChangelog1.1.0Update test suite for Django 3.21.0.0Update test suite for Django 2.2 and Python 3.80.2.0Migrate from Sentry’s old SDK (raven) to their new SDK (sentry-sdk).Add support for Python 3.7.0.1.2optional errorcode whitelistExactarget responses with error codes in ET_IGNORED_ERROR_CODES will not throw exceptions0.1.1support for plaintext errors in responses0.1.0Initial release.
Package: django-example-pkg-your-username
#杩欐槸娴嬭瘯鐢ㄧ殑杩欐槸娴嬭瘯鐢ㄧ殑
杩欐槸娴嬭瘯鐢ㄧ殑
杩欐槸娴嬭瘯鐢ㄧ殑for i in range(9):
	print(i)娴嬭瘯鐢ㄧ殑
Package: django-excel-fixture
Django Excel FixtureDjango-excel-fixture is an easy way to import, export and test using .xlsx file.MotivationExcel is a must in the corporate world. It is an easy to use and highly powerful application, currently being used by millions of users (maybe more than a billion user). Django-excel-fixture provides a way to import, export data using excel file (.xlsx); and also use it as test fixture.InstallationTo install it, simply:$pipinstalldjango-excel-fixtureThen add it to your INSTALLED_APPS on your settings.py:INSTALLED_APPS=(#...'django_excel_fixture',)UsageExporting data from database:If you already have some data in the database, to export it to a .xlsx file:$pythonmanage.pydumpdata--formatxlsx--outputmyfilename.xlsxIt is also possible to select a specific model:$pythonmanage.pydumpdatamyapp1.MyModelName--formatxlsx--outputmyfilename.xlsxIf you leave out theoutputoption, the table is dumped to stdout in CSV format.There will be sheets only for table with dataImporting data into the database:To manually load the data from the Excel file, use:$pythonmanage.pyloaddatamyfilename.xlsxUsing as test fixture:To use the fixture in a test, just add to the test class:classMyTestCase(TestCase):fixtures=['myfilename.xlsx']def...No performance optimization has been made. Caution is advised.Excel file formatCurrently, it is only compatible with .xlxs format.Every sheet is a model. The sheet title represents the model's identification.Every column represents a field.Every row represents a object (database entry).Contributiongit clone git@github.com:SKisContent/django-excel-fixture.gitcd django-excel-fixturepython -m venv .venvsource .venv/scripts/activatepip install -r requirements.txtpython runtests.pyAuthorsHenrique PortelaSKisContentLicenseThe MIT License.
Package: django-excel-report
Quick guide:Here is defined models for example:fromdjango.dbimportmodelsclassMyFiles(models.Model):file=models.FileField(upload_to='path/to/upload/')description=models.TextField()classM2MRelated(models.Model):field=models.TextField()classRelatedModel:field=models.TextField()classMyModel:field=models.TextField()related_model=models.ForeignKey(RelatedModel,models.DO_NOTHING)m2m_related=models.ManyToManyField(M2MRelated)How to use BaseReport class:fromdjango_excel_reportimportBaseReportclassMyReport(BaseReport):model=MyModelfields=["field","related_model__field","m2m_related__field"]defsome_task(**kwargs):qs=MyModel.objects.filter(**kwargs)report=MyReport(queryset=qs)file=report.get_django_file()instance=MyFiles.objects.create(description='description')instance.file.save('report.xlsx',file)BaseReport class provides easy way to generate reports with merged cells for related objects:
Package: django-excel-response
A subclass of HttpResponse which will transform a QuerySet,
or sequence of sequences, into either an Excel spreadsheet or
CSV file formatted for Excel, depending on the amount of data.Installationpip install django-excel-responseProvided Classesexcel_response.response.ExcelResponseAccepted arguments:data- A queryset or list of lists from which to construct the outputoutput_filename- The filename which should be suggested in the http response,
minus the file extension (default: excel_data)worksheet_name- The name of the worksheet inside the spreadsheet into which
the data will be inserted (default: None)force_csv- A boolean stating whether to force CSV output (default: False)header_font- The font to be applied to the header row of the spreadsheet;
must be an instance ofopenpyxl.styles.Font(default: None)data_font- The font to be applied to all data cells in the spreadsheet;
must be an instance ofopenpyxl.styles.Font(default: None)excel_response.views.ExcelMixinexcel_response.views.ExcelViewExamplesFunction-based viewsYou can construct your data from a queryset.fromexcel_responseimportExcelResponsedefexcelview(request):objs=SomeModel.objects.all()returnExcelResponse(objs)Or you can construct your data manually.fromexcel_responseimportExcelResponsedefexcelview(request):data=[['Column 1','Column 2'],[1,2][23,67]]returnExcelResponse(data,'my_data')Class-based viewsThese are as simple as import and go!fromexcel_responseimportExcelViewclassModelExportView(ExcelView):model=SomeModel
Package: django-excel-response2
django-excel-response2A function extends of Tarken's django-excel-responsedjango-excel-responseA subclass of HttpResponse which will transform a QuerySet,
or sequence of sequences, into either an Excel spreadsheet or
CSV file formatted for Excel, depending on the amount of data.
All of this is done in-memory and on-the-fly, with no disk writes,
thanks to the StringIO library.DjangoSnippets -http://djangosnippets.org/snippets/1151/PyPI -https://pypi.python.org/pypi/django-excel-response/1.0django-excel-response2When using Tarken’s django-excel-response.
We find that Chinese is messed code when we open .xls in Mac OS.
As discussed inhttp://segmentfault.com/q/1010000000095546.
We realize django-excel-response2 Based on Tarken’s django-excel-response
to solve this problem By adding a Param named font to set font.At The Same Time:Fix Bugcan't subtract offset-naive and offset-aware datetimesInherit# Since Version 2.0.2
if 'FileResponse' in names:
    ExcelResponse = type('ExcelResponse', (http.FileResponse, ), dict(__init__=__init__))
elif 'StreamingHttpResponse' in names:
    ExcelResponse = type('StreamingHttpResponse', (http.StreamingHttpResponse, ), dict(__init__=__init__))
else:
    ExcelResponse = type('HttpResponse', (http.HttpResponse, ), dict(__init__=__init__))Installationpip install django-excel-response2Usagefrom django_excel_response import ExcelResponse

def excelview(request):
    objs = SomeModel.objects.all()
    return ExcelResponse(objs)orfrom django_excel_response import ExcelResponse

def excelview(request):
    data = [
        {
            'Column 1': 1,
            'Column 2': 2,
        },
        {
            'Column 1': 3,
            'Column 2': 4,
        }
    ]
    return ExcelResponse(data, 'my_data', font='name SimSum')orfrom django_excel_response import ExcelResponse

def excelview(request):
    data = [
        ['Column 1', 'Column 2'],
        [1, 2],
        [3, 4]
    ]
    return ExcelResponse(data, 'my_data', font='name SimSum')orfrom django_excel_response import ExcelResponse

def excelview(request):
    data = [
        ['Column 1', 'Column 2'],
        [1, [2, 3]],
        [3, 4]
    ]
    return ExcelResponse(data, 'my_data', font='name SimSum', merge_type='row_merge')Paramsfont='name SimSum'Set Font as SimSum(宋体)force_csv=TrueCSV Format? True for Yes, False for No, Default is FalseCSVdatas=[[u'中文',]]Win Excel 2013Mac Excel 2011Mac Excel 2016Mac NumbersUTF8MessyMessyMessyNormalGB18030NormalNormalNormalMessyUTF8 + BOM_UTF8NormalMessyNormalNormalUTF16LE + BOM
Package: django-excel-response3
django-excel-response3This is an overhaul ofhttps://pypi.python.org/pypi/django-excel-responsewhich was originallyhttp://djangosnippets.org/snippets/1151/added class detection for values, and will use the value
str(class_value)added support for floats, dollar strings, and comma separated number
strings that were broken in other forksrefactored the code to resemble an actual class, as opposed to one
giant init functionremoved the performance killing import every time you write a sheet,
xlwt is required. If you don’t like it use a CSV writerrefactored the CSV writing portion of the code to actually use
python’s csv classadded width auto adjustmentUsagefrom excel_response3 import ExcelResponse

def excelview(request):
    objs = SomeModel.objects.all()
    return ExcelResponse(objs)orfrom excel_response3 import ExcelResponse

def excelview(request):
    data = [
        ['Column 1', 'Column 2'],
        [1,2]
        [23,67]
    ]
    return ExcelResponse(data, 'my_data')Constructor Kwargsheaders - an array containing column headersoutput_name - maintaining this kwarg, but tries first to use the 2nd
arg passed when defining the classforce_csv - forcibly respond with csv, defaults to Falseencoding - defaults to ‘utf8’sheet_name - defaults to ‘Sheet 1’blanks_for_none - replace None values with ’’, defaults to Trueauto_adjust_width - adjust width of each column automatically,
defaults to True
Package: django_excel_templates
Django MS Excel Generator aims to create a template system for generation of
the Excel documents for views (instead of HTML).Simple case: sniff model and make an excel table;Medium case: sniff model, make excel table, and apply predetermined styles (fonts, colors, layout)Advanced case: take models and set custom styles or modify existingRequimentsPython 2.4+ < 3.0Djangoxlwt >= 0.7.2InstallYou have two options:Easy_insall with install the package and all dependencies if they aren’t already installed into your lib/python/:easy_install django_excel_templatesDownload and untar the package; run:python setup.py installExamplestestobjin the following examples is django.db.models.query.QuerySet instanceSimple:
create ExcelReport instance, add excel sheet, add queryset to analyze:>>> from django_excel_templates import *
>>> report = ExcelReport()
>>> report.addSheet("TestBasic")
>>> report.addQuerySet(testobj, REPORT_HORZ, addheader=True)Medium(create styles, one by one):
create ExcelStyle instance to specify style (see help(ExcelStyle) for available methods and style options),
create ExcelFormatter instance, add style to it:>>> report.addSheet("TestStyle")
>>> style = ExcelStyle()
>>> style.set_alignment(horz=3, wrap=1)
>>> style.set_font(font_color='000000', bold=True, italic=True)
>>> style.set_border(border_color='000000', border_style=5)
>>> style.set_pattern(pattern_color='339933', pattern=1)
>>> formatter = ExcelFormatter()
>>> formatter.addBodyStyle(style=style)
>>> report.addFormatter(formatter)
>>> report.addQuerySet(testobj, orientation=REPORT_HORZ, addheader=True)Medium(create styles all at once):>>> report.addSheet("TestStyle2")
>>> headerstyle = ExcelStyle(font_color='00FF00', shadow=True, underline=True,
                             pattern_color='000000', pattern=1, border_style=5,
                             border_color='FFFFFF')
>>> col_style = ExcelStyle(font_color='FFFFFF')
>>> formatter.addHeaderStyle(headerstyle)
>>> formatter.addColunmStyle('column_name', style=col_style)
>>> report.addQuerySet(testobj, REPORT_HORZ, True)Advanced:
change existing styles, set custom styles, adjust column style and width:>>> report.addSheet("ModifyStyle")
>>> style.set_font(font_color='000000', bold=False, underline=True)
>>> style.set_border(border_color='330099', border_style=6)
>>> style.set_pattern(pattern_color='FFFFFF', pattern=1)
>>> colstyle.set_pattern(pattern_color='FFFF33', pattern=1)
>>> formatter.setWidth('column1_name, column2_name', width=600)
>>> report.addQuerySet(testobj, REPORT_HORZ, True)To make django.http.HttpResponse out ofreportand tell the broswer to treat it as an excel attachment:>>> response = HttpResponse(report.writeReport(), mimetype='application/ms-excel')
>>> response['Content-Disposition'] = 'attachment; filename=foo.xls'
Package: django-excel-to-model
Create model file from excelDocumentationThe full documentation is athttps://django-excel-to-model.readthedocs.org.QuickstartInstall django-excel-to-model:pip install django-excel-to-modelThen use it in a project:import django_excel_to_modelFeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-text.txt
(myenv) $ python runtests.pyCreditsTools used in rendering this package:Cookiecuttercookiecutter-pypackageHistory0.1.0 (2015-10-02)First release on PyPI.
Package: django-except-catcher
DJANGO EXCEPT CATCHERdjango-except-catcher is a simple tool to catch and store exceptions and500 errorsin production django applications.When a500 errorhappens a record with the details is stored in the database.Exceptions are stored and listed so you can find similar errors and look their "yellow error page", just like in django's debug mode.It doesn't require to run any daemon in order to work, just install a regular django module.Inspired by django's AdminMailHandler.For an example out of the box, take a lookhere.INSTALLATIONInstall django-except-catcher:pipinstalldjango-except-catcherAdd to urls.py:path('',include(('except_catcher.urls','except_catcher'),namespace="except_catcher"))add to settings.py:INSTALLED_APPS=[...'except_catcher',]LOGGING={'version':1,'handlers':{'error_catcher':{'level':'ERROR','class':'except_catcher.handlers.CatchExceptionHandler',},},'loggers':{'django.request':{'handlers':['error_catcher'],'level':'ERROR','propagate':False,},}}run migrations:./manage.pymigrateexcept_catcherYou can purposely throw an exception in the url (must be superuser):http://localhost:8000/test-exception/Now go to url:http://localhost:8000/errors/Only the superuser have access to these reports.
Package: django-exception
Installation$pipinstalldjango-exceptionsettings.pyINSTALLED_APPS+=['django_exception']migrate$pythonmanage.pymigrateModels/tablesmodeltablecolumns/fieldsExceptionModeldjango_exceptionid,module,filename,lineno,exc_class,exc_message,exc_traceback,timestampExamplessettings.pyLOGGING={"version":1,"handlers":{"console":{"level":"DEBUG","class":"logging.StreamHandler",},"django_exception":{"level":"ERROR","class":"django_exception.ExceptionLogHandler",}},"root":{"handlers":["console","django_exception"],"level":"DEBUG",},"loggers":{"django_exception":{"level":"ERROR","handlers":["django_exception"],"propagate":True,},},}MIDDLEWARE=["django_exception.middleware.ExceptionMiddleware",]sys.excepthook- log all exceptionsimportsysimportdjango_exceptiondefexcepthook(exc_type,exc_message,tb):django_exception.excepthook(exc_type,exc_message,tb)raiseexc_type(exc_message)sys.excepthook=excepthook
Package: django-exception-blame
django-exception-blame======================A django middleware for exception blaming## OverviewBasically it looks in the exception traceback and search for the line number of the first file of your reopsitory that raised the exception. It uses git to blame the author of that file and line number, then adds the info to the request metadata with key `BLAMED_DEVELOPER`.Only for use with `DEBUG=True`## InstallationInstall using `pip`pip install django-exception-blame## ConfigurationAdd the following to your `settings.py` module:Add the middleware to your `MIDDLEWARE_CLASSES` settingMIDDLEWARE_CLASSES = [...'exceptionblame.middleware.ExceptionBlameMiddleware',]Configure the repository root.EXCEPTION_BLAME = {'REPO_DIR': '/your/repository/dir'}## LicenseThis project is licensed under the MIT License - see the `LICENSE` file for details
Package: django-exchange
Currency, exchange rate and conversions support for django projects.Installdjango-exchangeis available on pypi repositories so youre free to usepiporeasy_install:$ pip install django-exchangeOr you might want to install from source:$ wget https://github.com/metglobal/django-exchange/archive/django-exchange-xxx.zip
$ unzip django-exchange-xxx.zip
$ cd django-exchange-xxx
$ python setup.py installAddexchangeinto yourINSTALLED_APPSsettings of your django project:INSTALLED_APPS += [
    'exchange',
]Don’t forget to sync your db to create corresponding database tables:$ python manage.py syncdbPopulating Datadjango-exchange supports populating currency and exchange rates using a service provider
automatically. Currently it has built in support for openexchangerates.org service. It is
only a matter of supplying an api key obtained fromhttp://openexchangerates.orgas django
settings using the keyOPENEXCHANGERATES_API_KEY:OPENEXCHANGERATES_API_KEY = '<YOU_API_KEY_HERE>'Now you can populate you currency and exchange rates magically by typing:$ python manage.py update_ratesQuickstartCurrency conversions is dead easy. There are auxilaray methods helps you calculate
conversions using populated exchange rates underexchange.conversionsmodule.Take a look at the example below:>>> from exchange.conversion import Price, convert
>>> my_price = Price(50, 'USD')
>>> convert(my_price, 'EUR')
<Price(value=Decimal('36.68585000'), currency='EUR')>DocumentationComing soon…TodoConvenient template tagsDjango price field implementation supporting currency conversionsEasier api with convenient refaactoringsA few more builtin exchange rate provider
Package: django-exchange-docs
A Django wrapper for Boundless Exchange Documentation.InstallationInstall the latest stable version from PIP:pip installdjango-exchange-docsDownload django-exchange-docs and install it directly from source:python setup.py installProject ConfigurationOnce installed you can configure your project to use
django-exchange-docs with the following steps.Addexchange-docstoINSTALLED_APPSin your project’ssettingsmodule:INSTALLED_APPS = (
    'exchange-docs',
    # other apps
)
Package: django-exchange-maploom
django-exchange-maploom==============This is a fork of GeoSHAPE Maploom to use with Exchange before changes are added upstream to GeoSHAPE.A Django wrapper for [MapLoom](https://github.com/boundlessgeo/MapLoom).Installation------------Install the latest stable version from PIP:```pip install django-exchange-maploom```Download django-maploom and install it directly from source:```python setup.py install```Project Configuration---------------------Once installed you can configure your project to usedjango-maploom with the following steps.Add ``maploom`` to ``INSTALLED_APPS`` in your project's``settings`` module:INSTALLED_APPS = ('maploom',# other apps)Usage-----Once installed, you can easily add maploom to any template on your site.First load the template tags in your template:{% load maploom_tags %}In the ```<head>``` section of your html section add the MapLoom js files:{% maploom_js %}Then add a map loom map to your page by placing the following tag anywhere in the ```<body>``` tags:{% maploom_html %}Adding in GeoNode-----------------To use MapLoom as your GeoNode map client, follow the Project Configuration steps above.  Next, add the MapLoom urlsto the bottom of the `urls.py` file in GeoNode and append them to the GeoNode url patterns.```from maploom.geonode.urls import urlpatterns as maploom_urlsurlpatterns += maploom_urls```**Note:** When adding `maploom` to the `INSTALLED_APPS` setting, order matters.  Django will return the first templateit finds that matches a given name, therefore be sure that the MapLoom application precedes the `geonode.maps`application in your `INSTALLED_APPS` setting.