Saravanan666/pypi-org huggingface dataset:
Package: django-site-navigation
install using pip:pipinstalldjango-site-navigationadd “site_navigation” to your INSTALLED_APPS:INSTALLED_APPS=(...'site_navigation')add “site_navigation.context_processors.getNavigationProperties” to
your TEMPLATE_CONTEXT_PROCESSORS:TEMPLATE_CONTEXT_PROCESSORS=(...'site_navigation.context_processors.getNavigationProperties')add “site_navigation.middleware.RedirectMiddleware” to your
MIDDLEWARE_CLASSES:MIDDLEWARE_CLASSES=(...'site_navigation.middleware.RedirectMiddleware')add in urls.py:fromnavigation.utilsimportaddUrlurlpatterns+=addUrl('default_page.html')create table:python./manage.pymigratecreate templates:
default_page.html{% load site-navigation %}<!DOCTYPE html><html><headlang="en"><metacharset="UTF-8"><metaname="description"content="{{ NAVIGATION_SUBDIVISION.description|default_if_none:'' }}"><metaname="keywords"content="{{ NAVIGATION_SUBDIVISION.keywords|default_if_none:'' }}"><title><title>{% if NAVIGATION_SUBDIVISION.title %}{{ NAVIGATION_SUBDIVISION.title }}
            {% elif NAVIGATION_SUBDIVISION.pageTitle %} {{ NAVIGATION_SUBDIVISION.pageTitle }}
            {% elif NAVIGATION_SUBDIVISION.name %}{{ NAVIGATION_SUBDIVISION.name }}
            {% else %}{{ SITE_OPTIONS.title }}{% endif %}</title></title></head><body>{% breadcrumbs %}<h1>{% if NAVIGATION_SUBDIVISION.pageTitle %}
        {{ NAVIGATION_SUBDIVISION.pageTitle }}
    {% else %}
        {{ NAVIGATION_SUBDIVISION.name }}
    {% endif %}</h1>{% block beforecontent %}
    {{ NAVIGATION_SUBDIVISION.before|default_if_none:''|safe }}
{% endblock %}

{% block content %}{% endblock %}

{% block aftercontent %}
    {{ NAVIGATION_SUBDIVISION.after|default_if_none:''|safe }}
{% endblock %}</body></html>menu.html{% for sub in subdivisions|dictsortreversed:"priority" %}<li{%ifsub==NAVIGATION_SUBDIVISION%}class="active"{%endif%}><ahref="{{ sub.getUrl }}">{{ sub }}</a></li>{% endfor %}breadcrumbs.html<ul><li><ahref="/">Home</a></li>{% for s in NAVIGATION_BRANCH %}<li>{% if not forloop.last %}<ahref="{{ s.getUrl }}">{{ s.name }}</a>{% else %}
                {{ s.name }}
             {% endif %}</li>{% endfor %}</ul>
