Saravanan666/pypi-org huggingface dataset:
Package: dj-test-queries
Extension of assertNumQueries that can record queries that were executed and show the differences in future runs.DocumentationThe full documentation is athttps://dj-test-queries.readthedocs.io.QuickstartInstalldj-test-queries:pipinstalldj-test-queriesApplyNumQueriesMixinto your test and useassertNumQueriesas you would normally do:fromtest_queriesimportNumQueriesMixinclassXYZTests(NumQueriesMixin,TestCase):deftest_xyz(self):withself.assertNumQueries(3):xyz()Generating SQL log recordsRun the tests withTEST_QUERIES_REWRITE_SQLLOGSenvironment variable to generate sqllog files:TEST_QUERIES_REWRITE_SQLLOGS="true"manage.pytestFiles liketest_views.XYZTests.test_xyz.sqllogwill appear insqllogdirectory next to yourtest_views.pyfile.If you will run the test next time and the queries will differ from previous, the test will print out output detailing the change with stacktrace from where the query was executed.
You can also enlist the*.sqllogfiles to your repository to see the changes.If the tests are executed without theTEST_QUERIES_REWRITE_SQLLOGSenvironment variable, the logs are created to files named liketest_views.XYZTests.test_xyz.sqllogto make possible to compare the difference.Running 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.2.2 (2023-08-26)Real fix for DDT 3.8.10.2.1 (2023-08-24)Remove DDT version requirements0.2.0 (2023-08-15)Fixes for new version of DDT (tested in 3.8.1 - 4.2.0)Automatic testing0.1.0 (2023-04-21)First release on PyPI.
Package: dj-tiny-api
# dj-tiny-apiA tiny toolkit to implement HTTP APIs using Django.Basic Usage===========# in views.pyfrom dj_tiny_api import Endpoint@Endpoint(url=r'^api/v1/foo/?$',methods=['GET', 'POST'],)def foo_view()return {'foo': 'bar'}# this will return response with body{"data": {"foo": "bar"}, "error": null}
Package: djt-nvu
djt_nvuAdd a panel todjango-debug-toolbarfor checking your HTML against a validator.Just installdjt-nvu...python3-mpipinstalldjt-nvu... and add "djt_nvu.panel.W3ValidatorPanel" to your settingsDEBUG_TOOLBAR_PANELS.
By default,djt_nvuchecks against "https://html5.validator.nu/" but you can change it by adding a settingDJT_NVU_URL.# django-debug-toolbarDEBUG_TOOLBAR_PANELS=["debug_toolbar.panels.versions.VersionsPanel","debug_toolbar.panels.timer.TimerPanel","djt_nvu.panel.W3ValidatorPanel","debug_toolbar.panels.settings.SettingsPanel","debug_toolbar.panels.profiling.ProfilingPanel","debug_toolbar.panels.headers.HeadersPanel","debug_toolbar.panels.request.RequestPanel","debug_toolbar.panels.sql.SQLPanel","debug_toolbar.panels.templates.TemplatesPanel","debug_toolbar.panels.staticfiles.StaticFilesPanel","debug_toolbar.panels.cache.CachePanel","debug_toolbar.panels.signals.SignalsPanel","debug_toolbar.panels.redirects.RedirectsPanel",]DJT_NVU_URL="https://html5.validator.nu/"
Package: djtodo-cli
djtodo-clidjtodo-cli is a CLI todo application.InstallationUse the package managerpipto install djtodo-cli.pipinstalldjtodo-cliUsagedjtodo add <task>add taskdjtodo listprint list of taskdjtodo remove <number>remove taskdjtodo done <number>mark task as donedjtdo search <task>search for the taskContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: djt-og
djt_ogAdd a panel todjango-debug-toolbarthat displays OpenGraph metadata found in your HTML page.Just installdjt-djt_og...python3-mpipinstalldjt-djt_og... and add "djt_og.panel.OpenGraphPanel" to your settingsDEBUG_TOOLBAR_PANELS.# django-debug-toolbarDEBUG_TOOLBAR_PANELS=["debug_toolbar.panels.versions.VersionsPanel","debug_toolbar.panels.timer.TimerPanel","djt_og.panel.OpenGraphPanel","debug_toolbar.panels.settings.SettingsPanel","debug_toolbar.panels.profiling.ProfilingPanel","debug_toolbar.panels.headers.HeadersPanel","debug_toolbar.panels.request.RequestPanel","debug_toolbar.panels.sql.SQLPanel","debug_toolbar.panels.templates.TemplatesPanel","debug_toolbar.panels.staticfiles.StaticFilesPanel","debug_toolbar.panels.cache.CachePanel","debug_toolbar.panels.signals.SignalsPanel","debug_toolbar.panels.redirects.RedirectsPanel",]
Package: djtools
DJ ToolsPlease see thedocsfor tutorials, how-to guides, conceptual guides, and references!Release Plan2.7.14Stability issues with requests to the search endpoint of the Spotify APIMake Spotify API calls asynchronous2.8.0Create graphic user interface for djtoolsDerive boolean algebra expressions that generate a given playlistImprove Reddit submission title parsing in order to improve precision and recall of Spotify API search resultsContributionPlease see theCONTRIBUTING
Package: dj-translate
A simple Django app to automatically translate the pot (.po) files generated by django’s makemessages command
using google translate.Installation:pipinstalldj-translateAdd'autotranslate'to yourINSTALLED_APPSsetting.INSTALLED_APPS=(...'autotranslate',)Quickstart:pythonmanage.pymakemessages--no-wrap--no-location--no-obsoletepythonmanage.pytranslate_messagesThe command finds all the generated pot (.po) files under the locale paths (LOCALE_PATHS) specified in django project settings, and translates them automatically.Options:-f,--set-fuzzy: Set the ‘fuzzy’ flag on autotranslated entries-l,--locale'locale': Only translate the specified locales-u,--untranslated: Only translate the untranslated messagespythonmanage.pytranslate_messages-l'de'-l'es'Settings:Use a google translation - Web scrapper (Not recomm):AUTOTRANSLATE_TRANSLATOR_SERVICE='autotranslate.services.GoSlateTranslatorService'Use a Google API based Translation Service:# default: 'autotranslate.services.GoSlateTranslatorService'
# pip install google-api-python-clientAUTOTRANSLATE_TRANSLATOR_SERVICE='autotranslate.services.GoogleAPITranslatorService'GOOGLE_TRANSLATE_KEY='<google-api-key>'Edit translation strings:Add an URL entry to your project’s urls.py, for example:fromdjango.confimportsettingsif'autotranslate'insettings.INSTALLED_APPS:urlpatterns+=[url(r'^autotranslate/',include('autotranslate.urls')),]Login as admin:Nevigateto:http://127.0.0.1:8000/autotranslate
Package: djtranslationchecker
Checks your Django message files for missing / fuzzy translationsUsageAdddjtranslationcheckerto yourINSTALLED_APPS, then:$ python manage.py translationcheckerThis will check all.pofiles in subdirectories of yourINSTALLED_APPS.
If any of them contain missing translations or fuzzy translations, the command will exit with an error.
Package: dj-triggers
django-triggersdjango-triggersis intended for implementing event-based business logic configurable through the Django admin site.Installpipinstalldj-triggersINSTALLED_APPS=[..."polymorphic","triggers",...]PrerequisitesCelery is required to be setup in your project.QuickstartLet's consider a simple tasks app with a modelTaskand we want to email a user when a task is completed.Add event, action and condition models into your app's models.pyBy doing this, we separate the development of the trigger components from their configuration within the Django admin panel. This ensures a more modular and manageable approach to building and configuring triggers.The full code example is available intests directory.fromdjango.dispatchimportreceiver,Signalfromdjango.contrib.auth.modelsimportUserfromdjango.dbimportmodels,transactionfromtriggers.modelsimportAction,Event# Our domain modelclassTask(models.Model):user=models.ForeignKey(User,on_delete=models.CASCADE)name=models.CharField(max_length=128)is_completed=models.BooleanField(default=False,db_index=True,editable=False)is_important=models.BooleanField(default=False)completed=Signal()defcomplete(self):ifnotself.is_completed:self.is_completed=Trueself.save()transaction.on_commit(lambda:self.completed.send(sender=self.__class__,task=self))# At first, implement an Event which will trigger the notification.classTaskCompletedEvent(Event):# By setting the following `important_only` field through the Django admin site# we can configure what tasks (all or important only) we want to notify the users about.important_only=models.BooleanField(default=False,help_text='Fire the event for important tasks only if checked.',)defshould_be_fired(self,**kwargs)->bool:ifself.important_only:returnTask.objects.filter(id=kwargs['task_id'],is_important=True).exists()returnTrue# Then we need to fire `TaskCompletedEvent` when a task is marked as completed.@receiver(Task.completed)defon_task_completed(sender,task:Task,**kwargs):foreventinTaskCompletedEvent.objects.all():transaction.on_commit(lambda:event.fire_single(task.user_id,task_id=task.id))# At the end, create an Action implementing email notification.classSendEmailAction(Action):subject=models.CharField(max_length=256)message=models.TextField()defperform(self,user:User,context:Dict[str,Any]):user.email_user(self.subject,self.message)Makemigrations and migratepythonmanage.pymakemigrations
pythonmanage.pymigrateAdd trigger on the Django admin siteDon't forget to enable it :)Use the trigger!task=Task.objects.get(id=...)# Get your tasktask.complete()# And mark it as completedYou may also trigger it manually from the Django admin site if you're checking the test app example.DevelopmentRun a django-admin command, e.g.makemigrationspoetryrunpython-mdjangomakemigrations--settings=tests.app.settingsRun isortpoetryrunisorttriggerstestsRun flake8poetryrunflake8triggerstestsRun mypypoetryrunmypytriggerstestsRun pytestpoetryrunpytest
Package: dj-twenty-six.github.io
DJ26 WEB APPdocker buildhttps://hub.docker.com/_/httpd$dockerbuild-tmy-apache2.
$sudodockerimages
REPOSITORYTAGIMAGEIDCREATEDSIZE
my-apache2lateste133bdde4db82minutesago173MBdocker run$sudodockerrun-dit--namemy-webapp-p8080:80my-apache2
$sudodockerps
CONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
c52058cd5124my-apache2"httpd-foreground"6secondsagoUp5seconds0.0.0.0:8080->80/tcp,:::8080->80/tcpmy-webappinto docker$sudodockerexec-itmy-webappbash

