Saravanan666/pypi-org huggingface dataset:
Package: django-baseclasses
django-baseclasses is a small set of helpers and abstract base model
classes for django.Installationpython ./setup.py installOr with pip:pip install django-baseclassesAbstract classes provided inbaseclasses.modelsDateAuditModelStores a record of when the model was created and last changed, in thecreation_dateandlast_updatedfields, orders oncreation_date, and providesget_nextandget_prevmethods
respecting the ordering.BaseContentModelExtendsDateAuditModel, addingis_liveandpub_datefields,
and provides alivemethod on the default manager which returns only
objects withis_liveset and a non-futurepub_date. Also orders
bypub_date, and providesnext_liveandprev_livemethods
which only cycle through “live” objects.BaseImageModelProvidescaption,imageandsort_orderfields. Orders onsort_order.BaseModelWithImagesParent model for use with aBaseImageModelwith a ForeignKey to this
model. Providesprimary_imageproperty which returns the first
related image object, orNone. The ForeignKey’srelated_namemust be “image_set”BaseHierarchyModelProvidesparentfield to create a simple hierarchy system, i.e.
categories and subcategories. Provides get_hierarchy method, which
returns a list of objects in the tree, from the top level to the
current.Model fieldsbaseclasses.fields.ConstrainedImageFieldResizes the image on upload and overwrites the original. Usemax_dimensionsargument to determine the resize behaviour.Helpersbaseclasses.util.next_or_prev_in_orderArguments:(instance, prev=False, qs=None, loop=False)Get the next (or previous with prev=True) item for an instance, from the
given queryset (which is assumed to contain instance), respecting
queryset ordering. If loop is True, return the first/last item when the
end/start is reached.baseclasses.admin.ContentModelAdminMixinEnables (cache-safe) admin preview of non-live objects. Example@admin.register(MyModel)
class MyModelAdmin(ContentModelAdminMixin, admin.ModelAdmin):
    ...Pass the request to the model’slivemanager method to enable
preview:def my_model_view(request, slug)
    instance = get_object_or_404(MyModel.objects.live(request), slug=slug)
    ...Example:# models.py

from django.db import models
from baseclasses.models import BaseContentModel, BaseModelWithImages, \
                               BaseImageModel


class Article(BaseContentModel, BaseModelWithImages):
    title = models.CharField(max_length=190)
    text = models.TextField()


class ArticleImage(BaseImageModel):
    article = models.ForeignKey(Article, related_name='image_set')With the above model definition, you can do the following:articles = Article.objects.live() # get queryset of all live articles
article = articles[0]
article.primary_image # get primary image (model instance) for the article
article.next_live # get next live article
Package: django-base-ds
django-base_dsdjango-base_ds is a Django app to use for demiansoft.Quick startAdd "base" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'base',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load base_tags %}

{% make_seo %}
{% make_favicons %}<!-- 폰트 링크를 인자로 전달한다 -->{% make_fonts font_link %}
{% make_vendor_css %}
{% make_vendor_js %}
{% make_analytics %}context examplecomponents=[...,['analytics',True,None,None],]context={"theme":"mentor_ds","seo":{"company_name":"MyEnglish","url":"myenglishkr.com","small_title":"1:1 Speaking Practice","desc":"강남구 서초동 교대 반포 법조타운 위치 내인생치과의 홈페이지, 삼성서울병원 구강외과 전문의 진료","keywords":"내인생치과, 반포대로치과, 교대교정치과, 반포치과, 서초치과, 서초동치과, 교대역치과 "},'analytics':{'google_id':"G-351NZ2S4F9",'naver_id':"feadf9e1b55868"},"font_link":"https://fonts.googleapis.com/css2?family=Gugi&family=Jua&family=Nanum+Pen+Script&family=Noto+Sans+KR:wght@100;300;400;500;700;900&family=Noto+Serif+KR:wght@200;300;400;500;600;700;900&display=swap"}템플릿을 추가할 때는 base_tags.py에 make_up_vendor_css(), make_up_vendor_js() 함수에 추가한다.
Package: django-baseline
Version: 0.2.2 (28.03.2014)https://github.com/theduke/django-baselineThis project contains a django app named “django_baseline” that provides convenience functionality for Django.Licensedjango-baseline is under the BSD license. See LICENSE.txt for details.ContributorsChristoph Herzog -chris@theduke.atIf you want to contribute, do not hesitate to open a pull request on Github.
Package: django_base_model
--------------------------------------------------------------------------------django_base_modelExtensions to the Django Base Model and Django Model Manager/Requires Python 2.5 or later.Website: http://rogeliorv.github.com/Git Repository: http://github.com/rogeliorv/django_base_model.git--------------------------------------------------------------------------------To make use of the classes in this package:1) Create your own django project (python django-admin.py startproject)2) Create a django application (python manage.py startproject sampleapp)3) Add your newly created application to INSTALLED_APPS in settings.py3) In models.py add the following linesfrom django_base_model import ExtendedBaseModel, ExtendedBaseModelManagerfrom django.db import modelsclass ExampleModel(ExtendedBaseModel):text = models.CharField(max_length = 256)objects = ExtendedBaseModelManager()--------------------------------------------------------------------------------How to contribute a patch:1. Fork django_base_model on github.com2. Create a new branch3. Commit changes to this branch4. Send a pull request
Package: django-base-project
base-django-projectThis is a base project for django work.
It contains a handful of django apps that I find useful installed by default.
Specifically:dj_database_url for extracting a database configuration from a valid DB URIdjango-extensions for running a more powerful shelldjango-fsm for easily creating state machines to track complex processes through the applicationdjango-simple-history for easily creating history tables for our models in order to improve application auditabilitydjangorestframework for easily creating REST APIsUsageIn your project'ssettings.py, remove all default configuration generated by django.
Then at the top, simply put:from base_django_project.webapp.settings import *

