Saravanan666/pypi-org huggingface dataset:
Package: django-top-notify
django-top-notifyA top notification bar based on Django project.FeatureIntegrate into an existing Django project easily.Supporthintandalerttype of top notification.Publish and cancel top notification dynamically without deployment.Latest notification will automatically be displayed.DemoPublish or cancelUse Django Admin page to configure:Hint top notificationAlert top notificationQuick StartInstall django-top-notify:# bashpipinstalldjango-top-notifyAdddjango_top_notifyinto INSTALLED_APPS:# settings.pyINSTALLED_APPS=[..."django_top_notify",...]Add urls into urlpatterns:# urls.pyurlpatterns=[...path("top_notify/",include("django_top_notify.urls")),...]Collect static files & migrate:# bashpythonmanage.pycollectstatic
pythonmanage.pymigratedjango_top_notifyAdd frontend elements into template:<!--templates/index.html-->{% load static %}<head><linkrel="stylesheet"href="{% static 'django_top_notify/css/notification-top-bar.css' %}"></head><body><divclass="notification-top-bar-container"><divclass="notification-top-bar"><p></p></div></div>...<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><scriptsrc="{% static 'django_top_notify/js/notification-top-bar.js' %}"></script><script>$(function(){consturl="{% url 'django_top_notify:latest_system_notification' %}";get_latest_system_notification(url);})</script></body>
Package: django-topology
Geometry and  Topology utilitariesDocumentationThe full documentation is athttps://django-topology.readthedocs.io.QuickstartInstall Django Topology:pip install django-topologyAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'topology.apps.TopologyConfig',...)Add Django Topology’s URL patterns:fromtopologyimporturlsastopology_urlsurlpatterns=[...url(r'^',include(topology_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-06-26)First release on PyPI.
Package: django-tor
django-torRun your django website on tor using django_tor.It doesn’t interfere with other tor processes on your computer, so you can use the Tor Browser or the system tor on their own.Disclaimer:-Use it only for educational purpose.FeaturesNo need root permissionMultiple instancesCompatabilityPython 3.6+ is required.Installationpipinstalldjango-torUsesset ALLOWED_HOSTS to * in settings.pyALLOWED_HOSTS = ['*']add this lines in manage.py in your django project.fromdjango_torimportrun_with_torfromdjango.core.management.commands.runserverimportCommandasrunserverifsys.argv[1]=='runserver':host,port=run_with_tor()runserver.default_port=str(port)fromdjangoTor.settingsimportALLOWED_HOSTSALLOWED_HOSTS.append(host)Run django server with noreload argument.python3manage.pyrunserver--noreloadCredit :-onionshare
Package: django-tornado-websockets
Django-tornado-websockets is a useful solution to provide an easy way to use Tornado WebSockets with a Django
application.Supported versionsSymbolMeaning:white_check_mark:Works like a charm:warning:Works even if Python X.Y is not officially supported by Django X.Y.Waiting for Django X.Y release<empty>Django X.Y is not compatible with Python X.YDjangoPython 2.7Python 3.3Python 3.4Python 3.5Python 3.6Python 3.71.8:white_check_mark::white_check_mark::white_check_mark::white_check_mark::warning::warning:1.9:white_check_mark::white_check_mark::white_check_mark::warning::warning:1.10:white_check_mark::white_check_mark::white_check_mark::warning::warning:1.11.....2.0...DocumentationDocumentation is available on Read the Docs:Stable:http://django-tornado-websockets.readthedocs.io/en/stable/Latest:http://django-tornado-websockets.readthedocs.io/en/latest/Develop:http://django-tornado-websockets.readthedocs.io/en/develop/But also on my own server:http://docs.kocal.fr/django-tornado-websockets/
Package: django-torque
The torque appThis is the django app that should be deployed in a running django server.Outside of installing the app, this should remain a black box.  The reason being
that none of the routes or uses for this should be accessed except
through theTorque MediaWiki plugin.For developers, look in the individual code files for details on the inner
workings.SeeINSTALL.mdfor installation instructions.Django Commandstorque ships commandsremove_unattachedWhenever loading up a new collection, there may be changes to the form of the data
as the collection evolves.  Because it may be uploaded in mistake, nothing is deleted
from the database to ensure that no unintentional data loss occurs.  However, admins
may want to remove that data to reflect the upgrades in the data.remove_unattachedremoves those items.  Each field/document that gets uploaded will
be marked asattached.  If there are edits associated with a field or document, then
the--forcedargument is required.Removing attachment filesAs a system runs, old FileField files can hang around on the hard drive.  Those
are usually uploaded attachments and templates.  This can start to take up
too much space.  To remove, one was is to usehttps://github.com/akolpakov/django-unused-media:$ pipenv install django-unused-mediaAdd'django_unused_media'to your INSTALLED_APPS and then run:$ pipenv run python ./manage.py cleanup_unused_media
Package: django-torrent-stream
Wraps the Torrent Streamhttp://torrentstream.org/InstallationInstall astable version:pip install django-torrent-streamOr install an alpha version:pip install -e git://github.com/adw0rd/django-torrent-stream.git#egg=torrent_streamAdd tosettings.py:INSTALLED_APPS = (
    ...
    'torrent_stream'
)