root@c52058cd5124:/usr/local/apache2#ls-l
total40drwxr-xr-x2rootroot4096Oct1120:23bin
drwxr-xr-x2rootroot4096Oct1120:23build
drwxr-xr-x2rootroot4096Oct1120:23cgi-bin
drwxr-xr-x4rootroot4096Oct1120:23conf
drwxr-xr-x3rootroot4096Oct1120:23error
drwxr-xr-x1rootroot4096Oct1821:12htdocs
drwxr-xr-x3rootroot4096Oct1120:23icons
drwxr-xr-x2rootroot4096Oct1120:23include
drwxr-xr-x1rootroot4096Oct1821:13logs
drwxr-xr-x2rootroot4096Oct1120:23modules

root@c52058cd5124:/usr/local/apache2#cdhtdocs/
root@c52058cd5124:/usr/local/apache2/htdocs#ls-l
total96-rw-r--r--1rootroot49Oct1821:12Dockerfile
-rw-r--r--1rootroot17128Oct192023LICENSE.txt
-rw-r--r--1rootroot84Oct192023LICENSE.txt:Zone.Identifier
-rw-r--r--1rootroot170Oct1821:11README.md
-rw-r--r--1rootroot1344Oct192023README.txt
-rw-r--r--1rootroot84Oct192023README.txt:Zone.Identifier
drwxr-xr-x6rootroot4096Oct1820:20assets
-rw-r--r--1rootroot18398Oct192023elements.html
-rw-r--r--1rootroot84Oct192023elements.html:Zone.Identifier
-rw-r--r--1rootroot5045Oct192023generic.html
-rw-r--r--1rootroot84Oct192023generic.html:Zone.Identifier
drwxr-xr-x2rootroot4096Oct1820:20images
-rw-r--r--1rootroot7195Oct1821:04index.html
-rw-r--r--1rootroot84Oct192023index.html:Zone.Identifier
root@c52058cd5124:/usr/local/apache2/htdocs#how2prhttps://oss.cashmallow.com/team/how2pr/
Package: dj-twilio-sms
Twilio SMS Integration for DjangoThis is fork ofnigma/django-twilio-sms(Filip Wasilewski en[at]ig[dot]ma) as original package has stopped maintenance.Django 1.10 support, migrations, timezone improvements.Used for SMS messages in SiteLedger project.QuickstartInstalldj-twilio-smsusingpip.Adddj_twilio_smstoINSTALLED_APPSand migrate (manage.py migrate).Add the following url to your urlconf:url(r"^messaging/",include("dj_twilio_sms.urls")),this will receive confirmation callbacks for any SMS message
that you send usingutils.send_smsalso will receive incoming messages.Configure Twilio callback to send notifications to the above view’s url. (ex:/messaging/reply/for inbound messages)Configure settings:TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER - copy
credentials from the Twilio panel.TWILIO_CALLBACK_USE_HTTPS - use https or not for delivery confirmation
callback urls.TWILIO_CALLBACK_DOMAIN - optionally set domain name or IP of your site
(otherwise the server name will be extracted from the request info).TWILIO_DRY_MODE - set if you want to run in test mode.Django Version SupportDjango 1.8, 1.9 and 1.10Python 2.7 and 3.5It should work with Django 1.6 and 1.7, but you need to downgrade django-rest-framework for these versions.Licensedjango-twilio-smsanddj-twilio-smsis released under the MIT license.Other ResourcesGitHub repository -https://github.com/mastizada/dj-twilio-smsPyPi Package site -https://pypi.python.org/pypi/dj-twilio-sms
Package: dj-two-factor-social-auth
App connectingdjango-two-factor-authandsocial-app-django. If user authenticates through social auth, he will be enforced to go through 2FA (if he has 2FA enabled).DocumentationThe full documentation is athttps://dj-2fa-social-auth.readthedocs.io.QuickstartWe expect, that you have already installed and configureddjango-two-factor-authandsocial-app-djangoaccording to their documentation.Install Django two factor auth for Django social auth:pip install dj-2fa-social-authAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(..."two_factor","social_django","social_2fa",...)Add Django two factor auth for Django social auth’s URL patterns:fromdjango.urlsimportpathurlpatterns=[...path("",include("social_2fa.urls")),...]Add social_2fa to your social pipeline insettings.py:SOCIAL_AUTH_PIPELINE=(..."social_2fa.social_pipeline.two_factor_auth",)Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lHistory0.1.2 (2023-03-09)Try to rename package to be compatible with poetry (https://github.com/python-poetry/poetry/issues/6996)0.1.1 (2023-03-08)Update testing and setup.py to support newest Django, Python and django-two-factor-auth0.1.0 (2022-03-21)First release on PyPI.
Package: dj-txmoney
Package for working with money and currencies with automatic rate updates.DocumentationThe full documentation is athttps://dj-txmoney.readthedocs.org.QuickstartInstall dj-txmoney:pip install dj-txmoneyThen use it in a project:import txmoneyFeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ python runtests.pyCreditsHistory0.1.0 (2016-05-26)First release on PyPI.
Package: dju-intranet
This project gives you Api for Daejeon university intranet.
Daejeon university’s web sites are sucks. So I made it.ExamplesLogin>>>importdjuintra>>>da=djuintra.DjuAgent()>>>da.login('<User ID>','<User PW>')>>># Nothing happen if logged in successfully, else raise an exception.Get Time tables>>>fortimetableinda.get_timetables(2014,2,0,'00000',0):...print(u'{0.classname}by{0.profname}{0.score}/{0.time}'.format(timetable))대학영어(1)by제임스썸머필드2/2대학영어(1)by페리2/2대학영어(1)by네드콕스2/2대학영어(1)by티머시롤랜드2/2대학영어(1)by브라이언맥컬리2/2대학영어(1)by제임스썸머필드2/2대학영어(1)by페리2/2대학영어(1)by네드콕스2/2대학영어(1)by티머시롤랜드2/2대학영어(1)by브라이언맥컬리2/2대학영어(1)by아담드레슬러2/2대학영어(1)by마이너2/2대학영어(1)by로드리고버뮤즈2/2Get Schedules>>>forscheduleinda.get_schedules():...print(u'{0.title}({0.depart}):{0.start}~{0.end}'.format(schedule))...수업일수1/3선(학사서비스팀):2014-10-0509:00:00~2014-10-0523:59:59전역복학마감일자(개강후3주내)(학사서비스팀):2014-09-1917:30:00~None휴학신청기간(학사서비스팀):2014-08-0409:00:00~2014-08-1417:30:00복학신청기간(학사서비스팀):2014-07-1409:00:00~2014-07-2517:30:00부/복수전공신청기간(학사서비스팀):2014-07-0709:00:00~2014-07-1117:30:00모의토익원서접수신청기간(외국어교육센터):2014-09-1512:00:00~2014-09-1917:00:00Get personal scorespersonal_scores=da.get_personal_scores()forsemesterinpersonal_scores.semesters:print(semester.title)forscoreinsemester.scores:print(u'{0.title}:{0.score}'.format(score))print(u'Average score:{0}'.format(personal_scores.averagescore))Course registrationcourses=[('000000','01'),('000001','02'),('010101','30'),]da.register_course(courses)Documentationhttp://dju-intranet.readthedocs.org/en/latest/
Package: djungle-rulesengine-client
djungle-rulesengine-clientA client to Djungle Studio rulesengine APITestsThis project usestoxto run the test suite:
simply run the commandtoxin the root of the repository.ReleaseThis project usestoxto release a version to PyPI.
Runtox -e release -- <env>, where<env>is an index identifier in
your~/.pypircfile.Alternatively, push a tag to themainbranch to make a release
using GitHub Actions.Usage examplesfromrulesengine.async_clientimportAsyncEngineClientfromrulesengine.clientimportEngineClientengine=EngineClient(base_url="https://example.com",token="abcde")# To push an action to the engine:engine.push_action(subject_id="sys-1",action="my-action",payload={"key":"value"})# To get a pluggable prop from the engineprop_value=engine.get_pluggable_props(subject_id="sys-1",props="my-prop")# To make a "direct" call to the enginereturn_value=engine.direct_post(subject_id="sys-1",path="/my/path/",params={"key":"value"},data={"my":"payload"})# To push an action to the engine (async client):async_engine=AsyncEngineClient(base_url="https://example.com",token="abcde")awaitasync_engine.push_action(subject_id="sys-1",action="my-action",payload={"key":"value"})MIT LicenseCopyright (c) 2023 Djungle s.r.l.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: djupiter
Djupter is a Django app that provides production-ready REST endpoints for common authentication flows.Get the package:pip install djupiterDocumentation:https://djupiter.readthedocs.io/en/latest/NoteThis package is still in early development, breaking changes might occur regularly.Quick startAdd “djupiter” and “drf_yasg” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    "drf_yasg",
    "rest_framework.authtoken",
    "djupiter",
]Fill out the following fields on your settings file:# Used for the auto-generated API docs
PROJECT_NAME = "My Project"
PROJECT_DEVELOPER_EMAIL = "developer@example.com"
PROJECT_API_VERSION = "0.0.1"

