Saravanan666/pypi-org huggingface dataset:
Package: django-yacbv
Django Yet Another Class Based Viewdjango-yacbv (YetAnotherClassBasedView) is replacement of django’s CBV
(django.views.generic.View).Django’s View can only dispatch corresponds to request.method.
but in many cases, it should consider more things, such as request parameter.Django’s ClassBasedGenericView is inflexible, hard to remember it’s API
and hard to understand succession inheritances.Django’s View can’t remove decorators, this is necessary for testing.
it forces us to test views with decorators, always it obstructs to
pure unit testing.As these solution, django-yacbv is released.YACBV is simpledjango-yacbv provide simple class based view, allowing user to create more flexible
dispatching, like this:fromyacbvimportView,view_configclassTopView(View):@view_config(method='get',param='flip',template_name='top2.html')defflipped(self,request):return{'word':request.GET['flip']}@view_config(method='get',template_name='top.html')defget(self,request):return{'word':'world'}Notice about them:Theflipmethod will be dispatched only case that Request object containsflipparameter.The template for each views can be specified astemplate_nameargument ofview_config.These returned dictionary will be used as context for Template.Now, django-yacbv is just pre-alpha library, not for production.
If you like this package, check out it fromGithub!
Package: django-yacon
Yacon is a django app for building websites based on a CMS.  Yacon provides methods for managing hierarchical, multi-lingual page content across multple sites.  Yacon ships with ckedit and uses AJAX calls to allow the user to do inline WYSIWYG editing of their web content.  Yacon does not provide any design or templating tools, and so is not a full CMS, but provides enough to support CMS features on any django site you are already building.
Package: django-yamaps
# django-yamapsИнтеграция Django и Яндекс.Карт.Highly inspired by [django-address](https://github.com/furious-luke/django-address).Тестировали на Python 3.5 и Django >= 1.9.# Обновление с предыдущих версийВ предыдущих версиях `django-yamaps` содержали модели адресов, чтобыможно было быстро начать разработку. В текущей версии они были удалены.Точнее, перемещены в демку `example` вместе с `AddressField`.`django-yamaps` теперь предоставляет только виджет для форм итэги для подключения Яндекс.Карт в Django-шаблоны.# Widget> Можно кликнуть по карте - адрес будет обновлен.Виджет сохраняет данные, полученные от Яндекс.Карт, вместе с координатами(широта и долгота) и "сырым" представлением.Можно написать свое поле, чтобы перегнать данные из Яндекс.Карт всвою модель адреса.Django передает в виджет PK адреса в базе данных, так что Вы можетеуказать в настройках модель адреса, чтобы виджет мог отобразить Ваши данные:```pythonYAMAPS_ADDRESS_MODEL = "app.Address"```(так же, как и с `USER_MODEL`).Помимо этого на модели должен быть определен метод `to_raw` - если егонет, будет использовано приведение к строке (`__str__`).Примеры использования в папке `example`.# Template tagДля отображения карты с адресом подключите в шаблон библиотеку `yamaps`,после чего укажите, куда в шаблоне поместить карту с помощью тэга`yamaps`, а затем инициализируйте Яндекс.Карты с помощью тэга`yamaps_init````{% load yamaps %}{% yamaps address1 %}{% yamaps address2 %}...{% yamaps addressN %}{% yamaps_init %}```Вы можете указать стили карты вторым аргументом:```{% yamaps address "width: 640px; height: 480px;" %}```
Package: django-yamlconf
django_yamlconfis part of VMware’s support of open source
development and community.Handle YAML based Django settings: load Django settings from YAML files
based on a Django project name. The YAML files loaded start with a YAML
file in the directory containing the Django settings file and then loads
any other YAMLCONF files up the directory tree from the initial file.
Values from files higher up the directory tree over-ride lower in the
tree. The contents of the YAML file simply defines values that over-ride
(or add to) attributes of the standard Django settings file, e.g., for
the project “buildaudit”, the settings.py file could contain:DEBUG=Truei.e., the value for development. This can be redefined via abuildaudit.yamlfile using the definition:DEBUG:falseIf the environment variableYAMLCONF_CONFFILEis defined, it uses as
the final YAML file loaded (in this case, the file name does not need to
match the project name and it can be located anywhere in the file
system).Quick StartThe YAMLCONF definitions are added to the Django settings file by
including a call to theloadfunction in the settings file. This
would normally be towards the end of the settings file. The simplest,
and likely normal usage is to call without arguments. YAMLCONF will
infer the project information from the call stack. For a standard Django
application structure, the settings file:myproject/myproject/settings.pywould contain the development oriented definitions, e.g., database
definitions for user and password for a development database. The
settings file would then end with a call the theloadfunction.
Additional definitions could be defined after theloadfunction to
update conditional definitions, e.g., ifDEBUGis enabled.importdjango_yamlconf...DATABASES={'default':{'NAME':'example','USER':'example','PASSWORD':'example','HOST':'localhost',...}}...django_yamlconf.load()On a production server, for this example, amyproject.yamlwould be
put in place containing the host name for the production database and
the password for the example user (assuming production is using the same
database name and username). In this example, a randompwgenpassword is used:DATABASES.default.PASSWORD:'zibiemohjuD6foh0'DATABASES.default.HOST:'myproject-db.eng.vmware.com'See theloadfunction for more information on other optional
arguments.Licensedjango-yamlconfis release under the BSD-2 license, see the LICENSE
file.SPDX-License-Identifier: BSD-2-Clause
Package: django-yamldoc
django-yamldoc: Quoins for static sitesThis is a Django application for maintaining documents in YAML format and
refining them to a traditional ORM’d database to serve them to users. It’s for
people who prefer VCS over SQL.Statusyamldocis technically reusable, and used in multiple personal projects over
the years, with some individual YAML documents over a hundred thousand lines
long. However,yamldocis probably of no interest to you. Its architecture
is less elegant than the average Django app, mixing various concerns united
only by the theme of refining YAML to HTML via quearyable SQL.yamldocis currently marked as compatible withmarkdown < 3.3. The two
packages are in fact still compatible at >= 3.3, butmarkdownperformance
with large blocks of HTML was degraded in 3.3. This is relevant toyamldocand unsolved as of version 3.3.6, hence the soft block.Historyyamldocwas originally calledvedmfor “Viktor Eikman’s Django miscellania”.yamlwrap, availablehere, was once a
central component ofyamldoc.LegalCopyright 2016–2021 Viktor Eikmandjango-yamldocis licensed as detailed in the accompanying file LICENSE.
Package: django-yaml-field
django-yaml-fieldSame as Django JSONField but represent it as YAML (internally stores as JSON)Pip installpipinstalldjango-yaml-fieldExamplefromdjango.dbimportmodelsfromdjango_yaml_fieldimportYAMLFieldclassModelName(models.Model):yaml=YAMLField()Allows querying the stored data using lookups in the same way described in DjangodocumentationSyntax HighlightIf you want a nice syntax highlight in form, you can use withdjango-acefromdjango_aceimportAceWidget@admin.register(ModelName)classModelName(admin.ModelAdmin):formfield_overrides={YAMLField:{"widget":AceWidget(mode="yaml")}}LicenseMIT
Package: django-yamoney
YamoneyDjango приложение для приема денег на кошелек Yandex.MoneyУстановкаУстановить:pip install django-yamoneyДобавить “yamoney” в ваш INSTALLED_APPS:INSTALLED_APPS = (
    ...
    'yamoney',
)Добавить yamoney URLconf в urls.py вашего проекта:url(r'^yamoney/', include('yamoney.urls'))Создать форму оплаты с помощью yamoney.forms.paymentform_factory:payment_form = paymentform_factory(
    'Оплата участия',  # описание платежа
    2000,               # сумма
    event               # объект модели
)Слушать yamoney.signals.transaction_success сигнал, где sender - транзакция, related_obj - объект модели.
Package: django-yandex-direct
Using pip:$sudopipinstalldjango-yandex-directAdd to settings your credentials:YANDEX_DIRECT_LOGIN=''YANDEX_DIRECT_APP_ID=''YANDEX_DIRECT_TOKEN=''YANDEX_DIRECT_SANDBOX=TrueEnjoyfromyandex_directimportapifrompprintimportpprint# Pythonic stylepprint(api.get_regions().get('data'))# Native API stylepprint(api.PingAPI().get('data'))
Package: django-yarnpkg
Easy way to useyarnpkgwith yourDjangoproject.This is a fork ofdjango-bower <https://github.com/nvbn/django-bower>by Vladimir Iakovlev.Read full documentation onread-the-docs.InstallationInstall django-yarnpkg package:pipinstalldjango-yarnpkgAdd django-bower toINSTALLED_APPSin your settings:'django_yarnpkg',Add staticfinder toSTATICFILES_FINDERS:'django_yarnpkg.finders.NodeModulesFinder',Specify path to components root (you need to use an absolute path):NODE_MODULES_ROOT=os.path.join(BASE_DIR,'node_modules')If you need, you can manually set the path to yarnpkg:YARN_PATH='/usr/bin/yarnpkg'You can see an example settings file inexample project.UsageSpecifyYARN_INSTALLED_APPSin settings, like:YARN_INSTALLED_APPS=('bootstrap@^4.4.1','underscore@^1.6.1',)Download yarn packages with the management command:./manage.pyyarninstallAdd scripts in the template, like:{%loadstatic%}<scripttype="text/javascript"src='{%static'jquery/dist/jquery.js'%}'></script>In production you need to callyarnpkg installbeforecollectstatic:./manage.pyyarninstall./manage.pycollectstaticIf you need to pass arguments to yarnpkg, like–flat, use:./manage.pyyarninstall----flatYou can call yarnpkg commands likeinfoandupdatewith:./manage.pyyarninfobackbone./manage.pyyarnupdatePython 3 supportdjango-yarnpkg supports python 3.3+
Package: django-yarr
A lightweight customisable RSS reader for Django.Project site:https://radiac.net/projects/django-yarr/Source code:https://github.com/radiac/django-yarrFeaturesEasy to install - simple requirements, just drops into your siteImport and export list of feeds using OPMLView all, by feed, just unread or saved itemsList or expanded layoutMark items as read or savedInfinite scrolling, with keyboard support and automatic mark as readSupport for multiple usersManage subscriptions through user views or admin siteNo social nonsenseSupports Django 2.2 and later, on Python 3.5 and later.SeeInstallationfor installation instructions.SeeUpgradingfor changelog and upgrade instructions
Package: django-yaset
Yet Another Settings tool for django contains helper functions for managing
localized settings files for different deployments and developers.Installation$pipinstalldjango-yasetUsageA common pattern in django to use different settings for different
environments is to have a “local_settings” directory. This utility makes this
easier.The expected directory setup is as follows:project/
    settings.py
    local_settings/
        __init__.py
        import_redirect
        development.py
        production.py
        secrets/
            __init__.py
            development.py
            production.pyTheimport_redirectfile should contain the local module name of the
