Saravanan666/pypi-org huggingface dataset:
Package: django-ifo
This app allows you to specify the ordering of inlines and fieldsets
in Django Admin.Quick startAdd “django_ifo” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    'django_ifo', # must be before admin

    'django.contrib.admin',
    ...
]Add fieldsets_and_inlines_order field in UserAdmin:# employee/admin.py

class MyUserAdmin(UserAdmin):
    fieldsets_and_inlines_order = ('f', 'i') # 1 fieldset then 1 inline

    def add_view(self, *args, **kwargs):
        self.inlines = []
        return super(UserAdmin, self).add_view(*args, **kwargs)

    def change_view(self, *args, **kwargs):
        self.inlines = [EmployeeInline]
        return super(UserAdmin, self).change_view(*args, **kwargs)

admin.site.unregister(User)
admin.site.register(User, MyUserAdmin)
Package: django-iframetoolbox
Django-iframeThis is a set of tools/utilities gathered to be used in iframes for example
social network applicationsIframe fix middlewaremiddleware that fixes IE PS3 and Safari Cookie problems.UsageAdd new midleware after session creation:MIDDLEWARE_CLASSES = (
    ...
    'iframetoolbox.middleware.IFrameFixMiddleware',
    ...
)add iframetoolbox to installed apps:INSTALLED_APPS = (
    ...

    'iframetoolbox',
    ...
)add url config:url(r'^iframe/', include('iframetoolbox.urls')),If needed overwrite templates with your message and style.
For refference look at source (download url).TODO:Propper docs
Package: django-iglink
DJANGO-IGLINKVersion1.3.0DescriptionAdd any instagram account data to any project.  IGLINK differs from other Instagram API's, that when you reach the
request limit put forth by Instagram, IGLINK will create a json cache file on every successful request, overwriting the
previous file.  When the request limit is hit or there is an exception, for example, 'keyError: ProfilePage',
IGLINK will then return the last successful request from the cache file.When the limit has been rest the cache file will be updated again with latest data.Setup#####https://pypi.org/project/django-iglink/#pip install django-iglinkor
#pip3 install django-iglink##In your Django project settings add 'iglink' to your installed apps:####INSTALLED_APPS = [
...'iglink',...
####]Next add IGLINK urls to your main url conf for example:###path('instagram/', include('iglink.urls'))or
###url(r'^instagram/', include('iglink.urls'))Then runpython manage.py migrateLastly in your root project folder make a directory calledcacheInsidecachemake 2 files called:ig-profile-cache.jsonandig-recent-media-cache.json
Package: django-ignorebots
django-ignorebotsThe Django-providedBrokenLinkEmailsMiddlewareis a handy way to be notified
whenever a user hits a 404 error on your website. The problem is, once you
enable it, you tend to get spammed by notifications due to bots scanning you
website repeatedly hitting 404 errors. This can include search engine crawlers,
exploit scanners, and even browsers.This simple Django plug-in helps you to filter these out so that you are only
notified when a real user hits a 404 error.Ignore all the bots!Documentation coming soon.History0.1.0 (2019-02-07)First release on PyPI.
Package: django-ignoretests
Application to ignore some tests from a Django project.https://github.com/cyberj/django-ignoretestsUsageJust add add to your settings.py:TEST_RUNNER="ignoretests.DjangoIgnoreTestSuiteRunner"
IGNORE_TESTS = (
    # Apps to ignore. example : 'django.contrib.auth',
    )If you want to usedjango-jenkinsalso add to your settings.py:JENKINS_TEST_RUNNER="ignoretests.jenkins.JenkinsIgnoreTestSuiteRunner"Changelog2012-04-19 - 0.3.2Fix setup and MANIFEST2012-04-10 - 0.3Add a try-except block so that django apps that do not have models.py file do not break the test runDoc fixes2011-05-05 - 0.2Add Jenkins compatibility2011-02-13Initial release