# place any custom modifications hereMotivationWhen standing up many django projects over a short amount of time, I often find myself duplicating configurations. This project allows any user to quickly drop in their favorite default configuration forsettings.py.
Package: django-base-setup
Django Base Setup"Django Base Setup" is a Django app to help you setup a basic Django project.Quick startAdd "base_setup" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'base_setup',
]Runpython manage.py setup_base <<app_name>>to create the basic app.add the urls of newly created app into the main project.Start the development server and visithttp://127.0.0.1:8000/(you'll see Obiwan-Kenobi).
Package: django-base-shop
Base ShopBase Shop is a lightweight Django app that provides an extendable data model to be used in online shops.Base Shop is currently in early stages of development and is likely to radically change without notice.As online shops have many differing needs and requirements a single data model does not offer a sound solution. The philosophy ofBase Shopis to provide a solid infrastructure that can extended for the needs of any online shop using Django.Base Shop provides a collection of "base" models that are intended to be extended by end users of the package, or used as is. The primary models provided include "BaseProduct", "BaseOrder", "BaseCheckoutDetails" along with more concrete models designed to interact seamlessly with user extended versions of the previously mentioned models.
Package: django-base-templates
#Django template including baseThis packages provides template element (HTML files) for django projects.
Made by Hizart.soft H._T@2022##InstallationInstall the packages using pip:```bash
pip install django-base-templates##Usage-.Just follow:#Add 'django_template_elements' to the INSTALLED_APPS in your Django project's settings.py:
```bash
INSTALLED_APPS = [
    # ...
    'django_template_elements',
]


#Update the TEMPLATES configuration in your Django project's settings.py:
```bash
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'django_base_templates', 'templates')],
        # ...
    },
]