settings to import in this environment. In the above example, it would be
either “development” or “production”. The “devleopment” and “production” files
would contain the same types of declarations found insettings.py.Inside of yoursettings.pyfile, include this at the bottom:fromyasetimportimport_settingsimport_settings(globals())This passes thesettingspackaging into theimport_settingscall which
loadsimport_redirect, uses its contents to then load thelocal_settingsandlocal_settings.secretsfiles specified.It is not generally recommended to put either theimport_redirectfile or
thesecretsdirectory in your repository.Supportsdjango-yaset has been tested with:Django 2.2.3 using Python 3.6, 3.7Docs & SourceDocs:http://django-yaset.readthedocs.io/en/latest/Source:https://github.com/cltrudeau/django-yaset
Package: django-yaturbo
https://github.com/idlesign/django-yaturboDescriptionReusable Django app to enable Yandex Turbo Pages for your siteThis app allows you to define Yandex Turbo pages feeds in term similar to those
of Django Syndication Feed Framework contrib:Inherit your feed class fromYandexTurboFeed:# feeds.pyfromyaturboimportYandexTurboFeedclassTurboFeed(YandexTurboFeed):"""
    More information on Django Syndication Feed Framework configuration:
    https://docs.djangoproject.com/en/2.0/ref/contrib/syndication/
    """Pass an instantiated (and optionally configured) feed object tourlpatterns:# urls.pyfrom.feedsimportTurboFeedurlpatterns=[...path('feeds/turbo/',TurboFeed()),...]Read the docs for further information.Documentationhttp://django-yaturbo.readthedocs.org/
Package: django-year-calendar
Django year calendarA django app based onjs-year-calendarDynamic view implemented with Bootstrap 5 and JS Fetch API (no jquery).Popups are not supported,
replaced by a modal dialog raised on date range selection.Get startedClone the repository or download the projectOptional: set a django environnement, then activatepython-mvenvvenv
venv\Scripts\activate.bat(windows).venv/bin/activate(linux)pipinstalldjangoInstall django_year_calendar (or give an access)pipinstalldjango-year-calendar#  orpythonsetup.pyinstall# or put current directory in PYTHONPATHGo to the example django project, initialize the project then run dev servercdexample_project
pythonmanage.pymigrate
pythonmanage.pyloaddatasample_data.json
pythonmanage.pyrunserverCheck thenhttp://localhost:8000You can also go to the admin panelhttp://localhost:8000/admin(login admin passwd admin) to browse models
and add some more data.Usage for an existing django projectAdd the django_year_app to your projectINSTALLED_APPS=[...'django_year_calendar',]Add some routes to views in the urls.py fileurlpatterns=[...path('my_calendar',include('django_year_calendar.urls')),path('minimal_fr',TemplateView.as_view(template_name='django_year_calendar/minimal.html',extra_context={'calendar_lang':'fr'})),...]You may (or not) add some settings in your settings.py file:CALENDAR_LANG="fr"# see https://github.com/year-calendar/js-year-calendar/tree/master/localesCALENDAR_WEEKSTART=1# mondayCALENDAR_WEEKNUMBER=True# display week numberCALENDAR_TPL="django_year_calendar/bootstrap5"# style: 'border' | 'background' | [custom_template] for 'custom' styleCALENDAR_RENDERER='background'CALENDAR_VIEWS=[...{'manager':'app.models.MyModel[.myManager[.a_method]]','color':'blue','style':'background | border'},...]Add some code to the models to display on the calendar,classMyEvent(models.Model):...# REQUIREDdefstart_date(self)->DateField|date:...returnsome_date# REQUIREDdefend_date(self):...returnanother_date# optionaldefcolor(self)->str:return'blue'definfos(self)->str:return"my birthday"defstyle(self)->str('background'|'border'):return'border'You can make your own views in various ways depending on your needs:new templates based on the provided ones in django_year_calendar/templatesparameters in the urls.py filenew views based on CalendarView provided by the django_year_calendar appSee example_project for more details.FutureCustomizing the calendar view based on user rightsHelpers for building event editing views...
Package: django-yearlessdate
Provides a Django model and form fields for dates that do not include years.One use case is to collect birthdays without requiring the year of birth.PrerequisitesDjango 1.8 - 1.11, 2.0Python 2.7, 3.6(Other versions may function, but are untested.)Installationpip install django-yearlessdateUsageThe package provides two model fields,YearlessDateFieldandYearField.YearlessDateFieldYearlessDateFieldstores a date without a year: January 1st, for example.Its default widget consists of two dropdowns, one for a day and one for the month.It will only allow potentially valid dates. For example, a user won’t be able to set
the date to April 31st. February 29th is counted as a valid date.Here’s an examplemodels.pythat declares a model with a required yearless date:from django.db import models
from djangoyearlessdate.models import YearlessDateField

class MyModel(models.Model):
    birthday = YearlessDateField()The values ofYearlessDateFieldon the model instances can be accessed like so:>>> a = MyModel.objects.get(id=1)
>>> a
<MyModel: 4 August 2011>
>>> a.birthday.day
4
>>> a.birthday.month
8
>>> print a.birthday
4 AugustThey can also be compared or sorted as would be expected, for example:>>> m = MyModel.objects.all()
>>> m
[<MyModel: 4 August 2011>, <MyModel: 30 June 2013>]
>>> m[0].birthday > m[1].birthday
True
>>> m.order_by('birthday')
[<MyModel: 30 June 2013>, <MyModel: 4 August 2011>]YearFieldYearFieldis a very simple model field that stores the year as an integer,
and ensures the year provided lies between 1900 and 2200:from django.db import models
from djangoyearlessdate.models import YearField

class MyModel(models.Model):
    year = YearField(null=True, blank=True)Use ofYearFieldisnot recommendeddue to its lack of configurability.
You’re almost certainly better of using aSmallIntegerFieldin combination
with aMinValueValidatorand aMaxValueValidator.Running testsSetupEnsure you have a recent version of tox installed.Clone this repo.Running testsFrom the root of this repo, simply run:tox
Package: django-yearmonth-widget
django-yearmonth-widgetWe only care about year and month for DateField, and always set the day to 1, it's a Django Widget allow you select the year and month. And now we support CharField backend.Installpipinstalldjango-yearmonth-widgetUsagepro/settings.pyINSTALLED_APPS=[...'django_static_jquery3','django_yearmonth_widget',...]app/admin.pyfromdjango.contribimportadminfromdjangoimportformsfromdjango_yearmonth_widget.widgetsimportDjangoYearMonthWidgetfrom.modelsimportBookclassBookForm(forms.ModelForm):classMeta:model=Bookexclude=[]widgets={"published_yearmonth":DjangoYearMonthWidget(),}classBookAdmin(admin.ModelAdmin):form=BookFormlist_display=["name","published_time"]admin.site.register(Book,BookAdmin)Note:Create a ModelForm, and set new widget for the field.DjangoYearMonthWidget Init parametersyears: list of year numbers. Default to None.If years provided, parameters prev_years and next_years are ignored.start_year: Default to None. Use to set the beginning of year range, have higher priority than prev_years.end_year: Default to None. Use to set the ending of year range, have higher priority than next_years.prev_years: int, default to 10.next_years: int, default to 0.Use prev_years, next_years to set the year range based on today's year.prev_years means the begining year is now.year - prev_years. If today's year is 2020 and the prev_years=10, so that the final years is start at 2010.next_years means the ending year is now.year + next_years. If today's year is 2020 and the next_years=10, so that the final years is end at 2030.day_value: int, default to 1.value_dumps: string template, e.g.%(year)04d-%(month)02d-%(day)02dvalue_loads: regex parse the string value, e.g.(?P<year>\d{4})-(?P<month>\d{1,2})-(?P<day>\d{1,2})value_dumps and value_loads must matchs with each other, it means value_loads regex CAN parse string dumped with value_dumps.value_dumps MUST in%(xx)dso that both python and javascript can do the string formatting.Releasesv0.2.1 2020/03/27Fix inline form rendering problem, because it contains a NONE value year-month for inline form row template.Change event listenning method to $.to, so that the widget will work in inline form.v0.2.0 2020/03/16Add start_year & end_year parameters. The parameters start_year and end_year have higher priority than prev_years and next_years.Add support for CharField. You must provide value_dumps and value_loads for CharField backend.v0.1.0 2020/03/10First release.
Package: django-yeouia
Yummy Email Or Username Insensitive Auth model backend for DjangoInstructionspip install django-yeouiaAddAUTHENTICATION_BACKENDS = ['yeouia.backends.YummyEmailOrUsernameInsensitiveAuth']to yoursettings.pyEnjoyRequirementsTested forPython 3.4, 3.5, 3.6, 3.7Django 2.0, 2.1May work otherwise, but you should run tests :PCase Insensitive ?Django's default auth username isnotcase insensitive.
(See#2273and#25617)But… Who cares ?This backend tries:username, case sensitiveusername, case insensitiveemail, case insensitiveAnd follows#20760.
Package: django-y-message
PurposeYmessage is a Django app to implementTransactional Outboxpattern
(https://microservices.io/patterns/data/transactional-outbox.html).Quick startAdd “ymessage” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...,
    "ymessage",
]Include the ymessage URLconf in your project urls.py like this:path("", include("ymessage.urls")),Runpython manage.py migrateto create the ymessage models.Create a ymessage_handlers module in your app. See ymessage_example for ymessage’s usage.5. POSThttp://127.0.0.1:8000/ymessage/default_message_handler/to relay  or process the message.
6.
Package: django-young-america
Django Young AmericaYa - Young AmericaAPI integration for Django applicationsInstallationpipinstalldjango-young-americaUsagefromyoungamerica.modelsimportYaClientprofile={'first_name':'John','last_name':'Smith','email':'john.smith@example.com','zip_code':'12345','date_of_birth':'12/30/1900','tag_info':'tag','entry_date':'08-26-2018','address':'','city':'','state':'',}ya=YaClient()response=ya.send(profile)ConfigurationAdd these variables to your Django settingsfromosimportgetenvYA_DATETIME_FORMAT='%m/%d/%Y %I:%M:%S %p'YA_TIMEZONE='America/Chicago'YA_CLIENT_ID=getenv('YA_CLIENT_ID','')YA_VENDOR_CODE=getenv('YA_VENDOR_CODE','')YA_RETURN_ID_FLAG=getenv('YA_RETURN_ID_FLAG','Y')YA_ENTRY_METHOD=getenv('YA_ENTRY_METHOD','3')YA_ENDPOINT_URL=getenv('YA_ENDPOINT_URL','')YA_SWEEPS_ID=getenv('YA_SWEEPS_ID','')YA_SWEEPS_TOKEN=getenv('YA_SWEEPS_TOKEN','')
Package: django-youtube-api
Django youtube API==================[![Build Status](https://travis-ci.org/ramusus/django-youtube-api.png?branch=master)](https://travis-ci.org/ramusus/django-youtube-api) [![Coverage Status](https://coveralls.io/repos/ramusus/django-youtube-api/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-youtube-api)Application for interacting with youtube API objects using Django model interfaceInstallation------------pip install django-youtube-apiAdd into `settings.py` lines:INSTALLED_APPS = (...'youtube_api',)Usage examples--------------### Get video by ID>>> from youtube_api.models import Video>>> video = Video.remote.fetch('BJ80RsAQKqE')[0]>>> video.titleu'(Officiele Videocl\xedp) Django Wagner - Mooie Blauwe Ogen'### Search videos by title>>> videos = Video.remote.search('Django Unchaned Trailer')>>> len(videos)50>>> videos[0]<Video: Django Unchained - Official Trailer (HD)>>>> videos[0].video_idu'eUdM9vrCbow'
Package: django-youtubeembedfield
A field that accepts regular YouTube links and saves the embed ones. It just
wraps the regular URLField and converts the input to YouTube embedded ones.InstallationTo get the latest stable release from PyPi:$ pip install django-youtubeembedfieldTo get the latest commit from GitHub:$ pip install -e git+git://github.com/Celc/django-youtubeembedfield.git#egg=youtubeembedfieldUsageAdd the field to your model:import youtubeembedfield

class MyAwesomeModel(models.Model):
    youtube = youtubeembedfield.YoutubeEmbedField()ContributeIf you want to contribute to this project, please perform the following steps:# Fork this repository
# Clone your fork
$ git co -b feature_branch master
# Implement your feature and tests
$ git add . && git commit
$ git push -u origin feature_branch
# Send us a pull request for your feature branch
Package: django-youtube-thumbnail
Quickly pull the highest resolution thumbnail image available for a YouTube video.Quick StartInstall the package from pypi:pipinstalldjango-youtube-thumbnailAdd “youtube_thumbnail” your INSTALLED_APPS:INSTALLED_APPS=(...'youtube_thumbnail',)Use the provided template tag to get the thumbnail{% load youtube_thumbnail %}<imgsrc="{% youtube_thumbnail_url 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' %}">