Saravanan666/pypi-org huggingface dataset:
Package: django-resckeditor
# django-resckeditorThis is a django app which provides and infrastructure you can use to include custom contents of other apps directly inside ckeditor.It requires [django-ckeditor](https://github.com/django-ckeditor/django-ckeditor)It defines a custom CKEDITOR plugin which implements two dialog tabs: the first to select the resource, and the second to dynamically set options.**Full documentation**: [https://django-resckeditor.readthedocs.io/en/latest/](https://django-resckeditor.readthedocs.io/en/latest/)![Screenshot](docs/images/list.png)![Screenshot](docs/images/options.png)## Getting StartedInstall django-resckeditor:$ pip install django-resckeditorAdd resckeditor to your installed apps:INSTALLED_APPS = (# ...'ckeditor','ckeditor_uploader','resckeditor',# ...)add the urls in your core application:urlpatterns = [# ...url(r'^resckeditor/', include('resckeditor.urls', namespace='resckeditor')),]**N.B.** do not change the **resckeditor** path, since it is hardcoded in the js code.Add the resource and ajax plugins to your ckeditor instance:CKEDITOR_CONFIGS = {'default': {'skin': 'moono','toolbar_Full': [// ..['Res'/*, ...*/],// ..],'toolbar': 'Full',// ...'extraPlugins': 'ajax,resource',}}Define functions export resources for ckeditor, so for example in your settings:RESCKEDITOR_CONFIG = {'RESOURCES': [{'list': 'path.to.module.func.defining.resources','output': 'path.to.module.func.returning.html','label': 'My group of widgets'},]}The `list` function is invoked without arguments and should return a dictionary defining all the available resources(i.e. all the news we want to export) and the available options:def my_list_function():res = []for n in News.objects.published():res.append({'label': n.title,'id': n.id})return {'resources': res,'options': [{'type': 'text','name': 'news-dialog-options-section-title','label': 'Last News','default': ''},{'type': 'checkbox','name': 'news-dialog-options-show-title','label': 'Show title','default': True},{'type': 'number','name': 'news-dialog-options-num-chars','label': 'Number of chars','default': 50},{'type': 'select','name': 'news-dialog-options-layout','label': 'Layout','data': [{'label': 'one row', 'value': 'row'},{'label': 'two columns', 'value': 'col-2'},{'label': 'three columns', 'value': 'col-3'},{'label': 'four columns', 'value': 'col-4'},]}]}The `output` function will receive the id of the resource selected and a dictionary containing the provided options.It should return the html output of the resource.def my_output_function(id, options):n = News.objects.get(pk=id)return '<h1>%s</h1>' % n.title## Supported optionsCurrently only 4 types of options are supported: checkbox, text, number and select, but should be sufficient for almost all use cases.The syntax and required properties are the one you may se in the example above (text has the same props as number).
Package: djangorescue
DJANGORESCUEРусскийEnglishОписание по-русски.Пакет DJANGORESCUE позволяет обслуживать статику (static, media) через Django (когда нет возможности использовать nginx, apache, и s3 storage), независимо от состояния параметра DEBUG.Да, это известно, что так делать не следует, но иногда по-другому нельзя.Конфигурацияsettings.pyDEBUG=False...MIDDLEWARE=[...'djangorescue.middleware.StaticMediaMiddleware',...]...STATIC_URL='/static/'STATIC_APP_DIR='static'# Имя каталога со статикой внутри каталога приложения.STATICFILES_DIRS=[os.path.join(BASE_DIR,'static'),]MEDIA_URL='/media/'MEDIA_ROOT=os.path.join(BASE_DIR,'media')English description.DJANGORESCUE package allows to serve static files (static, media) through Django (when nginx, apachage and s3 storage options are not available) regardless of DEBUG setting value.Yes, it is a known thing, that such approach is bad, however sometimes it's the only way.Configurationsettings.pyDEBUG=False...MIDDLEWARE=[...'djangorescue.middleware.StaticMediaMiddleware',...]...STATIC_URL='/static/'STATIC_APP_DIR='static'# The name of the folder, that contains static files within the app folder.STATICFILES_DIRS=[os.path.join(BASE_DIR,'static'),]MEDIA_URL='/media/'MEDIA_ROOT=os.path.join(BASE_DIR,'media')
Package: django-reservation
Customizable reservations (you can provide your own reservation model)Generic reservation create view and reserve product viewReservation list filter by userEmail notifications with template systemDjango Admin backend for administrative proposuse like Accept, Borrow, Denied reservationsParcial reservations in admin (Not all products can be borrowed)UI based on Twitter BootstrapUsing i18n to handle translationsDocumentationSee inreadthedocs.ioInstallationInstall with pip$pipinstalldjango-reservationIn settings.pySet “djreservation” in your INSTALLED_APPS.Set ‘djreservation.middleware.ReservationMiddleware’ in MIDDLEWAREMIDDLEWARE=[...'djreservation.middleware.ReservationMiddleware']Configure your email settingsDEFAULT_FROM_EMAIL="mail@example.com"EMAIL_HOST="localhost"EMAIL_PORT="1025"Configure databaseRun migrationspythonmanage.pymigrateIn your codeWhere you want, create a view for reserve a productfromdjreservation.viewsimportProductReservationViewclassMyObjectReservation(ProductReservationView):base_model=MyObject# requiredamount_field='quantity'# requiredextra_display_field=['measurement_unit']# not requiredIn urls.pyAppend django reservation to  urlpatternsfromdjreservationimporturlsasdjreservation_urlsurlpatterns=[...url(r"^reservation/create/(?P<modelpk>\d+)$",MyObjectReservation.as_view())]urlpatterns+=djreservation_urls.urlpatterns
Package: django-reset
This is a port of Django’sresetmanagement command that was shipped with
Django 1.4.x and earlier. Django 1.5 removed this command.There might be good reasons not to further maintain it in the Django core,
however it was always quite useful during prototyping a new Django based
project. Thats why I decided to bring it to Django 1.5 and higher with this
app.Full credits for the code goes to the awesome Django project.InstallationInstalldjango-resetwith pip:pip install django-resetAdd'django_reset'to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'django_reset',
    ...
)Usagedjango-admin.py reset <appname appname …>Executes the equivalent ofsqlresetfor the given app name(s).The--noinputoption may be provided to suppress all user prompts.The--databaseoption can be used to specify the alias
of the database to reset.django-admin.py sqlreset <appname appname …>Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app
name(s).The--databaseoption can be used to specify the database for which to
print the SQL.TriviaFor code, bug reports, patches or if you wish to contact me, go tohttps://github.com/gregmuellegger/django-resetChangelog0.2.0Python 3 support!0.1.0Initial release
Package: django-reset-migrations
Django reset migrationsAdd one command to reset the django migrations.Sometimes you have one app that had a lot migrations in development
process. And this migrations could be deleted, because anybody will need
this in the future.Soo, could be stressfull delete the files, reset the database and create
the first migration again … to start to developer again and bla bla bla
…Because this, I made this command to reset the migrations and start the
first migration.I hope be usefull to you 2 :DFeaturesdelete migrations filesdelete registers in django_migrationsrecreate the first migrationsapply fake migrationdelete register without delete files with –cachedTo installpip install django-reset-migrationsInstall package in your INSTALLED_APPSsettings.py