#Use the provided template elements in your Django project's templates:
```bash

{% extends 'django_base_templates/base/base.html' %}

{% block content %}
    <section>
        <h2>This is the content of the index page</h2>
            <!-- Add your specific content here -->
    </section>
{% endblock %}
Package: django-basetestcase
django-basetestcaseBaseTestCase is a collection of cheater methods for the Django TestCase. They are extensions of the Django TestCase. These came about as a result of learning and using TDD.There are four different classes:ModelTestCaseFormTestCaseViewTestCaseFunctionalTestCaseFor use with Selenium.Origins and some methods from "Obey The Testing Goat".QuickstartTo install:pip install django-basetestcaseTo use in a test:from basetestcase import ModelTestCasePlease check out thesource codefor details. Documentation will be coming bit by bit. Any suggestions or issues, please let me know.CompatibilityThis was built using Python 3.7 and Django 2.1.7. Anything prior to that has no guarantees.What's new?FormTestCaseNow has aformset_error_test.FunctionalTestCasenow acceptsxpath.
Package: django_baseurl
A simple Django application which add Site base URL (with port if used
any) to template context processor with each reqeust. You can get Site
URL in your template files using{{ BASE_URL }}Tested EnvironmentUbuntu 14.04
Python 3.4
Python 2.7
Django 1.10Installation Using PIPpip install django-baseurlUsing Source Code (Github)git clone https://github.com/lalzada/django-baseurl.gitSwitch todjango-baseurldirectory and run commandpython setup.py installAdddjango_baseurltoINSTALLED_APPSinsettings.pyINSTALLED_APPS = [
  ...

  'django_baseurl'
]Addcontext processortoTEMPLATESinsettings.pyTEMPLATES = [
    {
        ...

        'OPTIONS': {
            'context_processors': [
                ...

                'django_baseurl.context_processors.baseurl'
            ],
        },
    },
]UsageUse below template variable inside your template file to get Site base url (with port if used any){{ BASE_URL }}
Package: django-base-url
Installation$[sudo]pipinstalldjango-base-urlHow it workssettingsBASE_URLif defined, else scheme+request.get_host()settings.pyTEMPLATE_CONTEXT_PROCESSORS=("django_base_url.context_processors.base_url",)Examplessettings.py:BASE_URL="http://host/"<basehref="{{ BASE_URL }}">readme42.com
Package: django-baseviews
A small collection of base view classes to build upon. They are intended to
handle a lot of the repetition in common view patterns and allow you to focus
on what makes each view different.  They’ve been in use in production on
various PegasusNews.com apps since June, 2010.This is just the beginning, and I plan on expanding these classes and adding
more to cover other common view patterns.  Feel free to fork and send pull
requests - I’d be happy to review and integrate contributions.You can review the documentation on Read the Docs:http://readthedocs.org/projects/bkonkle/django-baseviews/docs/
Package: django-basicauth
Basic auth utilities for Django.RequiresTested under…Python3.63.73.83.9Django2.23.03.1Installationpip install django-basicauthUsagefrombasicauth.decoratorsimportbasic_auth_required@basic_auth_requireddefmyview(request):...or by a middleware.MIDDLEWARE=('basicauth.middleware.BasicAuthMiddleware',...)Basic Auth for specific requests onlyTo apply basic auth for specific requests,
Usetarget_testargument.In the below code, anonymous users will be required Basic Auth
Authenticated users can pass it withoutBasic …header.frombasicauth.decoratorsimportbasic_auth_required@basic_auth_required(target_test=lambdarequest:notrequest.user.is_authenticated)defmyview(request):...target_testacceptstyping.Callable[[HttpRequest],bool],
and if the callable returnsTrue, Basic Auth will be required.Applying decorator to CBVsTo apply@basic_auth_requireddecorator to Class Based Views,
usedjango.utils.decorators.method_decorator.fromdjango.utils.decoratorsimportmethod_decoratorfrombasicauth.decoratorsimportbasic_auth_required@method_decorator(basic_auth_required,name='dispatch')classYourView(TemplateView):template_name="my-template.html"SettingsBASICAUTH_USERS(required): Dictionary including keys as username and values as passwords.BASICAUTH_REALM: realm string, default is “Secure resource”.BASICAUTH_DISABLE: Disable all of barriers by this library.Changes0.5.3 (2020-11-17)Added supporting Django3 and Python3.8,3.9Thanks @rhoboro !Dropped Py2, Django1.110.5.2 (2019-04-06)Added supporting Django2.20.5.1 (2018-08-06)Added supporting Django2.1Thanks @rhymes0.5 (2018-05-09)Added supporting Django2.0Thanks @timheap0.4.2 (2017-11-27)Fixed to avoid timing attacksLots of thanks for Hugo Castilho0.4.1 (2017-10-20)Addedtarget_testargument for the decorator.0.4 (2017-09-30)Supported Python 2.7Dropped Django1.9Supported Django 1.10+ style middleware0.3 (2017-08-28)AddedBASICAUTH_DISABLEsettingChanged API ofbasicauthutils.validate_requestFixed to return True/FalseAdding REMOTE_USER by this function0.2.1 (2017-08-28)Officially supported Django 1.11, 1.10, 1.90.2 (2016-03-31)Added BasicAuthMiddlewarehttps://github.com/hirokiky/django-basicauth/pull/30.1 (2015-04-20)Initial
Package: django-basic-authentication-decorator
WhatThis is a decorator for a django view that will request Basic Authentication.
This is a copy ofhttps://djangosnippets.org/snippets/243/WhyThere are serveral reasons for this Package:I wanted Basic Authentication for just a couple of views. So the RemoteUserAuthBackend was no option. Also I did not want to configure the webserver to do Basic Authentication.As you can read in the comments ofhttps://djangosnippets.org/snippets/243/there are some bugs in it - so I wanted to have them fixed - but also documented that they were fixed and in the end provide a fixed version of itAlso I just want to install it via pipHow to useApacheAdd this to your apache config to tell apache to pass the Authorication Headers to your application:WSGIPassAuthorization On
Package: django-basic-blog
# Django-Basic-Blog ![Build Status](https://circleci.com/gh/bwarren2/django-basic-blog.png?circle-token=695d40953b8186ef34f929442d314cf893d4f187&style=shield)DBB is a dead simple blog app.  It has entries and an RSS feed; not much else.  Entries are expected to be in raw html.## Quick startInstall with pippip install django-basic-blogAdd "blog" to your INSTALLED_APPS setting like this:INSTALLED_APPS = (...'blog',)Include the blog URLconf in your project urls.py like this:url(r'^blog/', include('blog.urls', namespace='blog')),Run `python manage.py migrate` to create the blog models.Add the settings vars for RSS fields:BLOG_TITLE  // Default "My Blog"BLOG_DESCRIPTION  // Default "I have a Django Blog!"and the override the default entries/page and RSS pagination if you wantBLOG_ENTRIES_PER_PAGE  // Default 20BLOG_ENTRIES_PER_RSS  // Default 5Start the development server and visit http://127.0.0.1:8000/admin/to create an entry (you'll need the Admin app enabled).Visit http://127.0.0.1:8000/blog/ to see the blog.*NOTE*:  There is support for each entry having associated js, but you need work that into the templates yourself.  Be careful.## Development and Testing### DevelopmentMake a venv, install django.Set env var to the test settingsexport PYTHONPATH='/home/ben/Projects/django-basic-blog'export DJANGO_SETTINGS_MODULE='sample_project.settings'Start the server with `django-admin runserver`.(If you want the admin to be pretty, try collecting statics.)To poke around with creating and displaying entries:Set up a superuser (`django-admin createsuperuser`) and hit the admin at `/admin` to try stuff out.### Testing`django-admin test blog --settings=sample_project.settings`
Package: django-basic-cms
This Django Basic CMS (based on Django Page CMS) enable you to create and administrate hierarchical pages in a simple and powerful way.Django Basic CMS is based around a placeholders concept. A placeholder is special template tag that
you use in your page templates. Every time you add a placeholder in your template  a field
dynamically appears in the page admin.This CMS is know to work on 1.8 with Python 2.7+ and 3.3 and 3.4 and 3.5 from version 0.3.13DocumentationFor more informations about the product:http://django-basic-cms.readthedocs.org/TODO before 1.0better import/exportcoverage > 90%pep8update documentation
Package: django-basic-config
django_configlatest:v.1.1.0:v.1.0.2:This is a basic django app that creates a table for EAV (Entity-Attribute-Value) configuration settings where each row has the following fields:applicationproperty_nameproperty_valueIt provides methods for retrieving configuration properties that allow for a default value to be passed in.  It is entirely in the admin and ORM layer, does not include an external-facing web app.  This is purposely not all that complicated or sophisticated.  If you want something more robust, there are other, better options.  This is quick and dirty.InstallationThis application, simple though it may be, has been updated to support django 1.7 and later, and with it the new built-in data migrations.Install django_config application:install django_config - Either:install using pip:pip install django-basic-configClone code into your django site/project.git clone https://github.com/jonathanmorgan/django_configadd thedjango_config.apps.Django_ConfigConfigapplication toINSTALLED_APPS:INSTALLED_APPS = (
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.sites',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      # Uncomment the next line to enable the admin:
      # 'django.contrib.admin',
      # Uncomment the next line to enable admin documentation:
      # 'django.contrib.admindocs',
      'django_config.apps.Django_ConfigConfig',
  )install database tablespython manage.py migrate django_configLicenseCopyright 2020 Jonathan MorganThis file is part ofhttps://github.com/jonathanmorgan/django_config.django_config is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.django_config is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along withhttps://github.com/jonathanmorgan/django_config.  If not, seehttp://www.gnu.org/licenses/.
Package: django-basic-email
This Django Basic Email enable you to create emails in easy way.This CMS is know to work on Django 1.4+ with Python 2.6+ and 3.3+InstalationGet package or install by pip:pip install django-basic-emailConfigurationModify yoursettings.py. Add'basic_email'to yourINSTALLED_APPSlike this:INSTALLED_APPS=(...'basic_email',)UsageCreate templateemails/email_example.htmland send email:frombasic_email.sendimportsend_emailsend_email('example','joe@doe.com','Hello')Options:templatetemplate name from schemeemails/email_<name>.htmlemail- receiver emailsubject- subject emailvariables- dict with variables to pass to template renderfail_silently- flag if error in sending email should raise (defaultFalse)replace_variables- dict with variables to replace in templatereply_to- reply_to headerattachments- attachments list (file objects)memory_attachments- attachments list (string objects)TestingFork repository (if you don’t have write permission).Create a branch.Add feature or fix a bug.Push code.Create a Pull Request.Automated testsRequire Tox>=1.8Testing all platformstoxTesting one platformstox -e <platform>Example:tox -e py27-django-17Testing interfaceCreate virtual environment:# Preparing virtualenv paths (optional if your profile doesn't have it).
export WORKON_HOME=~/Envs
source /usr/bin/virtualenvwrapper_lazy.sh
# or: source /usr/local/bin/virtualenvwrapper_lazy.sh

# Start by creating a virtual environment using the helper scripts provided. Do not include the systems site-packages.
mkvirtualenv django-basic-email --no-site-packages
workon django-basic-emailInstalldjango-basic-emailin editable mode:pip install -e .Run example project:cd example_project && ./manage.py migrate && ./manage.py runserver
Package: django-basic-email-user
Django Basic Email UserUsed to replace default Django User model with 'email', instead of the 'username', as the unique identifer. Also removes ['username', 'first_name', 'last_name'] fields and adding a 'name' field (required).The Django admin panel is customised to accommodate these changes, along with the User forms basic_email_user.forms.CustomUserCreationForm and basic_email_user.forms.CustomUserChangeFormSimply add basic_email_user to your installed apps, configure the AUTH_USER_MODEL, and run the migrationsINSTALLED_APPS = [
    ...
    'basic_email_user'
]

AUTH_USER_MODEL = 'basic_email_user.User'
Package: django-basic-jwt-auth
django-basic-jwt-authAccounts is a Django app to authenticate user using JWT Token on custom users.1. Install dependencies$pipinstallrest_framework
$pipinstallrest_framework_simplejwt
$pipinstalldjango-cors-headers
$install-ihttps://test.pypi.org/simple/django-basic-jwt-auth2. Add "accounts" to your INSTALLED_APPSsetting.pylike this:INSTALLED_APPS=[...'accounts',...]3. add the following codes to thesettings.py:AUTH_USER_MODEL='accounts.User'......REST_FRAMEWORK={'DEFAULT_AUTHENTICATION_CLASSES':['rest_framework_simplejwt.authentication.JWTAuthentication',],}4. Run migrations$pythonmanage.pymigrate5. Access the viewsfromdjango.contribimportadminfromdjango.urlsimportpathfromaccountsimportviewsfromrest_framework_simplejwtimportviewsasjwt_viewsurlpatterns=[path('admin/',admin.site.urls),path('register/',views.CreateAccountView.as_view(),name='user-register'),path('token/',jwt_views.TokenObtainPairView.as_view(),name='token_obtain_pair'),path('token/refresh/',jwt_views.TokenRefreshView.as_view(),name='token_refresh'),path('users/',views.UserListView.as_view(),name='user-list'),path('users/<uuid:id>/',views.UserDetailView.as_view(),name='user-detail'),path('me/',views.CurrentUserView.as_view(),name='me'),]
Package: django-basic-models-behaviors
Tiny app to provide basic behaviors for django models, like:TimestampablePublishableSoftDeletableCacheableInstallationFrom PyPI:$ pip install django-basic-models-behaviorsUsagePublishableModelHere is an example of Article usingPublishableModel:frombasic_models_behaviorsimportmodelsasbehaviorsfromdjango.dbimportmodelsclassArticle(behaviors.PublishableModel):title=models.CharField(max_length=255)contents=models.TextField()Then:>>>article=Article(title='Foo',contents='Lorem lipsum')>>>article.publish()>>>article.is_published()True>>>article.unpublish()>>>article.is_published()False>>>article.is_not_published()TrueSoftDeletableModelSoftDeletableModel behavior will add deleted_at field in set the current
timestamp instead of delete the object.
force_delete() will actually delete the model.In your models.py:frombasic_models_behaviorsimportmodelsasbehaviorsfromdjango.dbimportmodelsclassArticle(behaviors.SoftDeletableModel):title=models.CharField(max_length=255)contents=models.TextField()Then:>>>frommodelsimportArticle>>>article=Article(title='foo',contents='Lorem lipsum')>>>article.delete()>>>article.has_been_deleted()True>>>article.undelete()>>>article.has_been_deleted()False>>>article.force_delete()TestsRun tests:$ pip install -r tests/requirements.txt
$ py.test --ds=tests.settings testsAuthors@wo0dyn• Nicolas Dubois <nicolas.c.dubois@gmail.com>