Saravanan666/pypi-org huggingface dataset:
Package: django-createdb
Django CreateDBThis is a library that allows you to create databases based on settings.py DATABASES configurations.Currently supported databases are:sqlite3postgresqlmysqlit is equivalent to sequelize'ssequelize-cli db:createInstallationpipinstalldjango-createdbUsageAdd INSTALLED_APPS in settings.pyINSTALLED_APPS=[...createdb...]DATABASES={"default":{"ENGINE":"django.db.backends.sqlite3","NAME":BASE_DIR/"db.sqlite3",},"postgresql":{"ENGINE":"django.db.backends.postgresql","NAME":env("POSTGRESQL_NAME"),"HOST":env("POSTGRESQL_HOST"),"USER":env("POSTGRESQL_USER"),"PASSWORD":env("POSTGRESQL_PASSWORD"),},"mysql":{"ENGINE":"django.db.backends.mysql","NAME":env("MYSQL_NAME"),"HOST":env("MYSQL_HOST"),"USER":env("MYSQL_USER"),"PASSWORD":env("MYSQL_PASSWORD"),"PORT":3306,},}python manage.py createdbThis will create a database based on the "default" database settingsYou can specify which configuration to use by providing the--dbargumentpython manage.py createdb --db postgresql
Package: django-create-fake-model-object
Django Create Fake Model Object is a Django app to make random fake data
It also creates Foreign objects and M2M objects!Quick StartAdd “create_fake_model_object” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...,
    'create_fake_model_object',
]If you want to create a new model object use the following command to create.:python manage.py createrandom (appname) (Modelname) (option -n createnumber)

# Example
python manage.py createrandom book Book -n 7ExtraManyToManyField: If you want to create a new model objects with M2M Field! M2M Field Must beblank=True
Package: django-create-react-app
django-create-react-appThis app helps us to integrate the react in django project through create react app template. This app works both in dev and production mode of the react.Why django-create-react-appworks with the asset-manifest plugin on the frontend which is used/maintained by create react appNo Frontend code modification needed for SPADev Mode works with frontend server through http (localhost:3000)Quick startInstallpip install django-create-react-appAdd "create_react_app" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
        ...
        'create_react_app',
    ]Settings ConfigurationAdd Build Directory in the Settingsyarn build or npm run buildThis command creates the build directory inside the react app folder.REACT_BUILD_DIRECTORY = os.path.join(BASE_DIR, 'app', 'react', 'build')
This is the path in which build is createdAdd Below code for Collectstatic Finder to find the build folder ::Build Directory created django needs to treat it static directory
STATICFILES_DIRS = (
    os.path.join(REACT_BUILD_DIRECTORY, 'static'),
)Add create react app configuration into your settings::CREATE_REACT_APP = {
        'DEFAULT': {
            'BUNDLE_DIR_NAME': REACT_BUILD_DIRECTORY,  
            'FRONT_END_SERVER': "http://localhost:3000/",
            'IS_DEV': False,
        }
    }Use it in your templates ::{% load react_bundle_loader %}

<html>
  <head>
    {% render_bundle_css  %}
  </head>
  <body>
    ....
     {% render_bundle_js %}
  </body>
</head>#Adding Multiple React Apps inside django ProjectCREATE_REACT_APP = {
    'DEFAULT': {
        'BUNDLE_DIR_NAME': REACT_BUILD,
        'FRONT_END_SERVER': "http://localhost:3000/",
        'IS_DEV': False,
        "PUBLIC_PATH_DEV": "http://localhost:3000/",
        "PUBLIC_PATH": "/static/"
    }
    'ADMIN': {
        'BUNDLE_DIR_NAME': REACT_BUILD,
        'FRONT_END_SERVER': "http://localhost:3000/",
        'IS_DEV': False,
    },
}is_dev: Truemake sure react app is running on FRONT_END_SERVER on same port which is declaredis_dev: Falsemake sure build path is pointed to the right build directoryRendering react admin app inside templates ::{% load react_bundle_loader %}

<html>
  <head>
    {% render_bundle_css "ADMIN" %}
  </head>
  <body>
    <div id="root"></div>
     {% render_bundle_js "ADMIN" %}
  </body>
</head>Using Preloading ::The is_preload=True option in the render_bundle_css or render_bundle_js template tag can be used to add rel="preload" link tags.{% render_bundle_css is_preload=True %}Add attributesadd some extra attributes to the tag{% render_bundle_js  attrib="async" %}