INSTALLED_APPS = (
    ...
    'reset_migrations',
    .....
)Usagepython manage.py reset_migrations crm

or

python manage.py reset_migrations app1 app2

or

python manage.py reset_migrations app1 app2 --cachedOptions–cached: Don´t delete the migrations files in apps
Package: django-resized
Resizes image origin to specified size. Compatible with sorl-thumbnail.FeaturesTested on Django 2.2, 3.0, 3.1, 3.2, 4.0Python 3 supportInstallationpipinstalldjango-resizedConfiguration (optional)settings.pyDJANGORESIZED_DEFAULT_SIZE=[1920,1080]DJANGORESIZED_DEFAULT_SCALE=0.5DJANGORESIZED_DEFAULT_QUALITY=75DJANGORESIZED_DEFAULT_KEEP_META=TrueDJANGORESIZED_DEFAULT_FORCE_FORMAT='JPEG'DJANGORESIZED_DEFAULT_FORMAT_EXTENSIONS={'JPEG':".jpg"}DJANGORESIZED_DEFAULT_NORMALIZE_ROTATION=TrueUsagemodels.pyfromdjango_resizedimportResizedImageFieldclassMyModel(models.Model):...image1=ResizedImageField(size=[500,300],upload_to='whatever')image2=ResizedImageField(size=[100,100],crop=['top','left'],upload_to='whatever')image3=ResizedImageField(size=[100,150],crop=['middle','center'],upload_to='whatever')image4=ResizedImageField(scale=0.5,quality=75,upload_to='whatever')image5=ResizedImageField(size=None,upload_to='whatever',force_format='PNG')image6=ResizedImageField(size=[100,None],upload_to='whatever')Optionssize- max width and height, for example [640, 480]. If a dimension is None, it will resized using the other value and maintains the ratio of the image. If size is None, the original size of the image will be kept.scale- a float, if not None, which will rescale the image after the image has been resized.crop- resize and crop. [‘top’, ‘left’] - top left corner, [‘middle’, ‘center’] is center cropping, [‘bottom’, ‘right’] - crop right bottom corner.quality- quality of resized image 0..100, -1 means defaultkeep_meta- keep EXIF and other meta data, default Trueforce_format- force the format of the resized image, available formats are the one supported bypillow, default to NoneHow to run testspipinstalltoxtox
Package: django-resizer
Django Resizer==============Django Resizer allows images to be dynamically resized and/or cropped through a URL. This is very useful when you have a third-party "hot-linking" your images and they won't have access to template tag to dynamically resize images like [easy-thumbnails](https://github.com/SmileyChris/easy-thumbnails) or [sorl-thumbnail](https://github.com/sorl/sorl-thumbnail) provides.Installation------------Run `pip install django-resizer`Add `resizer` to your `INSTALLED_APPS` setting:```pythonINSTALLED_APPS = (...'resizer',)```To your sites `url.py` add:```pythonurlpatterns = patterns('',...url(r'^resizer/(?P<path>.*)/$', 'resizer.views.resize', name='image_resize'),)```Usage-----The resizing and cropping capabilities rely on the easy-thumbnails app.To resize an image with a height and width of no more than 50px and with the image ratio perserved:`/resizer/images/picture.jpg?size=50,50`The path after `/resizer` should be the path to the image from your settings `MEDIA_ROOT`. The query string should be `size=[width],[height]`.To resize an image to have a height and width of extactly 50px:`/resizer/images/picture.jpg?size=50,50&crop=smart`
Package: django_resort
Implement sorting for ListView columns without changing your views.InstallationGet it from the cheeseshop:pip install django_resortUsageRead on:Includedjango_resortin yourINSTALLED_APPSsettings.Load the tags:{% load resort %}Jut before the for loop iterating through the object_list, include:{% auto_sort object_list %}
{% for object in object_list %}In your table header:<th>{% sort_link field.verbose_name|title field.name %}</th>CreditsThis project is primarily based upondjango-sortingwhich it seems is no longer actively maintained as I could not get it to install using pip.History0.1.0 (2013-12-3)First release on PyPI.
Package: django-resourcetags
Author:John MillikinCopyright:This document has been placed in the public domain.Overviewdjango-resourcetagsis a set of utility functions and tags for Django.
It simplfies inclusion of static resources into a page, by providing
auto-versioning and transparent compression handling.UsageIncludedjango_resourcetagsin yourINSTALLED_APPSsetting. Load
the tag library with{% load resources %}, and then use theresource,resource_group, orresource_urltags.resource_urlUsed like{% resource_url "/myapp/somefile.txt" %}. Will calculate
the mtime of the resource and include it in the URL, to implement
auto-versioned resources. The final URL will be of the form:{{MEDIA_URL}}/{{file_mtime}}/myapp/somefile.txtWhen finding the mtime, file paths are relative toMEDIA_ROOT. If the
file cannot be found, an mtime of 0 will be used.resourceUsed like{% resource "/myapp/somefile.txt" %}. Autodetects the
MIME-type of the resource and wraps the URL in an appropriate HTML tag.
Default handlers exist for CSS, JavaScript, PNG, JPEG, and GIF. Additional
handlers may be registered in theRESOURCE_HANDLERSsetting, with this
format:RESOURCE_HANDLERS = {'text/css': 'myproject.myapp.resource_handlers.css'}resource_groupUsed like{% resource_group "mygroup" %}. Groups may be defined in
the settings file to reduce duplicated typing and facilitate compression
(see below). Resource groups are defined in the format:RESOURCE_GROUPS = {'mygroup': ('file1.css','file2.css')}In non-compressed mode, each file will be included in a separate tag.CompressionResources and resource groups may be compressed using the commandmanage.py compressresources. Resource groups will be concatenated
together into one file, and run through a compression filter. Single
resources may also be run through the compression filter by listing
them in theCOMPRESS_EXTRAsetting.Compression filters are functions listed in theRESOURCE_COMPRESSION_FILTERSsetting, which is a mapping of MIME-type -> [function names]. Compression
functions are called in sequence.Compressed resources are stored in the directory specified byCOMPRESSED_MEDIA_ROOT, and served from the URLCOMPRESSED_MEDIA_URL.Compression filters for CSS and JavaScript are included in thedjango_resourcetags.compression.filtersmodule, under the namesfilters.javascriptandfilters.css.Genshi IntegrationFor use withdjango-genshi. Includedjango_resourcetags.genshi_integration.template_contextin yourTEMPLATE_CONTEXT_PROCESSORSsetting, and you will have access
to the functionsresource(),resource_group(), andresource_url().
These functions work just like the template tag equivalents.
Package: django-responsediff
django-responsediffI’m pretty lazy when it comes to writing tests for existing code, however, I’m
even lazier when it comes to repetitive manual testing action.This package aims at de-duplicating view tests inside the political-memory
itself and to make it reusable for other apps.It’s pretty much the same as django-dbdiff, except this is for HTTP response.Notev0.7 supports up to Django < 2.1Response state assertionWhen my user tests, he browses the website and checks that everything is
rendered fine. This app allows to do high-level checks of HTML rendering.See responsediff/response.py docstrings for example usage, or use the
conveniance mixin:from responsediff.test import ResponseDiffTestMixin

