Saravanan666/pypi-org huggingface dataset:
Package: django-sb-admin
IntroductionDjango SB Admin is a resuable Django app which provides a Bootstrap 4 SB Admin dashboard theme:https://startbootstrap.com/templates/sb-admin/SB Admin is a free to download Bootstrap admin template. This template uses the
default Bootstrap 3 styles along with a variety of powerful jQuery plugins to
create a powerful framework for creating admin panels, web apps, or back-end dashboards.InstallationInstall an app:pip install django-sb-adminAdd “django_sb_admin” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'django_sb_admin',
)If you want to see an example app, add following to your urls file:path('django-sb-admin/', include('django_sb_admin.urls')),UsageCopy following blank template:django_sb_admin/sb_admin_blank.htmlor:Extend a base template:{% extends "django_sb_admin/base.html" %}and then:Override following blocks:{% block sb_admin_header %}<!-- Header of the page -->{% endblock sb_admin_header %}
{% block sb_admin_title %}<!-- Title of the content the page -->{% endblock sb_admin_title %}
{% block sb_admin_sidebar %}<!-- left sidebar -->{% endblock sb_admin_sidebar %}
{% block sb_admin_navbar_right %}<!-- right top navbar -->{% endblock sb_admin_navbar_right %}
{% block sb_admin_content %}<!-- content -->{% endblock sb_admin_content %}
{% block sb_admin_copyright %}<!-- copyright -->{% endblock sb_admin_copyright %}To use included login page put following in yoururls.py:url(r'^accounts/login/$', auth_views.login,
    {'template_name': 'django_sb_admin/examples/login.html'}),ConventionsTemplate blocksNames  of blocks start withsb_adminExtraslogin templatemessages support in a base templateLicenseCopyright 2015-2019 Rafal ZawadzkiLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.SB Admin itself is licensed under the MIT Licensehttps://github.com/BlackrockDigital/startbootstrap-sb-admin/blob/master/LICENSE