Package: django-site-parameters
Site ParametersSite Parameters is a simple Django app to store customized site-level content, so that it can be maintained from the Admin
by content managers.This includes:Basic "key, value" settings for common data types;Simple Navigation menus;Management of Social Media locations for the site.All data are available to all templates through a context processor.As an example, you can have your site's copyright message as a SiteParameterString object rather than hard-coding it into a global footer template.   Or, you can upload a "site canonical image" that would be used as a placeholder in situations where an image in a template isn't available.Quick startAdd "site_parameters" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
    ...
    'site_parameters',
]Add the context_processors to the system context_processors in the settings file like this::TEMPLATES = [
    {
            ...
            'OPTIONS': {
                    'context_processors': [
                            ...
                            'site_parameters.context_processors.get_custom_site_parameters',
                    ]
                    ...
            },
            ...
    }
]Runpython manage.py migrateto create the database tables.Start the development server and visithttp://127.0.0.1:8000/admin/to see the available models.Basic Site ParametersYou can add site parameters of the following types:IntegersStringsText blocksURLsSwitches (booleans)Images(At present, there's no Markdown or HTML support as both of these would require other components to be installed.)In general, each has the following fields:TitleSlug (automatically generated from the title, but can be over-ridden)ValueThe title (for the most part) is just to make it easy to remember what the parameter is for (although it can be used in templates, etc. in the "regular" way).The slug is what's used in the global context for all templates.  Any hyphens are converted to underscores.   So if you have a Site: String with:title = "Copyright Notice"slug = "copyright-notice", andvalue = "2019 Skepsis Interplanetary"then you can use{{ site_parameter_string.copyright_notice }}in any template.Social MediaThe Social Media model holds information about your site's external social media pages.  This is a convenience for being able
to, e.g., manage lists of social media icons on pages, easily add or delete them as new services emerge and become popular, etc.Each of the items in the Social Media list have a field to enter an SVG icon.The "Order in List" field handles ordering.The "Available" field handles which items will be shown on the site.In templates, you can access the information from{{ global_social_media_dict.slug }}.NavigationNavigation Menus are constructed by assembling sets of Navigation Items.  You can have as Navigation Menus as you need.If you are also using Django CMS: the URL Slug field can be used to reference CMS Page objects.  Otherwise you can put in a root-relative URL in the  Internal Link field.The ordered list of navigation items can be accessed in a template from the context nameglobal_nav_ + slug, e.g.,global_nav_footer.
Package: django-siteprefs
http://github.com/idlesign/django-siteprefsWhat’s thatdjango-siteprefs allows Django applications settings to come aliveLet’s suppose you have your pretty settings.py file with you application:fromdjango.confimportsettingsMY_OPTION_1=getattr(settings,'MY_APP_MY_OPTION_1',True)MY_OPTION_2=getattr(settings,'MY_APP_MY_OPTION_2','Some value')MY_OPTION_42=getattr(settings,'MY_APP_MY_OPTION_42',42)Now you want these options to be exposed to Django Admin interface. Just add the following:# To be sure our app is still functional without django-siteprefs.if'siteprefs'insettings.INSTALLED_APPS:fromsiteprefs.toolboximportpreferenceswithpreferences()asprefs:# And that's how we expose our options to Admin.prefs(MY_OPTION_1,MY_OPTION_2,MY_OPTION_42)After that you can view your settings in Django Admin.If you want those settings to be editable through the Admin -siteprefsallows that too, and even more.Read the docs ;)Documentationhttp://django-siteprefs.readthedocs.org/
Package: django-sitepush
Redeploy Django projects using management commandsWhat does it do?Using Fabric to run a management command on each remote instance to redeploy
itself.The remote command will pull the source code from Git, run all necessary Django
management commands, and restart the server.It’s intended for small to medium scale apps.Why not just write a Fabric script?It’s faster. When the you run everything remotely it only takes about 10
seconds to deploy an instance.What commands will run?git pullpip install-rrequirements.txtsyncdbmigratecollectstaticrestart server (webserver dependent)RequirementsA deployed instance running either:Apache with mod_WSGIGUnicornFabricA virtualenv dedicated to the project.A Git hosted repository for the projectInstallationAdd the app to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    #...
    'sitepush',
)SettingsAdd the server configuration to your settings file:DEPLOYS = {
    'default': {
        'HOST': '192.168.0.1',         # IP or domain name
        'USER': 'user',                # User to login with
        'BRANCH': 'master',            # Git branch to pull updates from
        'SETTINGS': 'settings',        # Settings file to use (optional)
        'DIR': '/var/www/myproject/',
        'ENV': 'myvirtualenv',         # virtualenv used in the project
        'WEBSERVER': 'gunicorn',       # webserver - 'apache' or 'gunicorn'

        'PID_FILE': '/tmp/gunicorn.pid',  # Gunicorn pid file path
        'WSGI_FILE': 'deploy/wsgi.py',    # Apache wsgi file path
    },
}ThePID_FILE/WSGI_FILEsettings should be set depending on the web
server you’re using.BRANCHis optional and defaults tomasterUsagepython manage.py deploy_remote default

# Or
python manage.py deploy_remote srv1 srv2 #...'

# Don't install requirements:
python manage.py deploy_remote default --noreqs