# Used for sending emails.
EMAIL_FROM = "no-reply@example.com"
## For production:
# EMAIL_HOST = os.environ.get("EMAIL_HOST")
# EMAIL_USE_TLS = int(os.environ.get("EMAIL_USE_TLS", default=0))
# EMAIL_PORT = os.environ.get("EMAIL_PORT")
# EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
# EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")

## For testing:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Use the custom Djupiter User model
AUTH_USER_MODEL = 'djupiter.User'Include the djupiter URLconf in your project urls.py like this:path('api/', include('djupiter.urls')),Runpython manage.py migrateto create the djupiter models.Visithttp://127.0.0.1:8000/api/docsfor the API documentation. Happy hacking!
Package: dj-upload-to
dj-upload-toSynopsisSmall application that simplifies naming of uploaded files.
License is MIT.InstallationYou can getdj-upload-torelease version from pypi withpip:$pipinstalldj-upload-toor development one from github:$pipinstall-egit+https://github.com/marazmiki/dj-upload-to#egg=dj-upload-urlYou’re not need include it into yourINSTALLED_APPSUsageAssumes you have model:fromdjango.dbimportmodelsfromdj_upload_toimportUploadToupload_to=UploadTo()classModel(models.Model):file=models.ImageField(upload_to=upload_to)As you see,UploadTogenerates callable object (with__call__methodfor passing intoupload_toattribute of FileField (seedjango upload_to docsfor details)When you save model with image originally namedmyphoto.JPG, filewill be saved with name such as:model/ab/cd/abcdabcd-0123-4567-8901-234567890ab.jpgwhere:modelis prefix automatically generated from model class. You can override itabis the first 2 char segment of filenamecdis the second 2 char segment of filenameabcdabcd-0123-4567-8901-234567890abautogenerated withuuidfilename.jpgis a lower cased extension taken from original fileCustomizeYou can customize behavior ofUploadTowith options in constructor:prefix: prefix of filename. Default isdj_upload_to.not_provided. IfNone, prefix will be missed. If not explicitly set, will be generated automatically based on model class namenum_seg: number of parts of segmentation. Default is2seg_size: length of segment in chars. Default is2save_name: use original name without autogeneration. Default isFalseThere are some examples:>>>model_instance=Model()>>># Disable prefix>>>UploadTo(prefix=None)(model_instance,'file.jpg')u'c0/17/c01745b4-e70b-4dd8-a5f7-76fec32fcb83.jpg'>>># Explicitly given prefix>>>UploadTo(prefix='my_files')(model_instance,'file.jpg')u'my_files/d9/a4/d9a4ef25-11b0-41bb-a543-baaac6553024.jpg'>>># Four segment and automatically generated prefix>>>UploadTo(num_seg=4)(model_instance,'file.jpg')u'model/36/52/99/f6/365299f6-8dc5-4ca2-848d-965f002a9b72.jpg'>>># Segment length is 4 chars>>>UploadTo(seg_size=4)(model_instance,'file.jpg')u'model/3142/f2ef/3142f2ef-2680-4a99-82fc-3c8d9d3179dc.jpg'>>># Save original filename>>>UploadTo(save_name=True)(model_instance,'file.jpg')u'model/file.jpg'>>># Save original filename without prefix>>>UploadTo(save_name=True,prefix=None)(model_instance,'file.jpg')u'file.jpg'ContributingIdeas, bugfixes, pull requests are welcome onGitHubCHANGELOG1.1Adddeconstruct()support1.0.2Fix sad setup.py bug1.0.1Add prefix disablingAdd changelogUpdated docs1.0.0Initial release
Package: dj-user-login-history
dj-user-login-historyA Django app which keep track of user login history.How to installpip install dj_user_login_historyUsageAddlogin_historyapp to INSTALLED_APPSINSTALLED_APPS = [
    ...
    'login_history',
    ...
]Migrate database:python manage.py migrateNow all your user's login history will be tracked to a model called LoginHistoryYou can check a user's active logins:user.active_loginsYou can addlogin_history.urlsto your project url to see an example page explaining the user login histores.For better understanding, read following code:def login_histories(request):

    if not request.user.is_authenticated:
        return HttpResponse("<h1>Please login to see your login histories</h1>")\
        
    active_logins = request.user.active_logins

    active_logins_html = ""
    for login in active_logins:
        active_logins_html += f'<li>{login.ip} - {login.date_time} - {login.user_agent}</li>'

    return HttpResponse(
    f"""
        <h1>Active Logins</h1>
        <ul>
            {active_logins_html}
        </ul>
    """
    )Use theipto grab more information directly from the Frontend instead of backend, it'll optimize performance.
There're huge JS library which do the work, use any one of them.NB: When you write your own login view, make sure you log the user in using django loginfrom django.contrib.auth import login as django_login

django_login(request, user)