Package: django-sb-admin-2-auth
django-sb-admin-2-authdjango-sb-admin-2-auth is a theme fordjango-allauthbased onstartbootstrap-sb-admin-2InstallationGo throughhttps://django-allauth.readthedocs.io/en/latest/installation.html.Add sb_admin_2_auth urls instead of allauth's:urlpatterns=[...path('accounts/',include('sb_admin_2_auth.urls')),...]ConfigurationFor allauth settings seehttps://django-allauth.readthedocs.io/en/latest/configuration.html.Additional settings:ACCOUNT_NAME_REQUIRED (=False)The user is required to hand over a first and last name when signing up.ACCOUNT_FIRST_NAME_MIN_LENGTH (=1)An integer specifying the minimum allowed length of a first name.ACCOUNT_LAST_NAME_MIN_LENGTH (=1)An integer specifying the minimum allowed length of a last name.ProvidersSocial accounts are not being currently supported.
Package: django-sb-codefield
Django CodeFieldUse codemirror2 widget directly in Django models, forms and admin.RequirementsPython 3.8.1 or higher but lower than 4.0.0Django lower than 5.0.0django-codemirror2 lower than 1.0.0Installpipinstalldjango-sb-codefieldUsageAddcodemirror2anddjango_sb_codefieldto yourINSTALLED_APPSsettingsINSTALLED_APPS = [
  # ...
  "codemirror2",
  "django_sb_codefield",
]DocsEjemplosWikiChangelogAll changes to versions of this library are listed in thechange history.DevelopmentCheck out ourcontribution guide.ContributorsSee the list of contributorshere.
Package: django-sb-simple-migrations
Django Simple MigrationsDjango migrations without unnecesary change alert triggers.This project was originally taken fromPretix source codeand battle testet across many projects onSoftButterfly.This package overrides the commandsmakemigrationsandmigrate, mainly to make thatmakemigrationsdoesn't create migrations on non-significant database model fields and avoidmigratewarnings. As is stated in the source codemakemigrationsDjango, for theoretically very valid reasons, creates migrations forevery single thingwe change on a model. Even thehelp_text! This makes sense, as we don't know if any database backend unknown to us might actually use this information for its database schema.However, many projects only supports PostgreSQL, MySQL, MariaDB and SQLite and we can be pretty certain that some changes to models will never require a change to the database. In this case, not creating a migration for certain changes will save us some performance while applying themandallow for a cleaner git history. Win-win!Only caveat is that we need to do some dirty monkeypatching to achieve it...migrateDjango tries to be helpful by suggesting to run "makemigrations" in red font on every "migrate" run when there are things we have no migrations for. Usually, this is intended, and running "makemigrations" can really screw up the environment of a user, so we want to prevent novice users from doing that by going really dirty and filtering it from the output.RequirementsPython 3.8, 3.9, 3.10Installpipinstalldjango-sb-simple-migrationsUsageJust adddjango_sb_simple_migrationsto yourINSTALLED_APPSsettingsINSTALLED_APPS = [
  # ...
  "django_sb_simple_migrations",
  # ...
]DocsEjemplosWikiChangelogAll changes to versions of this library are listed in thechange history.DevelopmentCheck out ourcontribution guide.ContributorsSee the list of contributorshere.
Package: django-scaffold
A Reusable application providing a generic section/subsection hierarchy in Django.Aims to solve a common problem: you’re building a site that needs sections and
subsections and you not only need to be able to manage that hierarchy, but
also hang other content off of it.RequirementsDjango(1.4 or higher)django-treebeard.Django-scaffolding uses the following javascript libraries (these are included in project):jQueryjQuery UIjstreeThis project is licensed under a BSD License. Admin UI inspired bydjango CMS.
Package: django-scaffolding-tools
Django Scaffolding ToolsDjango tools for quick scaffolding.Free software: MIT licenseDocumentation:https://django-scaffolding-tools.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-10-07)First release on PyPI.
Package: django-scaffold-tools
A reusable django-app set for a DRF django project, starting support from django 3.0.If you want to build a Django-Rest-Framework project about your business requirements,
this project helps you do all kinds of redundant work which may be similar between
different projects.It supports the following features:base_config: Deal with project/user level user-config terms.base_settings: Common setting wrapped up as a model with default settings you needQuick start` pip installdjango-scaffold-tools`
Package: django-scaler
Django ScalerDegrade gracefully by automatically replacing heavy pages with static pages while a server is taking strain.ContentsDjango ScalerInstallationOverviewUsageAuthorsChangelog0.20.1InstallationInstall or adddjango-scalerto your Python path.Addscalerto yourINSTALLED_APPSsetting.Addscaler.middleware.ScalerMiddlewareto the top of yourMIDDLEWARE_CLASSESsetting.Add (r’^scaler/’, include(‘scaler.urls’)) to urlpatterns.OverviewServers may at times get overloaded due to a variety of reasons. When that
happens you don’t want expensive requests to bring down your entire site. The
site must redirect expensive requests to a “server busy” page while the server
is under load, and then automatically remove the redirects once the load has
dropped enough.django-scaleraddresses this situation in two ways. Firstly, it knows which
requests to redirect by itself. Secondly, it can be instructed to redirect the
N most expensive requests. It stores response time data in in-memory caches
enabling it to make these decisions.UsagePasted fromtest_settings.py:DJANGO_SCALER = {
    'server_busy_url_name': 'server-busy',

    # How many response times to consider for an URL. A small value means slow
    # response times are quickly acted upon, but it may be overly aggressive.
    # A large value means an URL must be slow for a number of requests before
    # it is acted upon. The default is 100.
    'trend_size': 10,

    # How much slower than average the trend must be before redirection kicks
    # in. The default is 4.0.
    'slow_threshold': 2.0,

    # How many seconds to keep redirecting an URL before serving normally. The
    # default is 60.
    'redirect_for': 10,

    # A function that returns how many of the slowest URLs must be redirected.
    # Depending on the site, data and load on the server this may be a large
    # number. This allows external processes to instruct the middleware to
    # redirect. The default is 0.
    'redirect_n_slowest_function': lambda: 0,

    # A function that returns what percentage of the slowest URLs must be
    # redirected. Depending on the site, data and load on the server this may
    # approach 100. The default is 0.
    'redirect_percentage_slowest_function': lambda: 0,

    # A function that returns a list of regexes. URLs matching the regexes are
    # redirected. Each regex is a simple string. Do not prefix with r''. The
    # default is an empty list.
    'redirect_regexes_function': lambda: [],
}AuthorsPraekelt FoundationHedley RoosChangelog0.2Regex URL matching for explicit redirection.Percentage slowest explicit redirection.0.1First release.
Package: django-scaleway-email
Django Scaleway EmailA small Django package that allows you to useScaleway's transactional emailAPI.RequirementsTo use this backend, you need an account with Scaleway and follow theirsetup guide
for the transactional email service.You can thencreate an IAM Applicationand generate a new API key for it.
Ensure the application has theTransactionalEmailEmailFullAccesspermission.InstallationInstall the package with your package manager of choice:pipinstalldjango-scaleway-emailSet yourEMAIL_BACKENDand configure your secrets:EMAIL_BACKEND="django_scaleway_email.backend.EmailBackend"SCALEWAY_EMAIL_PROJECT_ID="your-project-id"SCALEWAY_EMAIL_API_KEY="your-api-key"Done! You can now usedjango.core.mail.send_mailetc. to send emails!LimitationsScaleway imposes a fewlimitations on emails. Here's a short summary:Max. 3 recipients per emailMax. 2 attachmentsMax. total email size is 2 MBOnly PDF, images and plaintext attachments allowed
Package: django-scarface
<img src="docs/logo.png" width="322" alt="django-scarface" />-----------Send push notifications to mobile devices using Amazon SNS[![Documentation Status](https://readthedocs.org/projects/django-scarface/badge/?version=latest)](https://readthedocs.org/projects/django-scarface/?badge=latest)[![Build Status](https://travis-ci.org/dreipol/django-scarface.svg?branch=master)](https://travis-ci.org/dreipol/django-scarface)Documentation-----------https://django-scarface.readthedocs.io/Changelog------------https://github.com/dreipol/django-scarface/blob/master/CHANGELOG.MDProject Home------------https://github.com/dreipol/django-scarfacePyPi------------https://pypi.python.org/pypi/django-scarfaceContributors------------[@browniebroke](https://github.com/browniebroke)[@kennydude](https://github.com/kennydude)[@nanorepublica](https://github.com/nanorepublica)[@J0hn5mith](https://github.com/J0hn5mith)[@philipplaeubli](https://github.com/philipplaeubli)[@neosergio](https://github.com/neosergio)[@melbic](https://github.com/melbic)and many more...Trivia------------django-scarface is named after the track ‘Push it to the Limit’ featured in the movie Scarface (1983).![Scarface the movie (1983)](docs/scarface-movie.png "Scarface the movie (1983)")
Package: django-sca-theme
Django ThemeDjango theme 是一个自定义系统主题风格的库，可以生成前端所需要的配置信息。安装pip install django-sca-theme配置一. 将django_theme添加到INSTALLED_APPS，就像这样：INSTALLED_APPS=[...'django_theme',]二. 将django_theme的 URL 配置到项目的urls.py中：path("",include("django_theme.urls")),三. 将设置好MEDIA_ROOT和MEDIA_URL到settings.py:MEDIA_URL='/media/'MEDIA_ROOT=BASE_DIR/'/media'四. 运行python manage.py migrate应用数据库修改五. 运行python manage.py runserver，创建一个配置.六. 请求http://localhost:5000/api/system/theme获取主题
Package: django-schedule-daemon
Installation$[sudo]pipinstalldjango-schedule-daemonsettings.pyINSTALLED_APPS+=['django_schedule_daemon'].envDJANGO_SCHEDULE_MODULE=schedule_jobsExamplesschedule_jobs.pyimportschedulefromdjango.core.managementimportcall_commandschedule.every(5).seconds.do(lambda:call_command('test_command'))pythonmanage.pyschedule_daemonLinksschedulereadme42.com
Package: django-scheduled_blocks
Welcome to the documentation for django-scheduled_blocks v0.0.1!The purpose of this app is to schedule content in a Django template.BASIC USAGE:Add'scheduled_blocks'to yourINSTALLED_APPS.Run ‘python manage.py migrate scheduled_blocks’ to create the required table.Add a block in the admin panel - you can begin by simply entering the name of the block and something in thecontentfield.In the template where you need to schedule some content, add{% load scheduled_blocks_tags %}at the beginning, then
add{% schedule_block <blockname> %}where you want the content to appear.That’s it - the content will appear where required.MORE USEFUL USAGE:Define a second block (with the same name - you can have any number of blocks with the same name) with different content
and set itsdisplay_fromfield to be some time in the future. You can test the result by appending?testdate=YYYY-MM-DD(substitute the actual values here) to the URL of the relevant page.You can (you should) use actual templates for your content, either by specifying the template name (no extension) in
your ScheduledBlock  object or by naming the template so that the loader will find it. The name resolution rules are:
1. scheduled_blocks/(saved template_name)
2. scheduled_blocks/(block name)_(event_name)
3. scheduled_blocks/(block name)_(display_from datetime)_(display_to datetime)
4. scheduled_blocks/(block name)_(display_from date)_(display_to date)
5. scheduled_blocks/(block name)_(display_from datetime)
6. scheduled_blocks/(block name)
Datetime, here, means YYYYMMDDHHMM, while date means YYYYMMDD.You can pass extra context to your scheduled block, by specifying it in the ScheduledBlock object as a dict.
Package: django_schedulermanager
Creates two commandsschedulejobandunschedulejobthat allows
you to schedule (and unschedule) background jobs.If you have a brunch of jobs to start with your backend (e.g, if you
have to update your social feed every hour) you can just write the code
of the job, mark it with theschedulabledecorator and the job will
be schedulable with theschedulejobcommand.Right now the library usesdjango-rq+rq-scheduler, but the
dependency ondjango-rqis not needed and will be removed soon.How to useInstall the library usingpip install django_schedulermanagerAdddjango_schedulermanager.apps.DjangoSchedulerManagerConfigto
your INSTALLED_APPSWrite your job code in a module named ‘jobs’ (Remember to insert the
app in theINSTALLED_APPSlist)Import theschedulableannotation:from django_schedulermanager.decorators import schedulableMark your function withschedulable. You can pass to the
decorator the following parameters:interval: The interval of the function. Required.scheduled_time: When the function should start the first time.
Required. It’s a function.repeat: Not required, by default None which means ‘repeat always’id: The ID of the job. It will also be the name of the job that
you have to pass when using(un)schedulejob. Not required, by
default None which means ‘use the name of the function’queue: The queue to use. By default ‘default’Now you can schedule and unschedule your jobs usingpython manage.py schedulejob <id>andpython manage.py unschedulejob <id>! Call those in your init script
and your jobs should schedule (and unschedule) automaticallySee alsotest-projectdirectory to see an example, if you want to
test the project, clone the repository and run the commandmake testproject, it will copy thedjango_schedulermanagerfolder (the library code) in thetest-projectfolderTODO[ ] Remove dependency ondjango-rq[ ] If present, read ‘queue’ from@jobannotation[ ] Addunschedulejob allto unschedule all the jobs[ ] Add a command to remove all the scheduled jobs that don’t have a
function in the jobs.py files
Package: django-schedules
Django SchedulesThis app allows you to define routines that should run periodically (e.g. every day at 0:00, ...).
They will be triggered by systemd-timers or cron.Define RoutinesAdd "schedules" to yourINSTALLED_APPSsetting.Add a file calledschedules.pyto your django app.Define functions in this file.Each function which is a timer job should be decorated by theregisterdecorater:Example:importdjango_schedules@django_schedules.register(mins=0,hour=0)defrun_at_midnight(**kwargs):print('hello')@django_schedules.register(mins=3,hour=18,day_of_month=2,month='5,11',lock=False,job_name='foobar')defbar(**kwargs):"""Run on 2.5. and 2.11. at 18:03.Don't use locking (allow to run this job more than once at the same time).The job will be called 'foobar'.'"""print('hello')CommandsNow you can use following management commands:./manage.pyschedules_list# list all available jobs./manage.pyschedules_update_systemd[-uuser][--out-pathpath]# generate systemd units (for user 'user' (default root))./manage.pyschedules_update_cron[-uuser][-ofile]# generate crontab "code" (for user 'user' (default root)) (and write it to file file)./manage.pyschedules_run[<app_name>:]<job_name>[additional_args,...]# run the job app_name:job_nameInstallationWrite your code (see above)Run./manage.py schedules_listto verify all jobs are registered as expectedRun./manage.py schedules_update_systemd -u $DJANGO_USER [--out-path /etc/systemd/system/]to generate systemd unitsOr run./manage.py schedules_update_cron -u $DJANGO_USER -o /etc/cron.d/$DJANGO_PROJECT_NAMEto let the jobs run by system cron
Package: django-schema
=====django_schema=====Django Schema is a simple Django app to generate schema of Models .Installation```shell$ pipenv install django_schema```Detailed documentation is in the "docs" directory.Quick start-----------1. Add "schema" to your INSTALLED_APPS setting like this::```pythonINSTALLED_APPS = [...'django_schema',]```2. Add list of local apps to SCHEMA_APPS setting like this```pythonSCHEMA_APPS = ['blog','users','product',]```3. Include the schema URLconf in your project urls.py like this::```pythonfrom django.urls import includeurlpatterns = [...path('schema/', include('django_schema.urls'))]```4. Visit http://127.0.0.1:8000/schema/ to check all the schema styles5. For testing```pythonMODEL_SCHEMA_TEST = {'app_name':'blog','model':'post'}```## To Do- Permission- Handling App versioning for ex 'apps/v1/blog', 'apps/v1/users'- Add Serializers For all the Django Model Field INTERNAL_TYPES- Handle more html elements types- Add docs- Add Testing
Package: django-schema-graph
Django Schema GraphDjango-schema-graph makes a colourful diagram out of your Django models. The
diagram is interactive, and makes it easy to toggle models and apps on/off at
will.It looks like this:FeatureScreenshotModelsAppsBoth togetherGraph editor(Apologies that the images above don't work on PyPI.Check it out on
GitHub.)InstallationInstall from PyPI:pipinstalldjango-schema-graphAdd toINSTALLED_APPS:INSTALLED_APPS=[...'schema_graph',...]Add to your URLs.fromschema_graph.viewsimportSchemaurlpatterns+=[# On Django 2+:path("schema/",Schema.as_view()),# Or, on Django < 2:url(r"^schema/$",Schema.as_view()),]UseBrowse to/schema/(assuming that's where you put it in your URLs).You can control access to this page using theSCHEMA_GRAPH_VISIBLEsetting,
or by subclassingschema_graph.views.Schemaand overridingaccess_permitted.
By default the page is only visible whenDEBUGisTrue,
because we assume that you don't want to leak sensitive information about your
website outside of local development.SupportTests run on sensible combinations of:Python (3.10-3.11)Django (3.2-4.1)If you're stuck on old version of Python or Django, you may consider installing
old versions.
They will probably have fewer features, and there will be no support for them.The last version to support Python 2.7 and 3.5 was 1.2.0.
The last version to support Python 3.6 to 3.9 was 2.2.1.The last version to support Django 1.8 was 1.2.0.
The last version to support Django 1.9 to 3.1 was 2.2.1.Alternativesdjango-spaghetti-and-meatballsis great. At the time of writing, it offers a lot more detailed information
on the models in the diagram, but doesn't allow them to be turned on/off in
the page.
Package: django-schema-sprout
Django Schema SproutDjango Schema Sprout is a django package that helps with generating models, serializers and views dynamically for unmanaged databases.
Currently Django Schema Sprout supports only PostgreSQL (>=11.), Django (>=4.0, <5.0)InstallationTo install Django Schema Sprout, you can run:pipinstalldjango-schema-sproutUsageSettings.pyAdddjango_schema_sproutin installed apps in yoursettings.pyand addSchemaSproutDBRouterto your database routers.INSTALLED_APPS=[# django_schema_sprout requires rest_framework and drf_yasg to be installed."rest_framework","drf_yasg",..."django_schema_sprout"]...DATABASE_ROUTERS=[...,"django_schema_sprout.router.SchemaSproutDBRouter",]Initializing SchemaSproutfromdjango_schema_sprout.schema_sproutimportSchemaSproutmy_db_sprout=SchemaSprout("name_of_unmanaged_db")SchemaSproutis Singleton based on parameters so initializingSchemaSproutwith same database name will return same instance.Creating modelsYou can either create all models at once usingcreate_models.create_modelstakes one parameter:readonlybool (default:False), specifying if created REST ViewSets should be readonly or not.my_db_sprout.create_models(readonly=True)To create one model at the time usecreate_model.create_modeltakes 3 parameter:table_name- str, name of the table for which you want to create model.table_nspname- str, schema where the table resides.readonlybool (default:False), specifying if created REST ViewSet should be readonly or not.my_db_sprout.create_model(table_name="my_table"table_nspname="my_schema"readonly=False)Including SchemaSprout ViewSetsInurl.pyfile, include urls fromSchemaSprout.router. Make sure that the models that you need were created before.fromdjango.contribimportadminfromdjango.urlsimportpath,re_path,include...fromdjango_schema_sprout.schema_sproutimportSchemaSprouturlpatterns=[...,path("api/",include(SchemaSprout("name_of_unmanaged_db").router.urls)),...]Accessing created modelsYou can access created models, serializers and views by accessing SchemaSprout attributes:table_name="my_table"schema_name="my_schema"obj_key=f"{schema_name}_{table_name}"my_model=my_db_sprout.models.get(obj_key,None)my_model_serializer=my_db_sprout.serializers.get(obj_key,None)my_model_view=my_db_sprout.views.get(obj_key,None)ContributionFeel free to contriute or open an issue.For local development:in your venv install dev dependenciespip install -e ".[dev]"for testing install test dependenciespip install -e ".[test]"Running tests requires to have installed Postgres.LicenseThis project is licensed under the Apache License 2.0ContactFor questions feel free to contact me:grumpy.miner.dev@gmail.com
Package: django-schema-viewer
django-schema-viewerVisualizes a DB schema based on Django models.Installationpip install django-schema-viewerUsageInstall the packageAddschema_viewerto yourINSTALLED_APPSsettings like this:INSTALLED_APPS=[...,'schema_viewer',...,]Addschema_viewer.urlsto mainurls.py:fromdjango.urlsimportpath,includeurlpatterns=[...,path('schema-viewer/',include('schema_viewer.urls')),...,]Run the projectpython manange.py runserverGo tohttp://127.0.0.1:8000/schema-viewer/Optional settingsSCHEMA_VIEWER={'apps':['contenttypes','my_app',],'exclude':{'auth':['User'],'my_app':['SomeModel'],},}LicenseMIT