class MixinTest(ResponseDiffTestMixin, test.TestCase):
    def test_admin(self):
        self.assertResponseDiffEmpty(test.Client().get('/admin/'))The above will fail on the first time withFixtureCreatedto indicate that
it has writtenresponsediff/tests/response_fixtures/MixinTest.test_admin/{content,status_code}.
This file is meant to be added to version control. So next time this will run,
it will check thatresponse.status_codeandresponse.contentis the
same, in future version, or in other configurations (ie. py35, py27, pypy, etc
…).Instead of deleting the fixtures manually before running the tests to
regenerate them, just run your tests with FIXTURE_REWRITE=1 environment
variable. This will overwrite the fixtures and make the tests look like it
passed.RequirementsPython 2.7 and 3.4 are supported along with Django 1.7 to 1.10 - it’s always
better to support django’s master so that we canupgrade easily when it is
released, which is one of the selling points for having 100% coverage.InstallInstalldjango-responsediffwith pip.Related appA somewhat similar app which inspired django-responsediff isdjango-test-utils.
Package: django-response-timeout
django-response-timeoutallows you to set the cache time globally for
all responses. It provides a way to override the client side cache time for
the Djangoper sitecaching middleware.InstallationInstallation is as easy as:pip install django-response-timeoutSetupAddresponse_timeout.middleware.SetCacheTimeoutMiddlewareand place it
afterdumper.middleware.UpdateCacheMiddlewareso that it will set the
header time first on cached responses.MIDDLEWARE_CLASSES=('django.middleware.cache.UpdateCacheMiddleware','response_timeout.middleware.SetCacheTimeoutMiddleware','django.middleware.common.CommonMiddleware','django.middleware.cache.FetchFromCacheMiddleware',)Then setRESPONSE_CACHE_SECONDSto the number of seconds each page should
be cached on the front end.The Django documention does not cohesively describe how your middleware
should be ordered, howeverthis stackoverflowdiscussion does a fine job.ContributingIf you find issues or would like to see a feature suppored, head over to
theissues sectionand report it. Don’t be agraid, go ahead, do it!To contribute code in any form, fork the repository and clone it locally.
Create a new branch for your feature:git commit -b feature/whatever-you-likeThen make sure all the tests past (and write new ones for any new features):pip install -e .
pip install -r requirements-dev.txt
django-admin.py test --settings=test.settingsCheck if the README.rst looks right:restview --long-descriptionThen push the finished feature to github and open a pull request form the branch.New ReleaseTo create a new release:Add changes toCHANGES.txtChange version insetup.pypython setup.py registerpython setup.py sdist upload
Package: django-response-view-mixin
Your project description goes hereDocumentationThe full documentation is athttps://django-response-view-mixin.readthedocs.io.QuickstartInstall Django Response View Mixin:pip install django-response-view-mixinAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'response_view_mixin',...)Add Django Response View Mixin’s URL patterns:fromresponse_view_mixinimporturlsasresponse_view_mixin_urlsurlpatterns=[...url(r'^',include(response_view_mixin_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2021-10-18)First release on PyPI.0.1.1 (2021-10-19)Update github action0.1.2 (2021-10-19)Rework pipy on github action0.1.3 (2021-10-20)Rework pipy on github action
Package: django-responsive
django-responsive a utility application for building responsive websites
in Django. This tool is meant to complement the use of CSS media queries and
help solve problems with fixed width elements such as advertisements or embedded video.This project doesnotmatch devices based on user agent strings and instead
uses a small piece of javascript to make the device window size available on the server.
Once enabled you can access adevice_infodictionary in your templates:{'width': 320, 'type': 'phone', 'height': 480}Now you and conditionally render content based on the device size or type.Installationdjango-responsive requires Python 2.6 or 2.7 and django>=1.3. There is experimental
support for Python 3.2 if using Django >= 1.5. It is easiest to install django-responsive from PyPi using pip:pip install django-responsiveConfigurationTo enable django-responsive you will need to update yourMIDDLEWARE_CLASSESandTEMPLATE_CONTEXT_PROCESSORSsettings.:MIDDLEWARE_CLASSES = (
    # Other middleware classes go here
    'responsive.middleware.DeviceInfoMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    # Other context processors included here
    'responsive.context_processors.device_info',
)Note thatTEMPLATE_CONTEXT_PROCESSORSis not included in the default settings
and you should be careful to not lose the defaults when adding this additional
context processor.There is an optional settingRESPONSIVE_BREAKPOINTSwhich is
used to determine thetypeincluded in thedevice_infodictionary. The
default breakpoints are:# Name, Max Width (inclusive)
DEFAULT_BREAKPOINTS = {
    'phone': 480,
    'tablet': 767,
    'desktop': None,
}To overwrite the default breakpoints, include aRESPONSIVE_BREAKPOINTSdictionary in the project’s settings.py file:# Name, Max Width (inclusive)
RESPONSIVE_BREAKPOINTS = {
    'phone': 480,
    'tablet': 767,
    'desktop': None,
}Licensedjango-responsive is released under the BSD License. See theLICENSEfile for more details.ContributingIf you think you’ve found a bug or are interested in contributing to this project
check outdjango-responsive on Github.Running the TestsYou can run the tests with via:python runtests.pyIf you see any test failures please report them to the Github issue tracker.
Package: django-responsive-design-helper
Turn any Django URL into a responsive container to see what your site looks like
in all view ports on one page (given enough screen real estate, at least).This builds onMatt Kersley’sawesomeResponsive-Design-Helpertool, but
with a Django twist.UsageInstall via the normal means and addresponsive_design_helperto the list of
yourINSTALLED_APPSand wire up the URLs.  Make sure that this line (or one
really similar if you know what you’re doing) is the first argument second
argument in yourpatternscall:urlpatterns = patterns('',
    ('', include('responsive_design_helper.urls')),

    # Put the rest of your URLs down here
)With that out of the way, addresponsive/to any of the URLs on your Django
site and sit back and watch the magic happen.ContributingCreate something awesome – make the code better, add some functionality,
whatever (this is the hardest part).Fork itCreate a topic branch to house your changesGet all of your commits in the new topic branchSubmit apull requestLicenseCopyright 2012 Texas Tribune and Travis SwicegoodLicensed 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.
Package: django-responsive-dfp
Django responsive DFP======================Description-----------The `django-responsive-dfp` package allows you to easily display responsive ads using dfp ans media-queries.Dependencies------------* Django >= 1.3Installation------------pip install django-responsive-dfpadd the plugin to ``INSTALLED_APPS``::INSTALLED_APPS = (...'dfp',...)define settings for your dfp slotsDFP_SLOTS = {"header": {"account" : 12345678,"slot" : "Leaderboard_Header","responsive" : [{"media_query" : "(min-width: 1248px)","sizes" : ((1150,120),)},{"media_query" : "(min-width: 948px) and (max-width: 1248px)","sizes" : ((640,120),)}]}}Usage------------In your templates, you need to load ``dfp``:...{% load dfp %}...then you simply call the tag with the slot name{% dfp "header" %}