Saravanan666/pypi-org huggingface dataset:
Package: django-fullname-localization
django-fullname-localizationAdd localization support for user's fullname.Installpipinstalldjango-fullname-localizationSettingspro/settings.pyINSTALLED_APPS=[...'django_fullname_localization',...]USE_FULL_NAME_INSTEAD_OF_SHORT_NAME=TrueFULL_NAME_TEMPLATE="{user.last_name}{user.first_name}"Note:At django_fullname_localization app ready step, we override AbstractUser.get_full_name method, so that all user model that inherit from AbstractUser will get a new *.get_full_name() method.Use FULL_NAME_TEMPLATE to define your fullname style.USE_FULL_NAME_INSTEAD_OF_SHORT_NAME defaults to True, so that the short name will be replaced with our full name. Mostly our full name is short enough ^_^Fullname template settingFULL_NAME_TEMPLATE default to "{user.last_name}{user.first_name}", it's our default name format ^_^.Notes:If using default User model, you can use user.first_name and user.last_name parameter to write your own template.If using customer model that has more name parts, you can using parameter {user.your_own_field}.Some application that doesn't override the default User model but keep the full name in first_name and keep the last name in last_name, so that you just set FULL_NAME_TEMPLATE="{user.first_name}".Usageapp/template/demo.html{{request.user.get_full_name}}app/views.pydefpage(request):...fullname=request.user.get_full_name()...Releasev0.2.0 2020/09/09Add license in package.Add replacing short name with full name support. It is controlled by USE_FULL_NAME_INSTEAD_OF_SHORT_NAME option in settings. USE_FULL_NAME_INSTEAD_OF_SHORT_NAME defaults to True, so that the name used in the default django's admin site topbar will be our full name.Remove first_name, last_name parameter support for FULL_NAME_TEMPLATE, for user's customized User Model may not have first_name, last_name fields.Fix documentations.v0.1.0 2020/02/29First release.
Package: django-fullstack
django-fullstackINTRODUCTION PROJECTWe have several projects that use a django-fullstack, which is very impressive and makes it easy for us to connect the frontend and backend. Next, we want to make our django-fullstack usable by many other frontend frameworks or create one that can be chosen among them. We are also continuously developing all our projects well and consistently asking our team to look for any flaws in our django-fullstack.Flexsibel: flexsibel to coding and easyeasy to build: easy to build frontend & backendsupport django 5.0: support django 5.0 and async djangodjango friendly: you can integration django and frontendFast To code: simple code and create new project fastrequirementpython >= 3.9 < 3.13django >= 3.0 < 6.0django-fullstack >= 0.1.0 < 2.0.0documentationintroductioninstallationcreate projectsetup django-fullstackcreate frontendinstall frontendrun serverstaticfilesproject to productionTHANKS FOR SUPPORThow to install django-fullstack1. install using pippip install django-fullstackor install using poetrypoetry add django-fullstackhow to create project django-fullstackcommand using django-fullstackdjango-fullstackstartprojectname-projectcommand using djangodjango-adminstartprojectname-projectsetup to setting.pyAdd tosetting.pyon your projectINSTALLED_APPS=[...''django_fullstack',]# For Setting Django FullstackDJANGO_FULLSTACK={"RENDER":{"INDEX":"index.html","URL_SSR":"http://localhost:13714","ENABLED_SSR":False,},"TEMPLATE":{"SERVER_PROTOCOL":"http","DEV_SERVER_HOST":"localhost","DEV_SERVER_PORT":5173,"WS_CLIENT_URL":"@vite/client","ASSETS_PATH":"static/dist","STATIC_URL_PREFIX":"",# add if you prefix your url stactic},"STATIC_ROOT":"static","CSRF_HEADER_NAME":"HTTP_X_XSRF_TOKEN","CSRF_COOKIE_NAME":"XSRF-TOKEN",}make your app react or vuegenerate your file react or vuedjango-fullstackcreate-appvue#use --typescript for using typescriptdjango-fullstackcreate-appreact#use --typescript for using typescriptInstall frontendthis command to install package frontend
supportnodejs v16 - v20andnpm > v9npminstall#oryarninstall#orpnpminstallrun you serverTo run the backend and frontend simultaneously, you need to run both by opening two terminals, one for Django and the other for the frontend. Once they are running, you can open your browser usinghttp://localhost:8000orhttp://127.0.0.1:8000.1. using pythonpython manage.py runserveror using pypy3pypy3-mmanage.pyrunserverrun frontendnpm run devvisit your host djangohttp://localhost:8000orhttp://127.0.0.1:8000staticfilesif you want to display image or other file in a non-conventional way react and vue, the use folowing :Image and other file<imgclassName="w-full lg:w-[60%]"src="/static/image/image.jpg"alt="bla bla"/>Production your projectbuild your frontendnpmrunbuild#oryarnrunbuild#orpnpmrunbuilddebug your django insetting.pyDEBUG=Falsemake your project to collectstaticpythonmanage.pycollectstaic#orpypy-mmanage.pycollectstaticthanks you for supportNARMADAWEBITECDJANGO INDONESIA & TEAM
Package: django-full-url
django-full-url===================Getting specific parts of an URL for the current page in Django can be quite tedious. This small package makes it easy to get parts of the URL by providing python helpers and a context processor. All the information is gathered from a RequestContext object, no error prone 'Site' config needed!Some of the URL parts you can extract:* domain* http or https* port* path* query (get parameters)There are some situations where you might want to get specific URL parts:* Add the domain name for including images on your domain in an email.* Get the full URL (protocol, domain, path and query) for sharing the page on social networks.* Get a link to same page using 'http' or 'https'.## InstallationEither install directly:`pip install -e git+https://github.com/RRMoelker/django-full-url.git#egg=django-full-url`Or add the following line to your requirements file:`-e git+https://github.com/RRMoelker/django-full-url.git#egg=django_full_url`## UsageThere are currently two ways to get the URL information. One method uses a context processor to make the different URL parts data available in all [templates](#context-processor). The second method provides helpers to get the information directly from within a view or another place where you have access to a RequestObject in the [python code](#python-code). For available parameters see [RequestGrabber](#grabber)### <a href="context-processor"></a>Context processorYou can add a context processor that will add the variable `url_parts` to all templates.The processor can be added anywhere in the `TEMPLATE_CONTEXT_PROCESSORS` list:```TEMPLATE_CONTEXT_PROCESSORS = (# ...'full_url.context_processors.UrlParts',# ...)```The `url_parts` variable is a [RequestGrabber](#grabber) object. To actually insert part of the url into the template you can do:```...{{url_parts.domain}}...```### <a href="#python-code"></a>Python codeTo get URL information in python use the [RequestGrabber](#grabber).```from full_url.grabber import RequestGrabber```Create an instance of the RequestGrabber object using:```url_parts = RequestGrabber(request)```To get a part use: `url_parts.domain()`. See [RequestGrabber](#grabber) for available URL parts.## <a name="grabber"></a>RequestGrabberSay we are looking at the following view: `http://localhost:8000/news/2014/?sort=ascending#item2`The RequestGrabber has the following functions available:* protocol: http://* domain: localhost:8000* port: 8000* path: /news/2014/* query: sort=ascending* full_url: /news/2014/?sort=ascending* absolute_uri: http://localhost:8000/news/2014/?sort=ascendingNote that we cannot get the fragment part of the URL (#item2).During normal operations a browser should never send this information so no functionality to get it is provided at this time.## RequirementsDjango(Tested with Django 1.6 and 1.7. Please let me know if it works in other versions setups)## UninstallNothing fancy here:```pip uninstall django-full-url```Encountered a bug or missing a feature? Please create a ticket to help improve this tool!
Package: django-funkymetrics
# django-funkymetricsdjango-funkymetrics is a super simple Django application for easily tracking events and submit them asynchronously to KISSmetrics using celery tasks.## FeaturesTrack app events easilySubmits analytics events asynchronously to KISSmetrics## InstallationAdd the KISSmetrics JS snippet to your project template(s).Installdjango-funkymetrics:pip install django-funkymetricsAlternatively, download the source code and manually add it to yourPYTHONPATH.Set your KISSmetrics API key:KISS_API_KEY = ‘<your_api_key>’Track events and profit.## PrerequisitesThe library assumes that Celery is installed and configured for the Django project. Tasks are automatically created for eachrecord_event.## UsageSimply importrecord_eventin your code where you want to track events, and call it as needed:from funkymetrics.events import record_event# Without properties
record_event(request, ‘downgraded’)# With properties
record_event(request, ‘upgraded plan’, {‘to_plan’: ‘Standard’})The request object is used to identify the user the event is associated with.When the request isn’t available, a user instance can be passed instead. Note that we can’t extract the anonymous KISSmetrics identifier from the user object, so it doesn’t really make sense to pass anonymous users.## Identifying usersAnonymous users are identified by their KISSmetrics anonymous ID (ie. the value of thekm_aicookie).Authenticated users are identified by their username.## Future stuffOverriding user identifiersQueue events locally and submit in batches
Package: django-funky-sheets
Django implementation of Handsontable spreadsheets for CRUD actions.Live DemoDemoInstallationInstalldjango-funky-sheets:$ pip install django-funky-sheetsAddfunky_sheetsto your INSTALLED_APPS:# settings.py

INSTALLED_APPS = [
    ...
    'funky_sheets',
    ...
]Quick StartURLDefine URLs for Create and Update views.# urls.pyfromdjango.urlsimportpathfrom.importviewsurlpatterns=[path('',views.index,name='index'),path('create/',views.CreateMovieView.as_view(),name='create'),path('update/',views.UpdateMovieView.as_view(),name='update')]ViewDefine Create and Update views which inherit fromHotViewand render the Handsontable spreadsheet based on selected model fields.# views.pyfromdjango.formsimportCheckboxSelectMultiple,CheckboxInput,DateInputfromdjango.urlsimportreverse_lazyfromfunky_sheets.formsetsimportHotViewfrom.modelsimportMovieclassCreateMovieView(HotView):# Define model to be used by the viewmodel=Movie# Define templatetemplate_name='examples/create.html'# Define custom characters/strings for checked/unchecked checkboxescheckbox_checked='yes'# default: truecheckbox_unchecked='no'# default: false# Define prefix for the formset which is constructed from Handsontable spreadsheet on submissionprefix='table'# Define success URLsuccess_url=reverse_lazy('update')# Define fields to be included as columns into the Handsontable spreadsheetfields=('id','title','director','release_date','parents_guide','imdb_rating','genre','imdb_link',)# Define extra formset factory kwargsfactory_kwargs={'widgets':{'release_date':DateInput(attrs={'type':'date'}),'genre':CheckboxSelectMultiple(),'parents_guide':CheckboxInput(),}}# Define Handsontable settings as defined in Handsontable docshot_settings={'contextMenu':'true','autoWrapRow':'true','rowHeaders':'true','contextMenu':'true','search':'true',# When value is dictionary don't wrap it in quotes'headerTooltips':{'rows':'false','columns':'true'},# When value is list don't wrap it in quotes'dropdownMenu':['remove_col','---------','make_read_only','---------','alignment']}classUpdateMovieView(CreateMovieView):template_name='examples/update.html'# Define 'update' actionaction='update'# Define 'update' buttonbutton_text='Update'Templatehot_templateusesjQuery 3.3.1andHandsontable 7.0.0.If you would like to use different versions ofjQueryandHandsontableyou should create your ownhot_templateby copying defaulthot_templatein funky_sheets/templates/hot/hot.html and loading selected versions ofjQuery,Handsontable JavaScript and CSS. Note that the compatibility with different versions is not guaranteed. You should than include your customhot_templatewhen creating templates likecreate.htmlandupdate.htmlin the examples.Define templates which includehot_templatein place where you want to render Handsontable spreadsheet.examples/create.html

...{%includehot_template%}...

examples/update.html

...{%includehot_template%}...ContributeThis is an Open Source project and any contribution is appreciated.LicenseThis project is licensed under the MIT License.
Package: django-furl
===========django-furl [WIP]===========|Version| |License| |Downloads|.. |Version| image:: https://img.shields.io/pypi/v/django-furl.svg?style=flat:target: https://pypi.python.org/pypi/django-furl:alt: Version.. |License| image:: https://img.shields.io/pypi/l/django-furl.svg?style=flat:target: https://github.com/poxip/django-furl/blob/master/LICENSE:alt: License.. |Downloads| image:: https://img.shields.io/pypi/dm/django-furl.svg:target: https://pypi.python.org/pypi/django-furl:alt: Downloads**django-furl** is a simple Django wrapper of `Furl<https://github.com/gruns/furl>`_'s API. It provides essential template tagsfor url manipulation... code-block::{% furl_add 'http://somestuff.tv/search/?q=The+Office' character='Michael Scott' year=2005 %}``http://somestuff.tv/search/?q=The+Office&character=Michael+Scott&year=2005``Installation------------::$ pip install django-furlQuick Start-----------1. Add "django_furl" to your INSTALLED_APPS::INSTALLED_APPS = [...'django_furl',]2. Load "furl_tags" in your template::{% load furl_tags %}Basic Usage-----------.. code-block::{% furl_add 'http://somestuff.tv/search/?q=The+Office' character='Michael Scott' year=2005 %}``http://somestuff.tv/search/?q=The+Office&character=Michael+Scott&year=2005``.. code-block::{% furl_update 'http://somestuff.tv/search/?page=3' q='The Big Bang Theory' character='Sheldon Cooper' page=1 %}``http://somestuff.tv/search/?page=1&q=The+Big+Bang+Theory&character=Sheldon+Cooper``.. code-block::{% furl_add 'http://somestuff.tv/search/?facets=Type.Other' facets='Category.Drama' q='True Detective' %}``http://somestuff.tv/search/?facets=Type.Other&facets=Category.Drama&q=True+Detective``.. code-block::{% furl_del 'http://somestuff.tv/search/?facets=Type.Other&facets=Category.Other&q=w' 'facets' 'q' %}``http://somestuff.tv/search/``
Package: django-future-staticfiles
Backport ofDjangostaticfiles storagesfrom Django 1.7+ to earlier
Django 1.6OverviewQuick and dirty backport of the latest staticfiles storages from the latest
Django to be used with Django 1.6. Tests are backported as well to ensure
everything works, but butchered to remove post-Django 1.6 tests.RequirementsRequires Django 1.6+ and as suchPython2.6+ as wellInstallationSimply usepipto install:$ pip install django-future-staticfilesUsageThe storages should be drop in replacements, so they can be used insettings.pyforSTATICFILES_STORAGE:$ STATICFILES_STORAGE='django_future_staticfiles.storage.CachedStaticFilesStorage'ContributingContributions are welcome, just create a pull request or issue on theGitHub repositoryfor the project.
Package: django-future-tasks
Django Future TasksA library to create periodic, cron-like tasks or single tasks with a specified execution/start time and schedule it to run in the future.InstallationInstall using pip:pipinstalldjango-future-tasksAdd the library to your INSTALLED_APPS list.INSTALLED_APPS=[...'django_future_tasks',...]Configure the task types in yoursettings.pyaccording to your needs:# within settings.pyFUTURE_TASK_TYPE_ONE="task_one"FUTURE_TASK_TYPE_TWO="task_two"FUTURE_TASK_TYPES=((FUTURE_TASK_TYPE_ONE,_("Task 1")),(FUTURE_TASK_TYPE_TWO,_("Task 2")),)UsageTo receive a signal, register a receiver function using the signalfuture_task_signaland the task type as sender.
Theinstanceis the FutureTask object.@receiver(future_task_signal,sender=intern(settings.FUTURE_TASK_TYPE_ONE))defmy_function(sender,instance,**kwargs):# do somethingCommand for starting the future task processingpythonmanage.pyprocess_future_tasksCommand for starting the periodic future task processingpythonmanage.pypopulate_periodic_future_tasksDjango Compatibility MatrixIf your project uses an older verison of Django or Django Rest Framework, you can choose an older version of this project.This ProjectPython VersionDjango Version1.1.*3.8, 3.9, 3.10, 3.113.2, 4.1, 4.21.0.*3.8, 3.9, 3.10, 3.113.2, 4.0, 4.1
Package: django-future-url
Migration tool for old style “url” tags in Django 1.3 & 1.4.
Support for Django 1.5 in next version.“In Django 1.5, the behavior of the url template tag will change”If you use old style url tags in django 1.4 you will see that:
“DeprecationWarning: The syntax for the url template tag is changing.
Load theurltag from thefuturetag library to start using the
new behavior.”The new library also drops support for the comma syntax
for separating arguments to the url template tag.In Django 1.5, the old behavior will be replaced with the behavior
provided by the future tag library. Existing templates be migrated to use the new syntax.How it worksFinds all\*.html,\*.txtfiles.Replaces all old style “url” tags.Inserts{% load url from future %}when it’s needed.Installation$ pip install django-future-urlUsage$ cd ~/projects/my_django_14_project/
$ future_urlIt will show needed midification for all templates in directory
“~/projects/my_django_14_project/” and subdirectories.:$ future_url --writeIt will modernize all your templates in place (see above).OptionsYou can usefuture_url--helpfor help.Only shows changes to be made without actually modifying files:$ future_urlExample$ cat ./template1.html

{% url path.to.view arg arg2 %}
{%  url path.to.view arg arg2 %}
{%url myapp:view-name %}
{% url path.to.view as the_url%}
{% url   path.to.view arg arg2   as   the_url %}
{%url app_views.client client.id%}$ future_url --write

$ cat ./template1.html

{% load url from future %}
{% url 'path.to.view' arg arg2 %}
{%  url 'path.to.view' arg arg2 %}
{%url 'myapp:view-name' %}
{% url 'path.to.view' as the_url%}
{% url   'path.to.view' arg arg2   as   the_url %}TestsInstallpython setup.py testandcram django_future_url/test/cram
Package: django-fuzzytest
This is the automatic Fuzzy Test tool for testing Django applications.
It generates url and params map based on your activity on dev server and then use it to fuzzy test your application.How to useAdd to installed applicationsINSTALLED_APPS += (‘django_fuzzytest’,)Run fuzzyserver to collect url and params cache:python manage.py fuzzyserver –cache=.fuzzycacheAfter data was collected you can start testing:python manage.py fuzzytest –cache=.fuzzycacheHere’s a screenshot of the panel in action:
Package: django-fwdform
Simple and painless form processing for static sites.Why?I have several sites hosted on AWS S3 for pennies a month… and I didn’t want to
pay $20 per month (per form) for processing contact forms!20+ domains powered by 1 Heroku app = Profit!DemoSeehttps://github.com/mishbahr/staticgen-fwdformFeaturesMulti site support.Unlimited formsUnlimited submissionsSpam Protection via Akismet.Submit forms with AJAX.REST API to manage forms.QuickstartInstalldjango-fwdform:pip install django-fwdformAddfwdformtoINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'corsheaders',
    'fwdform',
    ...
)Sync database:python manage.py migrateAddfwdform.urlsto your project’s urls module:urlpatterns = patterns(
    ...
    url(r'^', include('fwdform.urls', namespace='fwdform')),
    ...
)DependenciesThis package requiresdjango-cors-headersto be installed and configured correctly. Whendjango-fwdformis installed using pip,django-cors-headersis automatically installed.You will need to add corsheaders middleware class toMIDDLEWARE_CLASSESsettings:MIDDLEWARE_CLASSES = (
    ...
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    ...
)Note thatCorsMiddlewareneeds to come before Django’sCommonMiddleware.Allow CORS requests from all domains:CORS_ORIGIN_ALLOW_ALL = TrueFor more information, seehttps://github.com/ottoyiu/django-cors-headersSample Form<form action="//example.com/send/<form_hash>/" method="POST">
    <input type="text" name="name" required="required"/>
    <input type="email" name="email" required="required" />
    <textarea name="message" rows="5"></textarea>
    <input type="submit" value="Send">