TORRENT_STREAM_AFFILIATE_KEY = "<HASH>"
TORRENT_STREAM_ZONE_ID = <DIGIT>

# You can specify size of player
TORRENT_STREAM_PLAYER = {
    'width': '650px',
    'height': '342px',
}TheseKEYandIDyou can get on a pagehttp://acestream.net/affiliate/Add tourls.py:urlpatterns += patterns(
    ...
    url(r'^ts/', include('torrent_stream.urls'))
)For inclusion thetorrent_stream.views. Remember, you can change the prefixr'ts/'on anything.UsageFor example, you have a model Torrent:class Torrent(models.Model):
    name = models.CharField(max_length=300, blank=True)
    content = models.FileField(upload_to="torrents/torrents", blank=True)You can display the button, when clicked, will be available to the player:{% load torrent_stream %}
{% torrent_stream_button torrent.filename %}Result:Or you can display a player at once:{% load torrent_stream %}
{% torrent_stream_player torrent.filename %}How to get CONTENT_IDSometimes you need to getCONTENT_ID, you can do so:from app.models import Torrent
from torrent_stream.helpers import get_content_id

torrent_obj = Torrent.objects.get(pk=42)

# Enough to transmit the content of the torrent file
content_id = get_content_id(torrent_obj.content.read())