# Deploy all remote instances:
python manage.py deploy_remote --all
Package: django-sites-extra
django-sites-extraGitHubTestCheck Demo ProjectCheck the demo repo onGitHubRequirementsPython 3.8+ supported.Django 3.2+ supported.SetupInstall frompip:pipinstalldjango-sites-extraModifysettings.pyby adding the app toINSTALLED_APPS:INSTALLED_APPS=[# ..."sites_extra",# ...]Execute Django's commandmigrateinside your project's root:pythonmanage.pymigrate
Runningmigrations:Applyingsites_extra.0001_initial...OKModifysettings.pyby adding the app's context processor toTEMPLATES:TEMPLATES=[{# ..."OPTIONS":{"context_processors":[# ..."sites_extra.context_processors.info",# ...],},},]Optionally, but sugguested, the Django's Current Site middleware is enabled insidesettings.py:MIDDLEWARE=(# ..."django.contrib.sites.middleware.CurrentSiteMiddleware",# ...)Run Example Projectgitclone--depth=50--branch=django-sites-extrahttps://github.com/DLRSP/example.gitDLRSP/examplecdDLRSP/example
pythonmanage.pyrunserverNow browser the app @http://127.0.0.1:8000
Package: django-sites-groups
AuthorsPraekelt FoundationHedley RoosChangelog1.11.1Actual Django 1.11 compatibility.1.11.0Django 1.11 compatibility.1.9.2Ensure widget HTML is marked as safe.Use a rendering engine that has access to standard template tags.1.9.1Add missing migrations.1.9.0Django 1.9 compatibility.0.1.2Correctly include MANIFEST.in0.1.1List app as part of sites app.0.1Initial release.
Package: django-sites-microsoft-auth
Django Sites Microsoft Authentication BackendSimple app to enable Microsoft Account, Office 365 and Xbox Live authentcation
as a Django authentication backend that is compatible and configurable across multiple sites.Free software: MIT licenseDocumentation:https://django-sites-microsoft-auth.readthedocs.io.FeaturesProvides Django authentication backend to do Microsoft authentication
(including Microsoft accounts, Office 365 accounts and Azure AD accounts)
and Xbox Live authentication.Provides Microsoft OAuth client to interfacing with Microsoft accountsPython/Django supportdjango_sites_microsoft_authfollows the samesupport cycle as Django,
with one exception: no Python 2 support. If you absoutely need Python 2.7
support, everything should largely already work, but you may need to patchsites_microsoft_auth.adminand/or other files to get it to work.Supported python versions:  3.6+Supported Django version: 1.11 LTS, 2.1+https://docs.djangoproject.com/en/stable/faq/install/#what-python-version-can-i-use-with-djangoNote: Even though Django 1.11 LTS supports Python 3.4, I do not and you should
not either. Official support for 3.4 was dropped in March 2019.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.4 (2020-03-20)Remove migration for user attribute mapping which was still there accidentally and breaking all tests.1.0.3 (2020-03-13)Remove user attribute mapping. This feature was buggy and the same can be achieved using hooks.1.0.2 (2020-03-13)Fix get_hook() to work with database configuration.1.0.1 (2020-03-13)Fixes bug when reading user attribute mappings.1.0.0 (2020-03-13)Fixes bug with Site note existingAdd feature to sync user attributes from Azure AD.0.2.11 (2020-01-13)Fixes bug where the max_length on a CharField wasn’t long enough for all choices to be stored.0.2.10 (2019-09-24)Fixes bug in 0.2.9 where cache key was failing.0.2.9 (2019-09-24)Update cache to work on a per-site basis.0.2.8 (2019-09-23)Fix bug where migrations were relying on undefined ordering.0.2.7 (2019-09-23)Fix tests to work with new default for login_enabled.0.2.6 (2019-09-23)Make sure migrations for sites_microsoft_auth run after migrations for sites framework.0.2.5 (2019-09-23)Add SiteConfiguration object for all sites during initial migrate.Change default for login_enabled to False0.2.4 (2019-09-23)Fix bug where ‘MicrosoftAuthenticationBackend` is not respectingsiteon the MicrosoftAccount model.0.2.3 (2019-09-23)Fixed bug withMicrosoftAuthenticationBackendnot restricting users to their respective sites.0.2.2 (2019-09-23)Updated package name tosites_microsoft_authfrommicrosoft_auth0.2.1 (2019-09-23)Updated documentation.0.2.0 (2019-09-23)First working release on PyPi
Package: django-site-status
=====Django Site Status=====.. image:: https://badge.fury.io/py/django-site-status.png:target: http://badge.fury.io/py/django-site-statusDjango Site Status is a simple Django app to display time based statuses to your users.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "site_status" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'site_status',)2. Add the status context processor to your template context processors like this::TEMPLATE_CONTEXT_PROCESSORS = (...'site_status.context_processors.inject_statuses')3. Run `python manage.py migrate` to create the status models.4. Use statuses anywhere you like in your templates::{% for status in statuses %}...{% endfor %}
Package: django-sitesutils
Withdjango-sitesutilsyou’re able to access current site, usingrequest.siteeverywhere you can accessrequestobject.Current site is detected using host domain fromrequestobject andSITE_IDproject setting as a fallback. If site is found, thenrequest.siteis set to the respectiveSitemodel object fromdjango.contrib.siteapp, otherwiserequest.siteis adjango.contrib.sites.models.RequestSiteinstance.InstallationInstalldjango-sitesutilsusing pip:$ pip install django-sitesutilsAddRequestSiteMiddlewareto yourMIDDLEWARE_CLASSESsetting:MIDDLEWARE_CLASSES = (
    # ...
    'sitesutils.middleware.RequestSiteMiddleware',
)This middleware will setsiteattribute for therequestobject.
This attribute is evaluated lazily, only when you access it.If you want to access current site in templates, addsitecontext
processor to yourTEMPLATE_CONTEXT_PROCESSORSsettings:TEMPLATE_CONTEXT_PROCESSORS = (
    # ...
    'sitesutils.context_processors.site',
)ContributingFeel free to fork, send pull requests or report bugs and issues on github.
Package: django-sitetables
https://github.com/idlesign/django-sitetablesDescriptionReusable application for Django featuring DataTables integrationOffers:Various data sources support: models, query sets, list of dicts.Serverside tables support.DataTablesplugins support: styling, internationalization, etc.Template tags for easy js and css inclusion.Template tags for DOM-based tables.How to useFirst place table definition intoviews.py:fromdjango.shortcutsimportrenderfromsitetables.toolboximportTablefrom.modelsimportEntriesdefentries(request):# We create table from entries queryset,table_entries=Table(Entries.objects.filter(hidden=False))returnrender(request,'entries.html',{'table_entries':table_entries})Next create page templateentries.html:{% load sitetables %}<!-- The following line usually goes into head tag. It'll load all needed css. -->{% sitetables_css table_entries %}<!-- The following resides in body tag. Note that in this scenario
     thead and tbody will be populated using JS automatically. --><tableid="table-entries"></table><scripttype="text/javascript">$(function(){<!--Initializetableusinggeneratedconfig.-->$('#table-entries').dataTable({%sitetable_configtable_entries%});});</script><!-- The following line usually goes somewhere near the end of the body.
     It'll load all needed js. -->{% sitetables_js table_entries %}Done.More information is available in the documentation.Documentationhttp://django-sitetables.readthedocs.org/
Package: django-site-tag
Django site tagDjango site tag allows you to set 'tags' on each page of your website to indicate current environment, developemnt stages, or whatever else you may want to use such a feature for.Installationpipinstallgit+https://github.com/yudori/django-site-tag.gitSetupAfter installation, add thedjango_site_tagapp name to the list of installed apps.INSTALLED_APPS=[...# django apps'django_site_tag',...# custom apps]Add the site tag middleware to the middleware list.MIDDLEWARE=[...# django middleware list'django_site_tag.middleware.SiteTagMiddleware',...# custom middleware list]CustomizationCustomization options are provided via django settings. Set any of the following values to add customizations to your site tags.Setting NameTypeDescriptionExample ValueSITE_TAG_POSITIONstringspace-separated css position values in the order: top, right, bottom ,left representing the position of the site tag'15px 0px 0px 15px'SITE_TAG_TEXTstringThe text to be written on the tag'TEST'SITE_TAG_TEXT_STYLEstringThe css style to be applied to the text'padding: 10px;'SITE_TAG_TEXT_BORDER_STYLEstringThe css style to be applied to the border around the text'2px dashed #ff0000;'SITE_TAG_IMAGEstringThe url to the image file to be used instead of text'/static/images/tag.jpg'
Package: django-sitetree
http://github.com/idlesign/django-sitetreeWhat’s thatdjango-sitetree is a reusable application for Django, introducing site tree, menu and breadcrumbs navigation elements.Site structure in django-sitetree is described through Django admin interface in a so called site trees.
Every item of such a tree describes a page or a set of pages through the relation of URI or URL to human-friendly title. Eg. using site tree editor in Django admin:URI             Title
  /             - Site Root
  |_users/      - Site Users
    |_users/13/ - Definite UserAlas the example above makes a little sense if you have more than just a few users, that’s why django-sitetree supports Django template tags in item titles and Django named URLs in item URIs.
If we define a named URL for user personal page in urls.py, for example, ‘users-personal’, we could change a scheme in the following way:URI                           Title
  /                           - Site Root
  |_users/                    - Site Users
    |_users-personal user.id  - User Called {{ user.first_name }}After setting up site structure as a sitetree you should be able to use convenient and highly customizable site navigation means (menus, breadcrumbs and full site trees).User access to certain sitetree items can be restricted to authenticated users or more accurately with the help of Django permissions system (Auth contrib package).Sitetree also allows you to define dynamic trees in your code instead of Admin interface. And even more: you can combine those two types of trees in more sophisticated ways.Documentationhttp://django-sitetree.readthedocs.org/
Package: django-siteupdate
Thanks for downloading django-siteupdate!
This is a simple Django admin interface for updating a Django site.
The following features are implemented:Run simple site updates from the Django adminDatabase driven log entries for all siteupdatesProcess your update by a simple server command (for example a bash script)Posibility to execute a post process command (for example to restart apache or touch your wsgi file)For installation instructions please see INSTALL.txt
Package: django-site-warnings
django-site-warningsDjango application allow to create site warnings, make subscription, and receive notifies.Installpip install django-site-warningsUsagepro/views.pyfromdjango_site_warnings.modelsimportWaringCategoryfromdjango_site_warnings.modelsimportWarningdefbackground_sync_work(request):try:pass# do your own workexceptExceptionaserror:category=WaringCategory.get("warning category code")Warning.make(category,f"background_sync_work failed:{error}")pro/settingsINSTALLED_APPS=['...','django_site_warnings','...',]# work together with django-admin-global-sidebarDJANGO_ADMIN_GLOBAL_SIDEBAR_MENUS="pro.menus.site_menu"DJANGO_SITE_WARNING_SITE_NAME="Site Warning"# sendmail_notify settingsDJANGO_SITE_WARNING_NOTIFY_MAIL_FROM="sender@example.com"DJANGO_SITE_WARNING_NOTIFY_MAIL_TO=["receiver@example.com"]DJANGO_SITE_WARNING_NOTIFY_MAIL_SERVER="smtp.example.com"DJANGO_SITE_WARNING_NOTIFY_MAIL_PORT=465DJANGO_SITE_WARNING_NOTIFY_MAIL_SSL=TrueDJANGO_SITE_WARNING_NOTIFY_MAIL_USER="sender@example.com"DJANGO_SITE_WARNING_NOTIFY_MAIL_PASSWORD="sender-password-MlPzC9kt"# use `DJANGO_SITE_WARNING_NOTIFY_MAIL_CONFIG` to replace the configs above.# `DJANGO_SITE_WARNING_NOTIFY_MAIL_CONFIG` can also be a string path of a function that returns server infoDJANGO_SITE_WARNING_NOTIFY_MAIL_CONFIG={"from_address":"sender@example.com","to_addresses":["receiver@example.com"],"server":"smtp.example.com","port":465,"ssl":True,"user":"sender@example.com","password":"sender-password-MlPzC9kt",}DJANGO_SITE_WARNING_NOTIFY_MAIL_CONFIGcallback function should define as:defget_notify_mail_config(warning,payload,force):return{"from_address":"sender@example.com","to_addresses":["receiver@example.com"],"server":"smtp.example.com","port":465,"ssl":True,"user":"sender@example.com","password":"sender-password-MlPzC9kt",}pro/menus.pyfromdjango_site_warnings.global_sidebarimportdjango_site_warnings_menu_item_of_applistdefsite_menu(request=None):return[{"title":_("Home"),"icon":"fa fa-home","url":"/admin/",},{"title":_("System Settings"),"icon":"fas fa-cogs","children":[{"title":_("User Manage"),"icon":"fas fa-user","model":"auth.user","permissions":["auth.view_user"],},{"title":_("Group Manage"),"icon":"fas fa-users","model":"auth.group","permissions":["auth.view_group"],},django_site_warnings_menu_item_of_applist,]}]Releasesv0.1.2First release.v0.1.4Make title length longer.v0.1.6Test for Django 3.2.Work with django-simpletask2.v0.2.0Add django_site_warnings.global_sidebar.django_site_warnings_menu_item_of_warning, django_site_warnings.global_sidebar.django_site_warnigns_menu_item_of_category and django_site_warnings.global_sidebar.django_site_warnings_menu_item_of_applist to work with django-admin-global-sidebar.WaringCategory.get will auto create category instance if it is missing.Register sendmail_notify to Warning by default.v0.2.1Show notify send result.v0.2.2Doc update.v0.3.7AddDJANGO_SITE_WARNING_NOTIFY_MAIL_CONFIGsupport.No django-site-warning-server anymore.
Package: django-sitewide
Sitewide is a Django app for creating and maintaining a consistent look across a django websieDetailed documentation is in the “docs” directory.Quick startAdd “sitewide” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...,
    "sitewide",
]Include the sitewide URLconf in your project urls.py like this:path("", include("sitewide.urls")),Runpython manage.py migrateto create the model for sitewide settings.To use sitewide, import it into the relevant views.py module and assign it to a variable within a view. Make the variable available to the template of choice via view-render contexts