Saravanan666/pypi-org huggingface dataset:
Package: django-i18nurls
This Django app makes it possible to prefix URL patterns with the active
language and to make URL patterns translatable by using gettext. As well this
package contains a middleware which is able to activate the right language
(based on the language-prefix in the requested URL).NoteDuring the DjangoCon EU 2011 sprints, I wrote a patch for including this
functionality into the Django core. This patch was accepted and will be
included in Django 1.4 (thanks to Jannis Leidel and Russell Keith-Magee for
their feedback and reviewing the patch).Django documentation:Internationalization: in URL patterns.Translating URL patternsAfter installing this package, URL patterns can also be marked translatable
using theugettext_lazy()function. Example:from django.conf.urls.defaults import patterns, include, url
from django.utils.translation import ugettext_lazy as _
from i18nurls.i18n import i18n_patterns

urlpatterns = patterns(''
    url(r'^sitemap\.xml$', 'sitemap.view', name='sitemap_xml'),
)

news_patterns = patterns(''
    url(r'^$', 'news.views.index', name='index'),
    url(_(r'^category/(?P<slug>[\w-]+)/$'), 'news.views.category', name='category'),
    url(r'^(?P<slug>[\w-]+)/$', 'news.views.details', name='detail'),
)

urlpatterns += i18n_patterns('',
    url(_(r'^about/$'), 'about.view', name='about'),
    url(_(r'^news/$'), include(news_patterns, namespace='news')),
)After you’ve created the translations, thereverse()function will return
the URL in the active language. Example:from django.core.urlresolvers import reverse
from django.utils.translation import activate

>>> activate('en')
>>> reverse('news:category', kwargs={'slug': 'recent'})
'/en/news/category/recent/'

>>> activate('nl')
>>> reverse('news:category', kwargs={'slug': 'recent'})
'/nl/nieuws/categorie/recent/'Reversing in templatesIf localized URLs get reversed in templates they always use the current
language. To link to a URL in another language use thelanguagetemplate
tag. It enables the given language in the enclosed template section:{% load i18nurls i18n %}

{% get_available_languages as languages %}