# Or you can also pass the name of the torrent, and the duration to display the data in the player
content_id = get_content_id(torrent_obj.content.read(), torrent_obj.name, duration_in_seconds)
Package: django-tortoise
This python package is the simplest way to use Tortoise ORM in an existing (maybe not)
Django project that uses sqlite or PostgreSQL databasesFeaturesSaving all Django ORM advantages (migrations - the biggest one)Monkey patching existing Django models with generated on-the-fly Tortoise ORM modelsGenerated Tortoise ORM models have the same behavior as Django models (fields behavior)Support all Django models fields and validators added to them (except FileFiled, FilePathField, ImageField)Support default database only (DATABASES[‘default’] from the setting.py)You can use Django models or Tortoise ORM models when you want (use Django models when it’s more suitable than usage of Tortoise ORM models)There are enough limitations that are not described here, so most likely some thing is not supported (pre-alpha release =)Easy to use - just one line of code… Okay, two ;)QuickstartInstall django-tortoise:pip install django-tortoiseModify the asgi.py in the main Django project folder:importosfromdjango.core.asgiimportget_asgi_applicationfromdjango_tortoiseimportget_boosted_asgi_application# first lineos.environ.setdefault('DJANGO_SETTINGS_MODULE','proj.settings')application=get_asgi_application()# get_boosted_asgi_application function monkey patch all registered apps models;# each model will has abjects attribute (the objects attribute was not modified),# which is a Tortoise model actuallyapplication=get_boosted_asgi_application(application)# second lineNow you can use all valid Tortoise ORM queries via <model>.abjects attribute:awaitModelA.abjects.get(id=id)Running Tests$ tox
Package: django-to-sqlserver-description
0.1.1根据django 的 model 自动生成sqlserver的列说明0.1.2增加了数据表的说明0.1.6修复了Linux的路径错误0.1.8增加了所有的自定义model生成SQlserver描述
使用方式
from django_to_sqlserver_description import update_ms_description
update_ms_description("django_core")
#django_core是主程序目录名称
Package: django-tota11y
Easy to install Django app fortota11y- an accessibility visualization toolkit by Khan Academy (http://khan.github.io/tota11y/).UsageInstall django-tota11y:pip install git+git://github.com/hiisi13/django-tota11y.gitAddtota11yto INSTALLED_APPSAddtota11y.middleware.Tota11yMiddlewareto MIDDLEWARE_CLASSESTODOPatch settings to automatically include middleware
Package: django-totd
Tip of the Day (totd)A Django application that allows you to create tips or hints to be displayed at the top of specific pages on your website. This app allows you to define tips in the Django Admin, assign them to specific pages, and give a date range in which they should be displayed.InstallationInstall the Django Tip of the Day package:pip install django-totdSettingsTotd requires the Django Sites application.Adddjango.contrib.sitesandtotdto your INSTALLED_APPS:INSTALLED_APPS = [
    ...
    'django.contrib.sites'
    `totd',
]Add thetipsContext Processor:TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                ...
                "totd.context_processors.tips",
            ]
        },
    }
]TemplatesTotd works a lot like the Django Messages framework, you should add it to the top of the content portion of your base template so that it can be used in any page extending that template. The URL path of the request will be used to decide which Tip to show.Add the following snippet to your base template:{% if tip %}
<div class="alerts">
    <div class="alert {{ tip.tags }}"><strong>{% trans "Tip:" %} </strong>{{ tip.text|safe }}</div>
</div>
{% endif %}
Package: django-tours
django-toursDjango app to display tours withshepherdjsInstalationpipinstalldjango-toursUseAdd to installed applications# settings.pyINSTALLED_APPS=[# ...'tours',# ...]Optional configuration:If you want to set default variables, you can add the following in your settings.py file:# settings.pyDEFAULT_SHEPHERD_JS='https://cdn.jsdelivr.net/npm/shepherd.js@latest/dist/js/shepherd.min.js'DEFAULT_SHEPHERD_CSS='https://cdn.jsdelivr.net/npm/shepherd.js@latest/dist/css/shepherd.css'Add the URLsurlpatterns=[# ...path('tours/',include('tours.urls')),# ...]Run the migrationspythonmanage.pymigrateLoad tours into the template{%loadtours%}{%load_toursrequest%}LicenceThis project is licensed under the MIT License. SeeLICENSEfile for details.Proyect StatusThis project is in Production/Stable ✔Contribution 💗If you find value in this project and would like to show your support, please consider making a donation via PayPal:Donate on PayPalYour generosity helps us to continue improving and maintaining this project. We appreciate every contribution, however small. Thanks for being part of our community!
Package: django-toyo-auth
Django Toyo Auth"Django Toyo Auth" offers providers of Toyo University Accounts(@toyo.jp) and INIAD Accounts(@iniad.org) fordjango-allauthInstallationInstall Packagepipinstalldjango-toyo-authsettings.pyINSTALLED_APPS=[...'django.contrib.auth','django.contrib.messages','django.contrib.sites','allauth','allauth.account','allauth.socialaccount','django_toyo_auth','django_toyo_auth.providers.iniad',# INIAD Account'django_toyo_auth.providers.toyo',# Toyo Account...]SITE_ID=1# Provider specific settingsSOCIALACCOUNT_PROVIDERS={'iniad':{# for INIAD Account'SCOPE':['profile','email',],'AUTH_PARAMS':{'access_type':'online',},},'toyo':{# for Toyo Account'SCOPE':['profile','email',],'AUTH_PARAMS':{'access_type':'online',},},}urls.pyurlpatterns=[...path('accounts/',include('allauth.urls')),...]Classesdjango_toyo_auth.models.AbstractUserUser class with student_id, entry_year, is_student, is_toyo_member, is_iniad_memberAttributesstudent_identry_yearis_studentis_toyo_memberis_iniad_membergradedjango_toyo_auth.models.UUIDAbstractUserInherits all attributes and methods fromAbstractUser,
but also primary_key is UUIDAttributesuuiddjango_toyo_auth.admin.ToyoUserAdminModelAdmin class forAbstractUser.
It offers user-friendly admin pages.django_toyo_auth.admin.UUIDToyoUserAdminModelAdmin class forUUIDAbstractUser.
It offers user-friendly admin pages.DetailsIt offers only providers and custom models for django-allauth.
Please seedjango-allauth documentsfor detailRequirementsDjangodjango-allauthLicenseMIT
Package: django-tqdm
Fast, Extensible Progress Meter (tqdm) For Django.UsetqdminDjangomanagement commands seamlessly.It provides simple universal commands for Django management command to output
text using standard command functions and tqdm.Only currently supported versions of Django and Python are supported.Usagefromdjango_tqdmimportBaseCommandfromtimeimportsleepclassCommand(BaseCommand):defhandle(self,*args,**options):# Output directlyself.error("Error")self.info("Info")# Output through tqdmt=self.tqdm(total=50)forxinrange(50):sleep(0.03)t.update(1)ifx==10:t.info("X = 10")ifx==20:t.error("X = 20")Advanced:info(text,ending="\n",fatal=False)error(text,ending="\n",fatal=False)write(text,ending="\n",fatal=False,error=False)If you setfataltoTrueit will terminate the command after printing the message.For documentation on tqdm seetqdm.ComparisonIn django-tqdm:self.info("info")self.error("error")In vanilla Django:self.stdout.write("info")self.stderr.write("error")DemosDemo 1 - Simple usageself.info("info")self.error("error")Demo 2 - tqdm usaget=self.tqdm(total=50)forxinrange(50):sleep(0.02)t.update(1)ifx==10:t.info("info")ifx==40:t.error("error")Demo 3 - Vanilla tqdm with default settings for comparisont=tqdm(total=50)forxinrange(50):sleep(0.02)t.update(1)ifx==25:t.write("info")ifx==40:t.write("error",file=sys.stderr)Developer documentationReaddeveloper documentation.
Package: django-trace
django_tracedjango_trace is a django app that monitors your web app and your server resources and audits logins and web requests
Each of these operations can be disabled and they are all secureHow to install:pip install django_traceConfiguration:in your settings.py, under INSTALLED_APPS, add 'django_trace'add 'django_trace.middleware.MonitorMiddleware' to your MIDDLEWARE_CLASSES (for django<1.10) or MIDDLEWARE (for django >= 1.10)_inside your settings.pymigrate using these commandspython manage.py makemigrations django_trace
python manage.py migrateoptionally you can configure the options for django_trace by adding DJANGO_TRACE to your settings.py.Here is an optional configuration that you can put in your settings.pyEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'noreply@mycompany.com'
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 587
EMAIL_USE_TLS = True

DJANGO_TRACE = {
    "WARNING_EMAILS": ["me@mycompany.com"],
    "MEMORY_THRESHOLD": 85,
    "DISK_THRESHOLD": 85,
    "PATH_FILTER": [],
    "MAX_LOG_COUNT": 10000,
    "ONLY_TRACE_LOGGED_IN_USERS": True
    }By default, ONLY_TRACE_LOGGED_IN_USERS is True which means you only record web requests for logged in users.To see who is logged in or out of the system, see the admin page which is /admin/django_trace/audit.
To see all the http activities, see the admin page /admin/django_trace/logIf there are urls that you do not wish to monitor, you can tiler them out using a list of regex in PATH_FILTER.
By default, the system keeps 10000 records in the logs which can be modified by adjusting MAX_LOG_COUNT.Sending alerts when resources are running low:"WARNING_EMAILS" can be used to inform you when your server is running low on memory or disk usage. In order to use that, you put the emails of the people whom need to be informed in the WARNING_EMAILS list.
MEMORY_THRESHOLD and DISK_THRESHOLD have a 85% default but you can adjust them.Then, you must run the commandpython manage.py check_resourcesin your cron job to check the state of your server periodically.
There is a quiet period set to 1 day so if one of the resources is running low and an email is sent, the check will abort withing the next day. If you want to change the quiet period from the default 1 day, you can use the option QUIET_TIME_MINUTES within DJANGO_TRACE.Also, the host name is automatically determined to be included in the email. If you want to overwrite it, use the HOST option.If you have any questions or request, please feel free to contact the author or post it on github.
Package: django-tracer
django-tracerGenerate a UUID for all requests to Django to be used in logging and error reporting for traceability.Why?Why would you want to use this silly little thing? Well in a containerized, orchestrated, microservice world with centralized logging it's often hard to figure out where things have gone wrong.This little middleware adds a UUID to the normal Django request object which you can use to add to add to things like:All of your log messagesError reports to Sentry/Rollbar/etcPass along to other internal servicesAlong with generating and attaching a UUID to each request, the middleware also automatically adds the UUID to the response headers asX-Request-IDso anyone consuming your responses, say as an API, can use that as a reference point for reporting errors back to you.InstallationFirst you need to install it via pip:pipinstalldjango-tracerThen just addtracertoINSTALLED_APPSin your settings.Then addtracer.middleware.RequestIDto the top of yourMIDDLEWAREsettings.Usage with standard loggingimportloggingfromdjango.httpimportHttpResponselogger=logging.getLogger(__name__)defsome_view(request):""" simple log example """logger.info("Whee!",extra={'request_id':request.id})returnHttpResponse("example content")Other ways to use this Request IDThere are several other places you may consider wanting to use the ID to improve traceability:Pass it as an argument to any Celery tasks you generate so there is a clear path between the incoming request and the tasks that were generated from itPass it as a header or argument to other internal APIs or servicesAttach it to a boundstructlogobject so it is always included in your log outputThanks!Special thanks toRolf Håvard Blindheimfor graciously turning over the namedjango-tracerto us to be able to use it for this project.Need help?REVSYScan help with your Python, Django, and infrastructure projects. If you have a question about this project, please open a GitHub issue. If you love us and want to keep track of our goings-on, here's where you can find us online:
Package: django-traces
A reusable app to track view hits.InstallationTo get the latest stable release from PyPi$pipinstalldjango-tracesTo get the latest commit from GitHub$pipinstall-egit+git://github.com/bitmazk/django-traces.git#egg=tracesAddtracesto yourINSTALLED_APPSINSTALLED_APPS=(...,'traces',)Add thetracesURLs to yoururls.pyurlpatterns=patterns('',...url(r'^traces/',include('traces.urls')),)Don’t forget to migrate your database./manage.pymigratetracesUsageIf you want to track a certain view just add our middleware:MIDDLEWARE_CLASSES = (
    ...
    'traces.middleware.TracesMiddleware',
)…and add the view name/url name to the setting TRACED_VIEWS. If you have
added a view like this:url(r'^$', TemplateView.as_view(template_name='test.html'), name='test_view'),…your setting should look like:TRACED_VIEWS = ['test_view', ]The app will now track all visits to this view.Template tagsget_view_hitsTo get the current amount of requests for this view:{% load traces_tags %}
{% get_view_hits as hits %}
Hits: {{ hits }}You can also provide the view name to get any view hits:{% load traces_tags %}
{% get_view_hits 'view_name' as hits %}
Hits: {{ hits }}

{% get_view_hits 'model_view_name' object as model_view_hits %}
Hits: {{ model_view_hits }}SettingsTRACED_VIEWSDefault: []List all view names to track.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your fork$mkvirtualenv-ppython2.7django-traces$pythonsetup.pyinstall$pipinstall-rdev_requirements.txt$gitco-bfeature_branchmaster# Implement your feature and tests$gitadd.&&gitcommit$gitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django-trackable
Django-trackableattempts to be a reusable Django application that provides
infrastructure to easily implement the functionality required to capture
arbitrary tracking data out-of-band. This documentation assumes a basic
familiarity withDjangoand theCelerypackage. For usage and installation
instructions, please review the documentation.Release notes0.3.7Bug fixes and migration from carrot -> kombu0.3.6Various bug fixes backported from development0.3.5Correcting stupidity in trackable.views.track_object (proper handling of AJAX-call)0.3.2 - 0.3.4Fixing setuptools configuration to properly include templates and fixtures.0.3.1Renaming trackable.views.trackable_redirect and enabling support for AJAX requests.Bug fix (trackable.management.commands.convert_tracking_data)0.3.0Creating extensible message backend (currently supports carrot)Refactoring message/messaging infrastructure
Package: django-track-affiliate
diddemo-track-affiliateDjango track affiliate is a Django app that allows you to manage affiliate programmesQuick start:Ensure you have the following packages installedpip install pyyaml ua-parser user-agent django-user-agent geoip2Add "affiliate" and "django_user_agent" to your INSTALLED_APPS setting like this.INSTALLED_APPS = [
...
'django_user_agent',
'django_sus',
]Add 'django_user_agents.middleware.UserAgentMiddleware', to middlewareMIDDLEWARE = [...
'django_user_agents.middleware.UserAgentMiddleware',
...]Run "python manage.py makemigrations" to create the models.Run "python manage.py migrate" to migrate your new modelsAdd the following decorator to your main url i.e. home. This will create the necessary AffiliateTracker object against a session keyfrom affiliate.decorators import affiliate_tracker@method_decorator(affiliate_tracker, name='dispatch')
class HomeView(TemplateView):template_name = "main/index.html"call the AFCreate class in your sign up viewfrom affiliate.manager import AFCreate
def sign_up(request):...
   
#add this before calling login()
session_key = self.request.session.session_key
            
login(self.request, user)

#add after calling login()
AFCreate(request, session_key = session_key, user = user)

...