{% render_bundle_js  attrib="disabled" %}migration from 0.8.4 to 0.9"is_dev" changed to "IS_DEV"
is_dev in lowercase will not workdocker supportPUBLIC_PATH_DEV default value will be FRONT_END_SERVER, which will be used for incase of dockerPUBLIC_PATH_DEV will be used in case of docker tohttp://localhost:3000/FRONT_END_SERVER: host.docker.internaldjango storage supportchange PUBLIC_PATH to storagepath e.gPUBLIC_PATH:"https://234234234.aws.com/static/"
Package: django-createsuperuser
Installation$[sudo]pipinstalldjango-createsuperuserExamplesexample#1 - management command:settings.pyINSTALLED_APPS+=["django_createsuperuser"]$pythonmanage.pycreatesuperuser--usernameadmin--passwordadmin
$pythonmanage.pycreatesuperuser--usernameadmin--passwordadmin--emailfoo@foo.fooexample#2 - python module cli:$exportDJANGO_SETTINGS_MODULE=settings
$python-mdjango_createsuperuser"username""password"$python-mdjango_createsuperuser"username""password"foo@foo.fooreadme42.com
Package: django-createsuperuser-signal
django-createsuperuserDjango app that implements a signal to create super user from environment
variables on migration. Useful for Docker, Kubernetes etc. If the user already
exists it will do nothing.InstallationSimply download from Pypi:pipinstalldjango_superuserUsageThis app needs to register in theINSTALLED_APPSlist in your Django settings:INSTALLED_APPS=[..."createsuperuser",...]As it is, it will do nothing. You need to define 4 environment variables through
which the superuser will be created during the migration stage (uses the
post_migrate signal).Environment VariableDescriptionDJANGO_SUPERUSER_CREATEEnables the process of creating the superuser. Must be true or false (case insensitive)DJANGO_SUPERUSER_USERNAMEThe username of the superuser account to createDJANGO_SUPERUSER_EMAILThe email of the superuser accountDJANGO_SUPERUSER_PASSWORDThe password of the superuser accountAfter defining these variables, the superuser will be created the next time you
perform a migration (even if no migrations are applied)exportDJANGO_SUPERUSER_CREATE=trueexportDJANGO_SUPERUSER_USERNAME=adminexportDJANGO_SUPERUSER_EMAIL=admin@example.comexportDJANGO_SUPERUSER_PASSWORD=admin
pythonmanage.pymigrateYou can use this to create the user when launching your django project in Docker
by passing the variables in the command. Or if you are using Kuberenetes you can
add them in aSecretand pass them in the pod viaenvFrom. Or however the
environment variables fit in your workflow.
Package: django-createsuperuserwithpassword
django-createsuperuserwithpassword… provides a Django management command to create ready-to-login super
users during development.How to Use1. InstallInstall the pip package locally or globally:pipinstall[--user]django-createsuperuserwithpassword2. ActivateEnable the Django management command by extending your Django project
settings:INSTALLED_APPS+=("django_createsuperuserwithpassword",)3. ApplyCall the command — e.g. from within a container entrypoint script — like
this:pythonmanage.pycreatesuperuserwithpassword\--usernameadmin\--passwordadmin\--emailadmin@example.org\--preserveDevelopmentIf you want to help fix a bug, an easy way to spin up a development
environment is:gitclonehttps://github.com/hartwork/django-createsuperuserwithpasswordcddjango-createsuperuserwithpassworddocker-composeup--buildAuthorsdjango-createsuperuserwithpasswordis based on code byAdam
Charnocklicensed underthe MIT licensethat started out atadamcharnock/swiftwind-heroku.Sebastian Pippingadded and fixed a few things, on top.
Package: django-createuser
django-createuserdjango-createuseris a package that allows to create users for Django
application with./manage.pycommand.InstallationInstall withpiporpipenv:pipinstalldjango-createuserAdddjango_createuserto your installed apps in your
settings.py file:INSTALLED_APPS=['django_createuser',...]CommandscreateuserUsed to create a user.positional arguments:usernameLogin; requiredoptional arguments:-h,--helpshow this help message and exit--emailEMAILEmail; required--first_nameFIRST_NAMEFirst name; optional--last_nameLAST_NAMELast name; optional--passwordPASSWORDPassword; optional--is-staffStaff status; optional, default is False--is-superuserSuperuser status; optional, default is False-gGROUPS,--groupsGROUPSList of user’s groups; optional, comma is a separator--databaseDATABASESpecifies the database to use; optional, default is"default"--versionshow program’s version number and exit-vLEVEL,--verbosityLEVELVerbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output--settingsSETTINGSThe Python path to a settings module, e.g."myproject.settings.main". If this isn’t provided,
theDJANGO_SETTINGS_MODULEenvironment variable
will be used.--pythonpathPYTHONPATHA directory to add to the Python path, e.g."/home/djangoprojects/myproject".--tracebackRaise onCommandErrorexceptions--no-colorDon’t colorize the command output.--force-colorForce colorization of the command output.DocumentationSeehttp://django-createuser.readthedocs.org/LicenseCopyright © 2019, Piotr RoszatyckiThis software is distributed under the GNU Lesser General Public License (LGPL
3 or greater).
Package: django-credit-cards
django-credit-cardsA Django app providing database and form fields for credit cards.Compatibilitydjango>= 1.8python>= 3QuickstartInstall django-credit-cards:pipinstalldjango-credit-cardsThen add it to your models:fromcreditcards.modelsimportCardNumberField,CardExpiryField,SecurityCodeFieldclassPayment(models.Model):cc_number=CardNumberField(_('card number'))cc_expiry=CardExpiryField(_('expiration date'))cc_code=SecurityCodeField(_('security code'))Or to your forms:fromcreditcards.formsimportCardNumberField,CardExpiryField,SecurityCodeFieldclassPaymentForm(forms.Form):cc_number=CardNumberField(label='Card Number')cc_expiry=CardExpiryField(label='Expiration Date')cc_code=SecurityCodeField(label='CVV/CVC')Credit Card Type Detectionfromcreditcardsimporttypesasserttypes.get_type('4444333322221111')==types.CC_TYPE_VISAasserttypes.get_type('343434343434343')==types.CC_TYPE_AMEXasserttypes.get_type('0000000000000000')==types.CC_TYPE_GENERICLicenseCopyright (c) 2018 Mihail Mishakin Released under the BSD license (see LICENSE)
Package: django-crequest
ContentsOverviewInstallingSupported Python versionsHow to useIn depth & Complex detailsOverviewcrequesttakes care of currentrequestin silent way.crequestwill bring you currentrequestobject of your Django application from anywhere in your code.Installingdjango-crequestis available onhttp://pypi.python.org/pypi/django-crequestSo it can be installed it by pip:$ python pip install django-crequestOr you can grab the latest version tarball and$ python setup.py installTo enabledjango-crequestin your projectAddcrequesttoINSTALLED_APPSin yoursettings.pyAddcrequest.middleware.CrequestMiddlewaretoMIDDLEWARE_CLASSESafter the authentication and session middleware.Supported Python versionsdjango-crequestcurrently can be run on multiple python versions:Python 2Python 3PyPyHow to useFirst import the crequest’s middleware:from crequest.middleware import CrequestMiddlewareGet the currentrequest;):current_request = CrequestMiddleware.get_request()Done.In depth & Complex detailsSet the current request in UnKnown situations:CrequestMiddleware.set_request(request)Returniam_requestif there is no current request:CrequestMiddleware.get_request(iam_request)And finally delete:CrequestMiddleware.del_request()The middleware automatically sets/deletes the current request for HTTP requests.
For other uses (management commands, scripts), you will need to do this yourself.
Package: django-creta
django-creta1. InstallationThe preferred installation method is directly from pypi:# Create promgen setting directory.$pipinstall-Udjango-creta2. QuickstartInsettings.py:INSTALLED_APPS=[...,'creta']Inurls.py:fromdjango.urlsimportpath,includeurlpatterns=[...,path('creta/',include('creta.urls')),]Runpython manage.py migrateCreate the models.$pythonmanage.pymigrateImport gatewayfromcreta.gatewayimportcreta_sdk# get_nftsresult=creta_sdk.get_nfts(address="0x628fD709BFa7fe68af024852893Ef615104445Ee",page=1)# get_nftresult=creta_sdk.get_nft(token_id="10106")# get_nft_transactions_by_userresult=creta_sdk.get_nft_transactions_by_user(address="0x628fD709BFa7fe68af024852893Ef615104445Ee")# get_nft_transactions_by_nftresult=creta_sdk.get_nft_transactions_by_nft(token_id="10103")# create_nftresult=creta_sdk.create_nft(address="0x628fD709BFa7fe68af024852893Ef615104445Ee",nft_type=1,name="NFT name",attributes=[{"trait_type":"Level","value":1}],image_url="https://cf.dev.superclubs.io/media/club/advertisement/8f4ee8fd-8c79-4004-aad7-88c3edbdf4ef/20230907/20230907T040903.jpg",)# get_nft_statusresult=creta_sdk.get_nft_status(request_id="3c52f871-1a01-47f3-8a9e-045d2767aab9")# update_nftresult=creta_sdk.update_nft(tokenId="10106",nftType=3,name="Club 20",attributes=[{"trait_type":"Level","value":20}])Test SDK$pythonmanage.pytest-v23. Configuration1.settings.pyimportenvironenv=environ.Env()...# Creta ConfigurationCRETA_GATEWAY_HOST=env('CRETA_GATEWAY_HOST')CRETA_APP_ID=env('CRETA_APP_ID')CRETA_API_KEY=env('CRETA_API_KEY')CRETA_SECRET_KEY=env('CRETA_SECRET_KEY')4. Update PackageInsetup.cfg, upgrade version[metadata]
name = django-creta
version = x.x.x
...Build package$pythonsetup.pysdistbdist_wheelDeploy package$twineupload--verbosedist/django-creta-x.x.x.tar.gzThe MIT LicenseCopyright (c) 2023 Runners Co., Ltd.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: django-crispy
The best way to haveDjangoDRY forms. Build programmatic reusable layouts out of components, having full control of the rendered HTML without writing HTML in templates. All this without breaking the standard way of doing things in Django, so it plays nice with any other form application.django-crispy-formssupports Python 2.7/Python 3.5+ and Django 1.11, 2.1, 2.2 and 3.0.The application mainly provides:A filter named|crispythat will render elegant div based forms. Think of it as the built-in methods:as_table,as_ulandas_p. You cannot tune up the output, but it is easy to start using it.A tag named{% crispy %}that will render a form based on your configuration and specific layout setup. This gives you amazing power without much hassle, helping you save tons of time.Django-crispy-forms supports several frontend frameworks, such as TwitterBootstrap(versions 2, 3, and 4),Uni-formand Foundation. You can also easily adapt your custom company’s one, creating your own,see the docsfor more information. You can easily switch among them usingCRISPY_TEMPLATE_PACKsetting variable.Authorsdjango-crispy-forms is the new django-uni-form. django-uni-form was an application created byDaniel Greenfeldthat I led since version 0.8.0. The name change tries to better explain the purpose of the application, which changed in a significant way since its birth.If you are upgrading from django-uni-form, we haveinstructionsfor helping you.Lead developer:Miguel AraujoExampleThis is a teaser of what you can do with latest django-crispy-forms.Find here the gistfor generating this form:DocumentationFor extensive documentation see thedocsfolder orread it on readthedocsSpecial thanksTo Daniel Greenfeld (@pydanny) for his support, time and the opportunity given to me to do this.The name of the project was suggested by the fantastic Audrey Roy (@audreyr)To Kenneth Love (@kennethlove) for creating django-uni-form-contrib from which bootstrap template pack was started.
Package: django-crispy-admin
Django Crispy Admin allows you to edit your forms with django-crispy-adminDocumentationThe full documentation is athttps://django-crispy-admin.readthedocs.org.QuickstartInstall django-crispy-admin:pip install django-crispy-adminThen use it in a project:INSTALLED_APPS = [

    # Add this:
    'crispy_admin',
    'crispy_admin.bootstrap3',

    # Before this one :)
    'django.contrib.admin',

]FeaturesCrispy-forms renders the forms so you can use the nice layout improvementsBoth plain and bootstrap3 for now.History0.0.6 (2015-10-15)Add django 1.8 template overridesAdd Bootstrap3 namespaceAdd info inmake helpabout reset-releaseRemove sortable inline static filesImprove Makefile, add phony targets and reset-release target to cance0.0.5 (2015-10-14)Fix setup.py typoUpdate README, remove cookiecutter info since it’s already in git logRemove ununsed widgetsUpdate environment testsRemove sortableInline0.0.4 (2015-10-14)Test Makefile change for auto commit mesage0.0.3 (2015-10-14)Fix lintingRefactor Makefile and setup.cfg to ease flake8 lintingFix requirements in setup.pyAdd superpowers to MakefileRemove tests from django-admin-bootstrapped0.0.2 (2015-10-13)Remove dynamic requirements in setup.py0.0.1 (2015-10-13)Based on work fromhttps://github.com/django-admin-bootstrapped/django-admin-bootstrappedAdded support of layouted forms from crispyAdded support of Layout helper for placing inlinesAdd configuration for tests in setup.pyAdd base files fromhttps://github.com/pydanny/cookiecutter-djangopackageAdd Draft for crispy inside admin
Package: django-crispy-contact-form
Customizable contact form based on crispy-formsdjango-crispy-contact-formis a contact form based on crispy-forms with captcha support for Django 1.11+RequirementsDjango>=1.11,<2.2
django-appcore>=0.0.9
django-crispy-forms==1.7.2
django-ipware==2.1.0
bleach==2.1.4Optional Requirementsdjango-simple-captcha>=0.5.9
django-recaptcha>=1.4.0UsageThis contact form do not send messages or emails. All submitted information stored in the database
and optional Django signals generated about submission. You may setup your own handlers for these signals.You can find detailed documentation in the “docs” directory.
Package: django-crispy-dynamic-relationships
Add dynamic one-to-many relationships to your crispy forms with easy model declaration. It handles saving, updating and deleting automatically.InstallationThis app can be installed and used in your django project by:$pipinstalldjango-crispy-dynamic-relationshipsEdit yoursettings.pyfile to include‘django-crispy-dynamic-relationships’in theINSTALLED_APPSlisting.INSTALLED_APPS=[...'django-crispy-dynamic-relationships',]Subclass ModelFormCrispy to build forms similar to ModelForm. Add an extra field for the one-to-many relationship. Multiple fields supported.fromdjango-crispy-dynamic-relationships.factoryimportModelFormCrispyclassChild1Form(ModelFormCrispy):classMeta:model=models.Child1fields='__all__'classParentForm(ModelFormCrispy):classMeta:model=models.Parentfields='__all__'children=[Child1Form]Instantiate Forms with the parent class (ParentForm in this example) and a model instance if updating. Then pass the instance to the view context.fromdjango_crispy_forms_dynamic.factoryimportFormscontext['parent_instance']=Forms(parent_class=ParentForm,parent_instance=parent_instance)Load ‘dynamic_modelform_tags’ in your template and apply the filter to the parent_instance.{% load dynamic_modelform_tags %}<formmethod="post">{% csrf_token %}
    {{ forms_factory|form_dynamic }}<buttontype="submit"id="id_submit">Submit</button></form>Finally, save your form by calling is_valid() and save() methods in your POST method of your view.defpost(self,request,pk=None):print(request.POST)try:parent_instance=Parent.objects.get(pk=pk)exceptParent.DoesNotExist:parent_instance=Nonefactory=Forms(parent_class=ParentForm,parent_instance=parent_instance,form_data=request.POST)iffactory.is_valid():factory.save()returnredirect('success')Docs & SourceSource:https://github.com/angelgm/django-crispy-dynamic-relationshipsPyPI:https://pypi.org/project/django-crispy-dynamic-relationships