Package: django-ignoretests2
Application to ignore some tests from a Django project (1.6 comptatible).https://github.com/cyberj/django-ignoretestsUsageJust add add to your settings.py:TEST_RUNNER="ignoretests.DjangoIgnoreTestSuiteRunner"
IGNORE_TESTS = (
    # Apps to ignore. example : 'django.contrib.auth',
    )If you want to usedjango-jenkinsalso add to your settings.py:JENKINS_TEST_RUNNER="ignoretests.jenkins.JenkinsIgnoreTestSuiteRunner"Changelog2014-05-13 - 0.4.1Don’t fail on exceptions2014-02-15 - 0.4Change Pypi package name2013-11-21 - 0.3.3Fixed import for Django 1.62012-04-19 - 0.3.2Fix setup and MANIFEST2012-04-10 - 0.3Add a try-except block so that django apps that do not have models.py file do not break the test runDoc fixes2011-05-05 - 0.2Add Jenkins compatibility2011-02-13Initial release
Package: django-iitg-auth
django-iitg-authdjango-iitg-authis a reusable Django application which provides
a custom authencation backend for authenticating with IIT Guwahati webmail servers,
a login form and a utility view.Installationdjango-iitg-authcan be installed using following pip command.pipinstalldjango-iitg-authUsage: Authentication BackendAdd'iitgauth'to INSTALLED_APPS settings of the project.INSTALLED_APPS=['django.contrib.admin','django.contrib.auth',......'iitgauth',]Add'iitgauth.auth.WebMailAuthenticationBackend'toAUTHENTICATION_BACKENDSin settings.py.AUTHENTICATION_BACKENDS=['django.contrib.auth.backends.ModelBackend','iitgauth.auth.WebMailAuthenticationBackend',]This is all the configuration required to use the webmail authentication backend.Note thatauthenticatemethod of the backend requires following credentials:usernamepasswordlogin serverport (default is set to 995)Following snippet shows how webmail authentication can be done in a custom view.fromdjango.contrib.authimportauthenticatefromdjango.views.genericimportViewclassLoginView(View):defget(self,request):# get request handling logic#defpost(self,request):form=LoginForm(request.POST)ifform.is_valid():username=form.cleaned_data('username')password=form.cleaned_data('password')login_server=form.cleaned_data('login_server')# open a socket to login server and query validity of credentialsuser=auth.authenticate(username=username,password=password,login_server=login_server,port=995)## rest of authentication logic#else:# invalid form hadlingUsage:WebmailLoginFormandWebmailLoginViewA ready-to-use form (WebmailLoginForm) and a class based view (WebmailLoginView) are also available.
Using this form and view is not necessary. You can write your own custom login form and view to use with
webmail authentication backend as explained above.This form works exactly similar to Django’s built-inAuthenticationForm.
Only difference isWebmailLoginFormhas one extra field, .i.e. Login Server field.WebmailLoginFormhas 3 fields:usernamepasswordlogin_serverWebmailLoginViewis aFormViewwhich rendersWebmailLoginFormon GET and redirects tosuccess_urlon successful authentication.DemoNote:There is a working demo project available underexampledirectory.
Package: django-image-assets
django-image-assetsDjango application for image assets management.Use caseThere are several content types on a web siteEach of them has a set of required or additional image assetsEvery asset of same asset type must satisfy custom constraints on dimensions,
format and file size.The most important thing: these constraints and required asset type sets are
updated often, along with web design evolves and more platforms are added.Installationpipinstalldjango-image-assetsWorking example is intestproject.testapp.Addimage_assetsapplication to installed apps in django settings:INSTALLED_APPS.append('image_assets')Add generic relation to your content models:fromdjango.contrib.contenttypes.fieldsimportGenericRelationfromdjango.dbimportmodelsfromimage_assets.modelsimportAssetclassVideo(models.Model):assets=GenericRelation(Asset,blank=True)Setup inlines for assetsfromdjango.contribimportadminfromimage_assets.adminimportAssetsInlinefromtestproject.testappimportmodels@admin.register(models.Video)classVideoAdmin(admin.ModelAdmin):inlines=(AssetsInline,)UsageCreate new asset type (i.e. "thumbnail")AddVideotoallowed_forset: now you can add a thumbnail to a video. Or
you may skip this asset.AddArticletorequired_forset: now you will able to create or edit
an article with valid "thumbnail" asset only.When an asset is deleted, it's file is owned byDeletedAssetobject and may
be wiped later by manual or automatic cleanup.AdvancedIf you need to alter model fields i.e. forAssetType, you may subclass
existing model and than change image_assets application settings.SubclassAssetTypemodelfromdjango.dbimportmodelsfromimage_assets.modelsimportAssetTypeclassMyAssetType(AssetType):some_feature_flag=models.BooleanField(default=False)Change a reference to an asset type model in settings:IMAGE_ASSETS_CONFIG={'ASSET_TYPE_MODEL':'my_app.MyAssetType','ASSET_MODEL':'image_assets.Asset','DELETED_ASSET_MODEL':'image_assets.DeletedAsset'}image_assets.AssetTypewill be declared as abstract andMyAssetTypewill be returned as result ofimage_assets.models.get_asset_type_model()
Package: django-image-collection
Home-page: https://github.com/bitmazk/django-image-collectionAuthor: Daniel KaufholdAuthor-email: daniel.kaufhold@bitmazk.comLicense: The MIT LicenseDescription: Django Image Collection=======================A reusable Django app to organise images in collections and output them in sliders or galleries by simply adding a template tag.Installation------------To get the latest stable release from PyPi.. code-block:: bashpip install django-image-collectionTo get the latest commit from GitHub.. code-block:: bashpip install -e git+git://github.com/bitmazk/django-image-collection.git#egg=image_collectionTODO: Describe further installation steps (edit / remove the examples below):Add ``image_collection`` to your ``INSTALLED_APPS``.. code-block:: pythonINSTALLED_APPS = (...,'image_collection','generic_positions',)Add the ``image_collection`` URLs to your ``urls.py``.. code-block:: pythonurlpatterns = patterns('',...url(r'^image-collection/', include('image_collection.urls')),url(r'^pos/', include('generic_positions.urls')),)Before your tags/filters are available in your templates, load them by using.. code-block:: html{% load image_collection_tags %}Don't forget to migrate your database.. code-block:: bash./manage.py migrate image_collection./manage.py migrate generic_positionsUsage-----TODO: Describe usage or point to docs. Also describe available settings andtemplatetags.Contribute----------If you want to contribute to this project, please perform the following steps.. code-block:: bash# Fork this repository# Clone your forkmkvirtualenv -p python2.7 django-image-collectionmake developgit co -b feature_branch master# Implement your feature and testsgit add . && git commitgit push -u origin feature_branch# Send us a pull request for your feature branchIn order to run the tests, simply execute ``tox``. This will install two newenvironments (for Django 1.8 and Django 1.9) and run the tests against bothenvironments.Keywords: django,app,reusable,images,pictures,collection,slider,gallery,carouselPlatform: OS IndependentProvides-Extra: dev
Package: django-image-compressor
Django Image CompressorDjango Image Compressor is a tool to compress your images. Easy to plug-in and easy to use.
The tool compresses the uploaded image before saving data to db.InstallationTo install django-image-compressor$pipinstalldjango-image-compressorAdd the app to your project:# settings.pyINSTALLED_APPS=(...'django-image-compressor',...)UsagePackage will add additional 4 fields to your forms. You can compress your images by reducing the quality of the images or resize them or both. If you leave input width and/or height fields empty and try to resize your image, sizes will be reduced twice. Only compressed images will be saved to your db and original ones will be ignored.In order to use the compressor, first create a ModelForm in forms.py and add ImageCompressorFormMixin to your form:# forms.pyfromdjangoimportformsfromdjango_image_compressor.mixinsimportImageCompressorFormMixinclassYourImageUploadForm(ImageCompressorFormMixin,forms.ModelForm):...compressed_image_fields=('your_image_field_1','your_image_field2',...)...If you want to add compressor to your Django Admin Site, then add ImageCompressorAdminMixin and the created form to your ModelAdmin class.# admin.pyfromdjango.contribimportadminfromdjango_image_compressor.mixinsimportImageCompressorAdminMixinfrom.forms.pyimportYourImageUploadFormclassYourModelAdmin(ImageCompressorAdminMixin,admin.ModelAdmin):...custom_form=YourImageUploadForm...
Package: django-image-dimensions
Automatically add dimension attributes to all &lt;img&gt; tags in a response to improve rendering speed on the client.RationaleSpecifying image dimensions in HTML improves both percieved and actual client-side rendering performance by preventing reflow. However, maintaining explicit dimensions in templates is tedious and impractical in some cases. This middleware solves that in a plug-and-play manner by automatically setting dimensions in all &amp;img&amp; tags in a response.Requirementsdjango-celeryto run image fetch and dimensions calculations in the backgroundPILA cache that is shared between web server and celery (e.g. memcached)InstallationRunpip install django-image-dimensionsAdd‘imagedimensions’app toINSTALLED_APPSUsageFor a quick test-drive add‘imagedimensions.middleware.ImageDimensionsMiddleware’toMIDDLEWARE_CLASSES.
However, this is not suitable for production use as it adds an overhead to every request. For production, replace{% load cache %}in your templates with{% load imgdimensions %}.
Package: django-image-helper
Provides a model mixin that has ‘image’ and ‘thumbnail’ fields.
The uploaded image will be scaled to the model’s ‘IMAGE_SIZE’ and
a thumbnail will be scaled and saved to the model’s ‘THUMBNAIL_SIZE’.Additionally, there is an admin mixin to help you display an image’s thumbnail
when in the admin’s listview.RELEASE NOTES:version 0.1.1Added AdminImagePreviewWidget. This will show a preview of the image in the
admin change_form view in addition to the link the admin already shows.To enable, add the following to your ModelAdmin.formfield_overrides={SizedImageField:{'widget':AdminImagePreviewWidget},}version 0.1.0Added SizedImageField. This lets you do the same thing theImageMixinwas used for, but isolates all the work to the model’s field. It should
work with any storage backend.See the example project for a working sample. The basics:class MyModel(models.Model):image = fields.SizedImageField(upload_to=”the_directory”, size=(500, 500), thumbnail_size=(200, 200))Then you can access both the image and thumbnail in code or templates by:model.image.url
model.image.thumbnail.url
Package: django-imageit
Django ImageIt is a simple image handling plugin for Django that allows for scaling, upscaling and cropping of raster images. Imageit also has the capability to accept svg files if required.Key featuresPreview current image and new image selected for upload.Scale images to fit the bounds of max_width and max_height.Crop images to user defined dimensions before being scaled.Option to upscale smaller images.Utilises cropper.js.Accepts .svg images.Django Admin support.UsageInstall django-imageit using pippipinstalldjango-imageitAdd ‘imageit’ to INSTALLED_APPS in your settings.pyINSTALLED_APPS=[...'imageit',...]Import Imageit model fields to use them in your models.fromimageit.modelsimportScaleItImageField,CropItImageFieldclassImageItModel(models.Model):scale_image=ScaleItImageField(max_width=100,max_height=100,quality=100,null=True,blank=True)crop_image=ScaleItImageField(max_width=1000,max_height=1000,quality=100,null=True,blank=True)Available Imageit field KWARGSmax_width (int): Image will be scaled to the bounds of max_width in pixels (while retaining aspect ratio)max_height (int): Image will be scaled to the bounds of max_height in pixels (while retaining aspect ratio)quality (int): Quality in dpi of resampled imagesmax_save_size (int): Max size (mb) permitted for images after scaling/ resamplingupscale (bool): Upscale images to the value of max_width/max_height?NoteImageit fields inherit from the existing DjangoFileField. Therefore FileField arguments are also accepted (such as upload_to).OptionsImageit provides many options to tailor functionality specifically for your use case. While specific dimensions for scaling can be set as arguments on a field-by-field basis, Imageit also allows for project wide defaults to be set if no value is provided at the field level.Imageit will default to 100dpi quality at maximum dimensions of 1000x1000, If you wish to use your own custom defaults, you can do so in your settings.py as follows.Settings overrides.. code-block:: pythonIMAGEIT_MAX_UPLOAD_SIZE_MB = 5
IMAGEIT_MAX_SAVE_SIZE_MB = 5
IMAGEIT_DEFAULT_IMAGE_PROPS = {“max_width”: 1000, “max_height”: 1000, “quality”: 100, “upscale”: False}
IMAGEIT_ACCEPTED_CONTENT_TYPES = ‘image/jpeg’, ‘image/png’, ‘image/svg+xml’
IMAGEIT_SVG_CONTENT_TYPE = ‘image/svg+xml’IMAGEIT_MAX_UPLOAD_SIZE_MBis provided in MB, and is validated on the client side as well as on the server before cropping/scaling.IMAGEIT_MAX_SAVE_SIZE_MBis provided in MB, and is validated on the server after and scaling/cropping/resampling is completed.IMAGEIT_DEFAULT_IMAGE_PROPSDefault properties used to scale/resample imagesIMAGEIT_ACCEPTED_CONTENT_TYPESContent types accepted by imageit. (File mimes are validated by 3rd party FileTypes package)WarningIt is not reccomended to allow svg file uploads to untrusted users. Imageit will allow upload of svg images if specified in your accepted content types. It must be noted that while Imageit completes checks for scripts in svg files, no guarantee of security from XSS attacks is provided.
Package: django-image-loupe
AboutDjango Loupe provides an easy way to display zoomable, large images. The images may be hosted locally by uploading the original large image, or externally. Externally hosted images are referenced by their URL.Zoomable images are displayed by making a tiledimage pyramid. There are several methods and formats for making this pyramids. Django Loupe creates locally-hosted tiles in the Deep Zoom format developed by Microsoft using the open sourceVIPSlibrary.TheOpenSeadragonJavaScript library displays the locally- or externally-hosted images.InstallInstall Django Loupe usingpip:pip install django-loupeAdd"loupe",to your Django project’sINSTALLED_APPS.InstallVIPSon your platform. There are packages for Windows, and most Linux distributions include a package. There is a homebrew recipe for Mac OS X.Upload an imageAdd a new loupe imageEnter in a title and descriptionClick on the upload file button and select a high-res fileSave.Enter an externally hosted imageAdd a new loupe imageEnter a title and descriptionEnter in the URL for the tiles. This is not the URL for the page where you view the image. You will have to look at the page source to discover the tileset URL. Different formats have standard description files and Django Loupe will determine the correct URL from these.Deep Zoom:http://example.com/path/to/image/imagename.dziInternational Image Interoperability Framework:http://example.com/path/to/image/info.xmlZoomify:http://example.com/path/to/image/ImageProperties.xmlSelect the type of External tileset type from the selection.Save.Serving an imageIn the template include the JavaScript:{%loadloupe_tags%}{%openseadragon_js%}{{ object.render }}will include the HTML fragment for the large image.If it is an external tile set, it looks for<modulename>/<classname>_<tileset_type>.htmlwhere<tileset_type>is the short name of the tileset type choice.Finally, it looks in<modulename>/<classname>_default.htmlUsing remote storageUsedjango-queued-storageSet'IMAGE_STORAGE'to appropriate storage type.Specify setting'QUEUED_STORAGE_TASK'to either'loupe.task.TileAndTransfer'or'loupe.task.TileTransferAndDelete'.
Package: django-image-moderation
Django image moderation is a Django package that adds a automatic image moderation field.This image moderation field works using AWS Rekognition service so you would have to configure your AWS credentialsTo get startedTo get started with Django image moderation run on your terminal the following command:$ pip installdjango-image-moderationAfter you installed the application, you also have to install the package boto3:$ pip install boto3And don’t forget to check if you have Pillow installed, since is required by Django’s ImageField.Once you’ve installed all the requirements, you have to add the application to the installed apps of your project settings:my_django_project/settings.pyINSTALLED_APPS=[...'image_moderation',]You also have to create a new variable in settings.py called “IMAGE_MODERATION”
which should be a python dictionary containing the keys “AWS_ACCESS_KEY” and “AWS_SECRET_KEY”
with the respective AWS credentials:my_django_project/settings.pyIMAGE_MODERATION={'AWS_ACCESS_KEY':your_aws_access_key,'AWS_SECRET_KEY':your_aws_secret_key,}Finally to use the model field to moderate images uploaded by users
you have to create a model like the following:my_django_project/my_app/models.pyfromdjango.dbimportmodelsfromimage_moderationimportImageModerationFieldclassImageObject(models.Model):image=ImageModerationField(upload_to='images',moderation_level=2)You can customize the parameters of the moderation with:moderation_level: provides fixed moderation levels from 0 to 4, where 0 is the most permissive, that detect different moderations labels. Number with 4 as defaultmin_confidence: When AWS Rekognition analyses an image it returns the labels found in the image and how confident is the AI about each label, you can configure a mininum confidence value to determine if the label is valid. Number from 0 to 100 with 60 as defaultcustom_labels: List with personalized Rekognition labels that you want to include. You can find the list of labels inAWS Rekognition docsAny feedback or suggestion is more than welcome.Thanks, Alexander (@alexjmpb)