{% trans "View this category in:" %}
    {% for lang_code, lang_name in languages %}
        {% language lang_code %}
            <a href="{% url category slug=category.slug %}">{{ lang_name }}</a>
        {% endlanguage %}
{% endfor %}See also:Reversing in templates.InstallationInstall thedjango-i18nurlspackage (eg:pip installdjango-i18nurls).Addi18nurlsto yoursettings.INSTALLED_APPS.Addi18nurls.middleware.LocaleMiddlewareto yoursettings.MIDDLEWARE_CLASSES(make sure it comes before theCommonMiddleware).Changelogv0.7{% language %}template-tag implemented (thanks to Harro van der Klauw).LocaleMiddlewareclass is not patched anymore (Issue #3).i18n_patternsis not patched anymore.Trailing slash is now optional inLocaleMiddlewareregex.v0.6.1templates and locale folder added to setup.py script (Issue #1).v0.6API changed so it will match withi18n_patternsin upcoming Django 1.4 release.v0.5.2Some README errors corrected.v0.5.1Some code cleanup.v0.5Initial release.
Package: django-i18n-utils
Data Processingclean_unicodeutils.clean_unicodeaccepts an input string and returns
normalized UnicodeUnicodeNormalizerMixinModel mixin class which ensures that every text field has been processed withclean_unicodeduring model validation’sclean_fieldsstepTestingTranslationSafeTestClientDjangoTestClientsubclass which resets the active translation after each request to avoid leaking
translation state across tests, causing hard-to-debug side-effects like loading fixtures in the wrong
language usingdjango-modeltranslation.Usage:from django_i18n_utils.testclients import TranslationSafeTestClient

class MyTestCase(TestCase):
    client_class = TranslationSafeTestClient

    def test_foo(self):
        # default language active
        self.client.get('/pt/myview') # Portuguese active when the view executes
        # default language active againTranslationSafeTestCaseDjangoTestCasesubclass which usesTranslationSafeTestClientto avoid test failures caused by previous
tests leaving an unexpected locale active.Usage:from django_i18n_utils.testcases import TranslationSafeTestCase

class MyTestCase(TranslationSafeTestCase):
    …LocalizedTestCaseDjangoTestCasesubclass which makes it easy to create per-language tests
without duplication or for-loops:class MyLocalizedTests(LocalizedTestCase):
    def test_homepage(self):
        …will execute and display as if you had really created this:class MyLocalizedTests(LocalizedTestCase):
    def test_homepage_en(self):
        … # test English
    def test_homepage_es(self):
        … # test Spanish
Package: django-iadmin
iAdmin is a replacement of standard django admin application.Featurestabbed view of inlinesmass updates functionalityexport to csv with options and formattinglink to foreignkey edit page from changelist (list_display_rel_links)filter by cell values (cell_filters)info page with packages, installed apps version, database infoPlease read online documentation athttp://readthedocs.org/docs/django-iadmin/en/latest/Project linksProject home page:https://github.com/saxix/django-iadminDocumentation:http://django-iadmin.readthedocs.org/en/latest/Isssue tracker:https://github.com/saxix/django-iadmin/issues?sortDownload:http://pypi.python.org/pypi/django-iadmin/InstallationRead installation instruction athttp://readthedocs.org/docs/django-iadmin/en/latest/install/
Package: django-iamport
Django-IamportIamport Application for Django장고용 아임포트 포팅 입니다. 아직 카드 결제만 동작 확인 되었습니다.Install1. pip install django-iamport2. setting.py 수정INSTALLED_APPS=[...'payment.apps.PaymentConfig',...PAYMENT_MERCHANT_ID='아임포트에서 발급받은 상점 ID'PAYMENT_REST_KEY='아임포트에서 발급 받은 REST KEY'PAYMENT_REST_SECRET='아임포트에서 발급 받은 REST SECRET'PAYMENT_MODEL='shop.OrderPayment'# Payment를 상속 받은 주문 모델# 아임포트 전달 파라메터(그대로 아임포트 모듈에 전달 됩니다)# IMP.request_pay() 파라메터 :PAYMENT_CONFIG={'company':'우리 회사',# PG표기 회사명'pg':'html5_inicis',# PG 종류 (아임포트 설정)'pay_method':'card'# 결제 방법}파라메터는IMP.request_pay()
파라메터참조)3. URL 선언 포함하기루트 urls.py 상에 다음 라인 포함urlpatterns=[...path('payment/',include('payment.urls')),...]4. Payment 모델 상속하기Payment 모델을 상속 받아서 실제로 사용할 결제 정보 모델을 만들어야
됩니다. Payment는 다음과 같이 추상 모델로 선언 되어 있습니다.classPayment(models.Model):classMeta:abstract=Truedef__str__(self):return"%s-%s%s-"%(self.buyer_name,self.amount,self.name)name=models.CharField('주문명',max_length=100)...중간생략...card_id=models.CharField('카드승인번호',max_length=50,null=True,blank=True)receipt_url=models.URLField('영수증 URL',null=True,blank=True)@staticmethoddeffrom_order(order,pay_type):raiseNotImplementedError()defon_success(self):raiseNotImplementedError()Payment 추상 모델을 상속 받은 다음 필요한 필드들을 추가해서 사용자
모델을 만듭니다.Payment를 상속받은 예제classOrderPayment(Payment):classMeta:verbose_name="제품 결제"verbose_name_plural="제품 결제 목록"order=models.ForeignKey(Apply,on_delete=models.SET_NULL,null=True,related_name='payments')@staticmethoddeffrom_order(order):payment=OrderPayment()payment.name='우리상점 :%s%s'%order.namepayment.order=orderpayment.amount=order.roomtype.pricepayment.buyer_email=order.emailpayment.buyer_name=order.namepayment.buyer_tel=order.cellpayment.buyer_addr=order.addr+" "+order.subaddrpayment.buyer_postcode=order.postcodepayment.save()# ID 생성하기ifsettings.DEBUG:prefix="myshop_debug"else:prefix="myshop"now=timezone.localtime(timezone.now())now=now.strftime('%Y%m%d_%H%M%S')payment.uid="%s_%s_%s"%(prefix,now,payment.pk)payment.save()returnpayment# 결제 완료 후처리 하기(완료 시 호출 됩니다)defon_success(self):self.order.pay_status='confirmed'self.order.save()# 결제 재시도 URLdefget_retry_url(self):returnreverse('myshop:retry_order',args=[self.order.pk])# 결제 후 이동 할 Home URLdefget_home_url(self):return'/'5. 결제 시작하기상속받은 모델(여기선 OrderPayment)의 인스턴스를 생성, 저장한 후 해당
pk를 args로 ‘payment:pay’ 뷰를 호출하면 결제 프로세스가 진행 됩니다.ex:def pay_start(request):
    payment = OrderPayment.from_order(order_info)
    return HttpResponseRedirect(reverse('payment:pay', args=[payment.pk]))6. Template 사용자화 하기모든 뷰 템플릿은 templates/site_base.html 를 상속 합니다.
site_base.html를 Override해서 사용자 템플릿을 선언하시면 됩니다.주의 : 서브 템플릿들은 jQuery가 site_base.html 상에 포함된것으로
간주합니다.TODO[STRIKEOUT:REST prepare call][STRIKEOUT:card]notificationvbank후처리 실패시 처리다중 PG 지원다중 결제 모델 지원
Package: django-iapauth
Django authentication middleware and backend for GCP IAPinstall:$ pip install django-iapauthAddiapauthto yourINSTALLED_APPS.Addiapauth.middleware.IAPJWTAuthMiddlewareto yourMIDDLEWAREAddiapauth.backends.IAPJWTUserBackendto yourAUTHENTICATION_BACKENDS.TODO: explain how it works, how to debug, etc.
Package: django-iban
WarningObsolete packageYou should not use this package any longer. The IBAN and BIC fields are now
available in version 1.1 and later of thehttps://pypi.python.org/pypi/django-localflavorpackage.
Bug reports and feature requests should be filed againsthttps://github.com/django/django-localflavor.The IBAN and BIC fields in django-localflavor have bugs fixes that are not included in this package.
Please migrate existing code to the IBAN and BIC fields in thedjango-localflavor generic package.Migrating Model Fields to django-localflavorAddlocalflavorto yourINSTALLED_APPSand then change the model fieldsIBANFieldand``SWIFTBICField`` to the versions from django-localflavor.For example, the django-iban model fields should be changed from this:from django_iban.fields import IBANField, SWIFTBICField

class CustomerModel(models.Model):
    iban = IBANField()
    bic = SWIFTBICField()to the django-localflavor model field versions:from localflavor.generic.models import IBANField, BICField

class CustomerModel(models.Model):
    iban = IBANField()
    bic = BICField()For Django < 1.7, you will need to use South to migrate your database. Useschemamigrationto create a migration and then runmigratealter your database. For example:% ./manage.py schemamigration myapp --auto convert_django_iban_to_django_localflavor
 ~ Changed field iban on myapp.CustomerModel
 ~ Changed field bic on myapp.CustomerModel
Created 0002_convert_django_iban_to_django_localflavor.py. You can now apply this migration with: ./manage.py migrate myapp

% ./manage.py migrate myapp
Running migrations for myapp:
 - Migrating forwards to 0002_convert_django_iban_to_django_localflavor.
 > myapp:0002_convert_django_iban_to_django_localflavor
 - Loading initial data for myapp.
Installed 0 object(s) from 0 fixture(s)For Django >= 1.7, runmakemigrationsto create a migration and then runmigratealter
your database. For example:% ./manage.py makemigrations myapp
Migrations for 'myapp':
  0002_auto_20150210_1004.py:
    - Alter field bic on customermodel
    - Alter field iban on customermodel

% ./manage.py migrate myapp
Operations to perform:
  Apply all migrations: myapp
Running migrations:
  Applying myapp.0002_auto_20150210_1004... OKMigrating Form Fields to django-localflavorChange the form fieldsIBANFormFieldandSWIFTBICFormFieldto the versions from django-localflavor.For example, the django-iban form fields should be changed from this:from django_iban.forms import IBANFormField, SWIFTBICFormField

class CustomerForm(forms.Form):
    iban = IBANFormField()
    swift_bic = SWIFTBICFormField()to the django-localflavor form field versions:from localflavor.generic.forms import IBANFormField, BICFormField

class CustomerForm(forms.Form):
    iban = IBANFormField()
    bic = BICFormField()
Package: django-ibanfield
Django IBAN FieldIBANField is an extension for django CharField with special validation for IBAN accounts.InstallYou can install django-ibanfield with pip as usual o pipenv$>pipinstalldjango-ibanfield$>pipenvinstalldjango-ibanfieldUsageUse IBANField on your models, like any other django models fields.fromdjango_ibanfield.fieldsimportIBANFieldclassMyModel(models.Model):account=IBANField()
Package: django-iban-field
Django iban field with validators and optional postgresql in base constraint checking. This is
expected to work with django 1.8 and later.InstallationInstalldjango-iban-fieldlike you would install any other pypi package:pip install django-iban-fieldConfiguration and usageadddjango_ibanto the list ofINSTALLED_APPSin yoursettings.pyuse inmodels.py:from django_iban.fields import IBANField

...

class MyModel(models.Model):
    iban = IBANField(enforce_database_constraint=True, unique=True)Theenable_databse_constraintoption will add a function named is_valid_iban to your database and
use it the enforce the database type checking. This option will have an effect only if you are using
the postgreql backend and have theplpythonextension enabled on your database.UtilitiesOther than the django field, you will find a generator class to use if you want to generate valid
IBAN values:from django_iban.generator import IBANGenerator

....
generator = IBANGenerator()
# A complete random IBAN
valid_iban = generator.generate()
# But you can specify the country
valid_iban = generator.generate(country_code='DE')
# Or the bank and account
valid_iban = generator.generate(country_code='DE', bank=XXXX, account=XXXX)You cannot of course just pass the bank and the account without the country, and if you pass one
or both of these values will then check for their validity, compute the checksum and return the
valid IBAN.You may also be intereseted in the IBANSpecification class that contains all the format specification
and the checksum facility:from django_iban.specification import IBANSpecification
from django_iban.specification import IBAN_SPECIFICATION_CONFIG

....
country_specification = IBAN_SPECIFICATION_CONFIG['TN']
print(country_specification.bank_field_length)
# 5
print(country_specification.bank_regex)
#[0-9]{2}[0-9]{3}
print(country_specification.iban_regex)
#[A-Z]{2}[0-9]{2}[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}InspirationThis module take it’s inspiration and some of the ideas from thedjango-localflavorIBanField and the specification fromtom’s cafeExampleYou can find a running example of this field in thisdemo django application, and if you are super lazy
you can just get myvagrant bootstraper scriptthat will setup a full working vm using that project. You
just have to have vagrant and openssl installed (tested on Fedora but should work with any other modern linux
or mac):curl https://raw.githubusercontent.com/Chedi/DjangoVagrantBootsraper/master/bootstrap.sh | bash
Package: django-ibantools
# Django IBAN ToolsDjango Iban Tools ist eine App zum verifizieren von IBAN und BIC Daten, sowie generierenvon IBAN Nummern aus alten Bankleitzahlen und Kontonummern## Quick start1. Add "ibantools" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'ibantools',]2. Run `python manage.py migrate` to create the bank models.3. Import official bank csvCommand:./manage.py import_bundesbank_bankleitzahlen ~/Downloads/blz_2015_09_07_txt.txtResources:- http://www.bundesbank.de/Navigation/DE/Aufgaben/Unbarer_Zahlungsverkehr/Serviceangebot/Bankleitzahlen/bankleitzahlen.html- http://www.bundesbank.de/Redaktion/DE/Downloads/Aufgaben/Unbarer_Zahlungsverkehr/Bankleitzahlen/2016_03_06/blz_2015_12_07_txt.txt?__blob=publicationFile## Developer Hints- python setup.py sdist- django-admin makemessages --ignore .virtualenv --ignore fixtures -a --no-location
Package: django-icase
A few tools for helping with case-insensitvity in Django URLs.404 handler that redirects non-matched, non-lowercase URLs. E.g. if/About/is not matched, the handler will redirect to/about/before returning a 404Middleware that enforces lower-cased URLs. E.g. all non-lowercased URLs will
be redirected to their lowercased form.OverviewIf you only need to match URL patterns, then it’s simple to add
case-insensitivity to your regular expressions.:urlpatterns = patterns('',
    (r'^(?i)admin/(.*)', admin.site.root),
    (r'^(?i)static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.STATIC_DOC_ROOT, 'show_indexes': True}),
    (r'^(?i)login/$', 'django.contrib.auth.views.login'),
    (r'^(?i)logout/$', do_logout),
)From Alex Martelli’sStack Overflow explanation.However this doesn’t do anything to match slugs, which are often case-sensitive
matched by default - it’s up to the app. If the app uses a straightforward=expression, e.g.:object = MyModel.objects.get(slug=slug)ThenMySlugwon’t matchmyslug.There are also instances where you want to enforce URL casing for other reasons
(or a client does!).InstallationInstall django-icase:pip install django-icaseTo use the custom 404 handler, simply specify this in your projecturls.pyconfiguration.:handler404 = 'icase.views.icase_404_handler'To use the lowercasing middleware, add it to yourINSTALLED_MIDDLEWARE.:INSTALLED_MIDDLEWARE = (
    'icase.middleware.LowerCased',
    ...
)Django & Python supportActively supported versions of Django are supported by this app,
although there is little reason it should not work on others.Tested against Python 3 and Python 2.7.9.History0.1.1 (2015-05-06)Update django-nose reference to support Django 1.7+0.1.0 (2015-03-25)First release on PyPI.
Package: django-icecat
django-icecat=============Django Icecat integrationDocumentation=============Be sure to checkout the official [IceCat documentation](https://nl.icecat.biz/forum.cgi?post=3331) before you start with importing any of the data.Installation============Install the package, and add it to your applications:```pythonINSTALLED_APPS = (...'icecat',...)```Add your login credentials in settings.py```python# Required:ICECAT_API_USERNAME = 'xyz'ICECAT_API_PASSWORD = 'foobar'# Optional:ICECAT_API_LANGUAGE = 1  # The language you want to import, defaults to 1 (EN), NL = 2, See [LanguageList.xml](https://data.icecat.biz/export/level4/refs/LanguageList.xml.gz) for other languagesICECAT_TMP_PATH = '/tmp'  # The path where the xml files will be stored for faster access.```Be sure to run the migrations:```bash$ ./application/manage.py migrate icecat```And you can run the commands:```bash$ ./application/manage.py import_categories$ ./application/manage.py import_suppliers$ ./application/manage.py import_products [path to index or daily delta]```If you want to import all the products, it is advised to first import the categories and suppliers. Also: be sure to save up on Starbucks coupons, as a total product import can take quite a while.TODO====Lots :)Requirements============South, lxml, ElementTree, Requests
Package: django-icekit
GLAMkit is a next-generation Python CMS bythe Interaction
Consortium, designed especially for
the cultural sector.ICEkit sits one layer below GLAMkit, and is a framework for building CMSes.
It has publishing and workflow tools for teams of content professionals,
and a powerful content framework, based on django-fluent. Everything is written
in Python, using the Django framework.Read the documentation for the latest releaseKey featuresICEkit has:Patterns for hierarchical pages and collections of rich content models.Advanced publishing / preview / unpublishing controlsSimple workflow controlsContent plugins for working with rich text, images, embedded media, etc.Customisable site search using Elastic Searchdjango-reversioncompatible, allowing versioning of contentCustomisable admin dashboardDocker-compatible project template suppliedBatteries included: bower, LessCSS, BootstrapEasily extensible with models, templates, plugins, etc.GLAMkit extends ICEkit with:complex repeating calendared eventscollection patterns: art, moving image, etc.a story-telling engine (e.g. rich ‘watch’, ‘read’, ‘listen’ articles)press releasessponsorsGLAMkit is delivered as a Docker-compatible package, which means that it’s easy
to share a consistent development environment across your team, or to deploy on
any Docker-compatible web host, including top-tier cloud hosting services like
AWS.Quickstart, with DockerThe recommended installation method uses Docker.
Docker works on OS X, Linux, and Windows, takes care of all the project
dependencies (e.g. database, search engine, web server, etc.), and makesdeploymenteasy.If you’re not ready to use Docker, seeManual Installation.Otherwise, if you haven’t already,install Docker.1. Create a new project$ bash <(curl -Ls https://raw.githubusercontent.com/ic-labs/django-icekit/master/startproject.sh) {project_name}This will create a new project from the ICEkit project template, in a
directory named{project_name}in the current working directory.If you want to create a new project from the ICEkitdevelopbranch, do this
instead:$ bash <(curl -Ls https://raw.githubusercontent.com/ic-labs/django-icekit/develop/startproject.sh) {project_name} developand change the icekit branch in the generatedrequirements-icekit.txtfrom@masterto@develop.NOTE: Windows users should run this command in Git Bash, which comes
withGit for Windows.2. Run the projectBuild a Docker image:$ cd {project_name}
$ docker-compose build --pullRun adjangocontainer and all of its dependancies:$ docker-compose run --rm --service-ports djangoCreate a superuser account:# manage.py createsuperuserRun the Django dev server:# runserver.sh3. That’s it!Open the site in a browser:http://localhost:8000When you’re done, exit the container and stop all of its dependencies:# exit
$ docker-compose stopNext stepsStart building your siteArchitectural overviewRead the Documentation
Package: django-icelandic-addresses
Django app containing a list of Icelandic addressesGetting ItYou can get django-icelandic-addresses by using pip or easy_install:$ pip install django-icelandic-addresses
or
$ easy_install django-icelandic-addressesInstalling ItTo enableice_addressesin your project you need to add it toINSTALLED_APPSin your projectssettings.pyfile:INSTALLED_APPS = (
    ...
    'ice_addresses',
    ...
)Using ItImport data from staðfangaskrá:$ python manage.py import_ice_addressesAnd in code:from ice_addresses.models import Address, Street

laugavegur_1 = Address.objects.filter(
    street=Street.objects \
        .filter(name_nominative='Laugavegur') \
        .filter(postcode__id=101),
    house_number=1)TODOAddress form
Package: django-ichypd
django-ichypdI can has your personal details?django-ichypdis a simple django app
that will allows you to show a form for a custom model that you provide and
saves data into this model. After that a confirmation is shown. It also ships
with some helpers for extracting this information as CSV to import it in your
favourite CRM system or newsletter app.ichypdis pronounced likeegypt.Usagedjango-ichypdis in active development and still very young. Documentation
will follow if it proofs useful.Changlog0.2.1Fixing packaging issue - sdist package didn’t include the templates off the app.0.2.0Adding link to change list linking to csv export.0.1.0Initial release