</form>Special Form Inputs_nextBy default, after submitting a form the user is shown the FwdForm “Thank You” page. You can provide an alternative URL for that page.<input type="hidden" name="_next" value="//example.com/thanks.html" />_subjectThis value is used for the email’s subject:<input type="hidden" name="_subject" value="Contact Form" />_gotchaAdd this “honeypot” field. If a value is provided, the submission will be silently ignored. The input should be hidden with CSS:<input type="text" name="_gotcha" style="display:none;" />name/email/messageSpan prevention via Akismet - Spam checker backend looks for these specially named form inputs:<input type="text" name="name" placeholder="Your Name">
<input type="email" name="email" placeholder="Your Email">
<textarea name="message" rows="5"></textarea>Rest APIRegister a form, this returns a hashid for the newly created form:$ curl --data "name=Contact%20Form&recipients=conttact@example.com" http://example.com/<site_token>/
{"hashid": "0rPGVlYZWqMRE8OebjoM1ogpmvNL23A9dxJzywQD"}Update existing form config by passing a knownhashidas a param:$ curl --data "recipients=hello@example.com&hashid=0rPGVlYZWqMRE8OebjoM1ogpmvNL23A9dxJzywQD" http://example.com/<site_token>/AJAX SubmissionYou can use fwdform via AJAX. This even works cross-origin.If you’re using jQuery this can be done like so:$.ajax({
    url: $form.attr("action"),
    method: "POST",
    data: $form.serialize(),
    dataType: "json",
    headers: {"X-Requested-With": "XMLHttpRequest"},
});
Package: django-g
django-gDjango global context to get current request from anywhere in your application.Many scenarios need the current request but Django don't have it accessible.
They expect that your application implement a middleware to use the request,
but it is burdensome and not reusable.Other packages, likedjango-threadlocalsdo the same thing with threadlocals, but it doesn't work on the
async world.How to install$ pip install django-gHow to useAdddjango_g.middleware.RequestMiddlewareto your settingsMIDDLEWARE. It
is a small middleware just to capture the current request and save to global
context, ordering probably doesn't matter because any other middleware
already have access to the request.MIDDLEWARE=["django_g.middleware.RequestMiddleware",...]fromdjango_gimportget_current_requestdefyour_func():request=get_current_request()# Use the request here. Be careful and handle when `request=None`.protipIt is not a good idea to get the request everywhere, because you're
coupling the framework specifics with your logic, so use this package only to
get the request where you don't have a better way.
Package: django-ga4-serverside
Installpip install django-ga4-serversideSettingsINSTALLED_APPS=[# …'django_ga4_serverside',]MIDDLEWARE=[# …'django_ga4_serverside.middleware.TrackingMiddleware',]GA4_ID='G-XXXXXXXXXX'GA4_SECRET='XXXXXXXXXX-XXXXXXXXXXX'GA4_DEBUG=FalseAdvanced settingsGA4_IGNORE_URL_REGEX- allows to configure ignored URLsGA4_PROCESS_ANALYTICS- callback used to modify payload. Default
implementation configures client_id from cookies. Default implementation:defprocess_analytics(context):client_id,created=get_or_create_client_id(context.request)ifcreated:store_user_cookie(context.response,client_id)store_parameters(context.request,client_id=client_id)GA4_GENERATE_PAYLOAD- callback to generate payloadGA4_SHOULD_TRACK_CALLBACK- callback to filter tracked requestsAPIStoring custom eventsfromdjango_ga4_serverside.utilsimportstore_event# inside viewstore_event('custom_event',{'custom':'property'})