Package: django-crispy-forms
The best way to haveDjangoDRY forms. Build programmatic reusable layouts out of components, having full control of the rendered HTML without writing HTML in templates. All this without breaking the standard way of doing things in Django, so it plays nice with any other form application.django-crispy-formssupports Django 4.2+ with Python 3.8+.Looking for Bootstrap 5 support? See thecrispy-bootstrap5 package.The application mainly provides:A filter named|crispythat will render elegant div based forms. Think of it as the built-in methods:as_table,as_ulandas_p. You cannot tune up the output, but it is easy to start using it.A tag named{% crispy %}that will render a form based on your configuration and specific layout setup. This gives you amazing power without much hassle, helping you save tons of time.Django-crispy-forms supports several frontend frameworks, such as TwitterBootstrap(versions 2, 3, and 4),tailwind,Bulmaand Foundation. You can also easily adapt your custom company’s one, creating your own,see the docsfor more information. You can easily switch among them usingCRISPY_TEMPLATE_PACKsetting variable.Authorsdjango-crispy-forms is the new django-uni-form. django-uni-form was an application created byDaniel Greenfeldthat I led since version 0.8.0. The name change tries to better explain the purpose of the application, which changed in a significant way since its birth.If you are upgrading from django-uni-form, we haveinstructionsfor helping you.Lead developer:Miguel AraujoExampleThis is a teaser of what you can do with latest django-crispy-forms.Find here the gistfor generating this form:DocumentationFor extensive documentation see thedocsfolder orread it on readthedocsSpecial thanksTo Daniel Feldroy (@pydanny) for his support, time and the opportunity given to me to do this.The name of the project was suggested by the fantastic Audrey Feldroy (@audreyfeldroy)To Kenneth Love (@kennethlove) for creating django-uni-form-contrib from which bootstrap template pack was started.