Saravanan666/pypi-org huggingface dataset:
Package: django-otto-admin
# django-otto-adminDjango admin customization app for [django-suit](https://github.com/darklow/django-suit)Would you like to have some google analytics report widgets in your admin index page? Then you're in the right place!![image](screenshot.png "Image")## Features- locales: en, it- custom copyright string- custom developed by string and url- custom support mailto- admin index with google analytics panel implemented through [analytics embed API](https://ga-dev-tools.appspot.com/)- Realtime active users- Traffic (sessions and users), last 15 days- Popular Page views, last 15 days- Top Browsers, last 15 days- Referral traffic, last 15 days- Visitors Countries, last 15 days- Social actions, last 15 days### Configure your analytics widgetsFollow the steps in the Google Identity Platform documentation to [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) from the [Google Developer Console](https://console.developers.google.com/).Once the service account is created, you can click the Generate New JSON Key button to create and download the key and add it to your project.Add the service account as a user in Google Analytics. The service account you created in the previous step has an email address that you can add to any of the Google Analytics views you'd like to request data from. It's generally best to only grant the service account read-only access.Then you will need to configure __otto\_admin__ with the json path and the view ID (continue reading).## Requirements- django-suit- google-api-python-client## Getting Started1. Install django-otto-admin```pip install django-otto-admin```2. Configure your django-suit installation3. Add `otto_admin` to your installed apps __before__ `suit````INSTALLED_APPS = ('otto_admin','suit','django.contrib.admin',# ...```4. Configure your settings## Settings configuration###__OA_ANALYTICS_CREDENTIALS_JSON (required)__full path to the json key file of your app service account###__OA_ANALYTICS_VIEW_ID (required)__id of the analytics view you want to show in the admin index###__OA_COPYRIGHT__Copyright string, default '2015 Otto srl'###__OA_SUPPORT_EMAIL__Mailto support email, default 'mail@otto.to.it'###__OA_POWERED_BY__Powered by string, default 'Otto srl'###__OA_POWERED_BY_URL__Powered by url, default 'http://www.otto.to.it'
Package: django-outbox
Capture all mails sent and show it in a simple web interface.Quick StartInstall the package in your environment:$pipinstalldjango-outboxConfigure your django development settings file to use file based email backend:fromosimportpathEMAIL_BACKEND='django.core.mail.backends.filebased.EmailBackend'EMAIL_FILE_PATH=path.join(ROOT_PATH,'tmp','app-mails')Also add django_outbox to your installed apps:INSTALLED_APPS+=('django_outbox',)Add the django outbox url to your urls.py:# urls.pyfromdjango.confimportsettings# This will prevent from showing the outbox in production. The outbox# will only be available when the DEBUG setting is true.ifsettings.DEBUG:urlpatterns+=patterns('',url(r'^outbox/',include('django_outbox.urls')),)Now just run your application indebugmode and access/outbox. All should be working!ContributingThis project usepytest. To run the tests just type:$py.test
Package: django_outbox_base_layout
=====Outbox Base Layout=====Outbox Base Layout is a simple Django app with a base layout for newprojects of Outbox Company. The app implements the sbadmin2 templatefor Django projects.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "outbox_base_layout" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'outbox_base_layout',]2. Include the base layout examples URLconf in your project urls.py like this::path('examples/', include('outbox_base_layout.urls')),3. Start the development server and visit http://127.0.0.1:8000/examples/.4. Visit http://127.0.0.1:8000/examples/ to view the base.
Package: django-outbox-hitcount
DJANGO OUTBOX HITCOUNTProject to make hitcount information more complex. Base onhttps://github.com/thornomad/django-hitcount, we build advance version that make device, OS, Browser, IP Geolocation, available in your website.All you need to do is:In your django EnvironmentInstall package to your environment> pip install django-outbox-hitcountAdd to INSTALLED_APPSINSTALLED_APPS = [        
    'django.contrib.sites', 
    'outbox_hitcount',
]Add SITE_ID in user settings.pySITE_ID = 1
USE_TZ = True    # set time zone True

# This setting just like django-hitcount library
HITCOUNT_KEEP_HIT_ACTIVE = { 'hours': 1 }
# HITCOUNT_HITS_PER_IP_LIMIT = 0  # unlimited
# HITCOUNT_EXCLUDE_USER_GROUP = ()  # not used
HITCOUNT_KEEP_HIT_IN_DATABASE = { 'days': 90 }Install requirementsActivate your environment using
> mkvirtualenv env_hitcountMigrate to create table to your database> python manage.py migrateRun project> python manage.py runserver
on you browser :
127.0.0.1:8000
Package: django-outbox-menu
DJANGO OUTBOX MENUMenu is almost use in every web project.With this library you can create menu for backend and frontend project without headache.
All you need to do is:In your django EnvironmentInstall package to your environment> pip install django-outbox-menuAdd to INSTALLED_APPSINSTALLED_APPS = [        
    'django.contrib.sites', 
    'menu',
]Add SITE_ID in user settings.pySITE_ID = 1Include library URLSurlpatterns += [
    path('', include('menu.urls')),
]Install requirementsActivate your environment using
> mkvirtualenv env_menuMigrate to create table to your database> python manage.py migrateIn your django TemplatesLoad menu tags> {% load menu_tags %}Generate menu> {% menu_create FRONTEND 0 as my_menu %}     
syntax :
    > menu_create <menu_kind> <menu_group> as var_name
    > menu_kind  : FRONTEND or BACKEND
    > menu_group : 
        0 : None (use only for FRONTEND)
        1 : Owner
        2 : Manager
        3 : Operator
        4 : Cashier
        etc ... (Update in admin page section [Menu Groups])

> {% for n in my_menu %}
    n have all menu fields such as :
    n.id
    n.parent_id
    n.name
    n.link
    n.icon
    n.is_external
    n.level
    n.haveChild
    n.haveChildEndTag
    You can use it inside for loop

> example in you templates
    <ul class="main-menu">
        {% menu_create FRONTEND 0 as my_menu %}                    
        {% for n in my_menu %}

            {% if forloop.first %}                      
                <li class="main-menu-active">
            {% else %}
                <li>
            {% endif %}

            {% if n.haveChild %}
                <a href="#"> {{n.name}}
                    {% if n.parent_id %}
                        <i class="zmdi zmdi-chevron-right text-to-right"></i>
                    {% endif %}
                </a>
                <ul class="sub-menu">                            
            {% else %}                                
                <a class="clear-content-right" href="#"> {{n.name}} </a>                            
            {% endif %}
                                                            
            
            {% for i in n.haveChildEndTag %}
                <!-- Count = {{forloop.counter}} -->
                {% if forloop.last %}
                    {% if n.parent_id %}
                        </li></ul>
                        {% if not n.haveChild %}                                                
                            </li> <!-- li -->                            
                        {% endif %}  
                    {% else %}
                        </li> <!-- Root -->
                    {% endif %}

                {% else %}
                    </li></ul>
                {% endif %}       

            {% endfor %}                            
                                        
        {% endfor %}                                        
    </ul>Run project> python manage.py runserver
on you browser :
127.0.0.1:8000
127.0.0.1:8000/menu
127.0.0.1:8000/admin
Package: django-outbox-middleware
Your project description goes hereDocumentationThe full documentation is athttps://django-outbox-middleware.readthedocs.io.QuickstartInstall Django Outbox Middleware:pip install django-outbox-middlewareAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_outbox_middleware.apps.DjangoOutboxMiddlewareConfig',...)Add it to yourMIDDLEWARE:# if django.VERSION >= (1, 10)MIDDLEWARE(...'django_outbox_middleware.middleware.OutboxMiddleware',...)# elseMIDDLEWARE_CLASSES=(...'django_outbox_middleware.middleware.OutboxMiddleware',...)FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-01-31)First release on PyPI.
Package: django-outlets
A reusable Django app that allows you to manage and display your stores.If you e.g. have different outlets, where you sell your products and those
scattered across the world’s surface, you can provide easy access to the
customer about where they can find them.The app includes simple management of countries and outlets and a google map
integration. For integration into the greatdjango-cms, seecmsplugin-django-outlets.InstallationTo get the latest stable release from PyPipipinstalldjango-outlets# optional if you want cms integrationpipinstallcmsplugin-django-outletsTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-outlets.git#egg=outletsAddoutletsto yourINSTALLED_APPSINSTALLED_APPS=(...,'outlets',# again just if you want cms integration add the following'cmsplugin_outlets',)Add theoutletsURLs to yoururls.pyurlpatterns=patterns('',...url(r'^outlets/',include('outlets.urls')),)Don’t forget to migrate your database./manage.pymigrateoutlets# and another optional line. You guessed it. Only if you require it to work
# in django-cms../manage.pymigratecmsplugin_outletsUsageIf you want to use the map, that comes with the default tempalte and you
override the template, keep in mind to to hook up the Google maps API and the
django-outletsgooglemap_outlets.jsinside the template if you haven’t
added it globally already.{% load staticfiles %}<scriptsrc="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=en"></script><scripttype="text/javascript"src="{% static "django_libs/js/maps.js"%}"></script><scripttype="text/javascript"src="{% static "outlets/js/googlemap_outlets.js"%}"></script>Check the Google API docs for further informationhttps://developers.google.com/maps/documentation/javascript/tutorial?hl=deTo be able to display your outlets on the map, everyOutletneeds to have
thelatandlonfield set properly.To customize the info boxes, that appear, when you click on the map markers,
you can override the template atoutlets/outlet_map_marker.html.When customizing theoutlets/outlet_list.htmltemplate, please note the
comments inside the template.CMS3 integrationIf you installed and added thecmsplugin-django-outletsapp as described
above, you can go ahead and create a page with the “Outlets Apphook” to it.That’s it.For more details on apphooks refer to the django-cms v3.x documentation itself.Template tagsget_outlet_countriesThis tag loads all outlet countries from within a template.Example:{% load outlets_tags %}

{% get_outlet_countries as countries %}<p>Visit our outlets in:</p><ul>{% for country in countries}<li><ahref="{{ country.get_absolute_url }}">{{ country.name }}</a></li>{% endfor %}</ul>ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-outletsmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django-outputs
# django-outputsOne Paragraph of project description goes here## Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.### PrerequisitesWhat things you need to install the software and how to install them` Give examples `### InstallingA step by step series of examples that tell you have to get a development env runningSay what the step will be` Give the example `And repeat` until finished `End with an example of getting some data out of the system or using it for a little demo## Running the testsExplain how to run the automated tests for this system### Break down into end to end testsExplain what these tests test and why` Give an example `### And coding style testsExplain what these tests test and why` Give an example `## DeploymentAdd additional notes about how to deploy this on a live system## Built With[Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used[Maven](https://maven.apache.org/) - Dependency Management[ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds## ContributingPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.## VersioningWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).## AuthorsBillie Thompson-Initial work- [PurpleBooth](https://github.com/PurpleBooth)See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.## LicenseThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details## AcknowledgmentsHat tip to anyone who’s code was usedInspirationetc
Package: django-overcomingbias-api
django-overcomingbias-apiis a standaloneDjangoapp which lets you create and manage an API to (some of) Robin Hanson’s content.It scrapes theovercomingbiasblog (and other
sites) and presents the data in a structured form via aRESTAPI.
(I may add a GraphQL API later, too.)Basic UsageA graphical user interface is provided through theDjango admin site.To initialise a database of all overcomingbias posts, use the “pull” button:Add new posts with “pull”, and update modified posts with “sync”.
(You can also add content from YouTube and Spotify.)Categorise content according to the “ideas” and “topics” it contains, or by generic
“tags”.
Use the admin site and customAdmin Actionsto manage content.Link the app in your URL config to access the REST API:# urls.pyurlpatterns=[...path("",include("obapi.urls")),...]You should then be able to access the automatic API documentation at URL/api/docs.Alternatively, provide your own views for each post:# urls.pyfromdjango.urlsimportpath,register_converterfromobapi.convertersimportOBPostNameConverterfrommyapp.viewsimportob_detail_viewregister_converter(OBPostNameConverter,"ob_name")urlpatterns=[...path("content/overcomingbias/<ob_name:item_id>",ob_detail_view,# custom viewname="obcontentitem_detail",),...]FeaturesCurrently, content can be scraped from the following sources:Theovercomingbiasblog (added automatically)Robin Hanson’shome pageYouTube videos (add videos manually using their URLs)Spotify podcast episodes (add episodes manually using their URLs)DocumentationRead the full documentationhere,
including theInstallation and Getting Started Guide.Bugs/RequestsPlease use theGitHub issue trackerto submit bugs or request features.ChangelogSee theChangelogfor a list of fixes and enhancements at each version.LicenseCopyright (c) 2022 Christopher McDonaldDistributed under the terms of theMITlicense.All overcomingbias posts are copyright the original authors.
Package: django-overcomingbias-pages
django-overcomingbias-pagesis a standaloneDjangoapp which provides a web interface to Robin Hanson’s content.FeaturesThe main features are:Scrape content from across the web (overcomingbias,YouTube,Spotifyand more) via the admin site.Search content withmeilisearch.Create sequences (series) of content and export them to PDF, epub, plaintext,
or any other format supported bypandoc.Persistent user accounts.ConfigurationTo configuredjango-overcomingbias-pages, add the following to your settings:# settings.py# add required appsINSTALLED_APPS=[# required for admin site / user accounts"django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages",# for collecting static files"django.contrib.staticfiles",# django-overcomingbias-api"ordered_model","obapi",# async tasks"huey.contrib.djhuey",# django-overcomingbias-pages"obpages",# custom form rendering"django.forms",]# Use the (custom) obpages user modelAUTH_USER_MODEL="obpages.User"Search is provided usingmeilisearch.
To configure search, first set up a MeiliSearch instance, and then set up the following
settings:# settings.pyMEILISEARCH_CLIENT={"url":"http://127.0.0.1:7700",}MEILISEARCH_INDEX="content"MEILISEARCH_CLIENTspecifies the location of the MeiliSearch instance, whileMEILISEARCH_INDEXcontrols which MeiliSearch index is used for search.
Indexes can be created, updated and deleted via the admin site.django-overcomingbias-pagesusesHueyto
run tasks asynchronously.
To enable this feature, follow theDjango/Huey instructions.
A minimal configuration is shown below:# settings.pyconnection_pool=ConnectionPool(host="127.0.0.1",port=6379,db=0,max_connections=100)# See docs for full list of settingsHUEY={"huey_class":"huey.PriorityRedisHuey","name":PROJECT_NAME,"connection":{"connection_pool":connection_pool,# see redis-py for more options# https://redis-py.readthedocs.io/en/latest/connections.html"read_timeout":0,},"consumer":{"workers":4,"worker_type":"thread",},}(Note that this requires (1) a Redis server running on localhost:6379 and (2) installing
viapip installdjango-overcomingbias-pages[redis].)Optionally, you can also configure Huey as youremail backend.Bugs/RequestsPlease use theGitHub issue trackerto submit bugs or request features.LicenseCopyright (c) 2022 Christopher McDonaldDistributed under the terms of theMITlicense.All overcomingbias posts are copyright the original authors.
Package: django-overextends
Created byStephen McDonaldIntroductionA Django reusable app providing theoverextendstemplate tag, a
drop-in replacement for Django’sextendstag, which allows you to
use circular template inheritance.The primary use-case foroverextendsis to simultaneously override
and extend templates from other reusable apps, in your own Django project.ExampleConsider the following settings module and templates, with the appsapp1andapp2bundled in the project, for example’s sake:# settings.py
INSTALLED_APPS = (
    "app1",
    "app2",
    "overextends",
)
TEMPLATE_LOADERS = (
    "django.template.loaders.filesystem.Loader",
    "django.template.loaders.app_directories.Loader",
)
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)

<!-- myproject/app1/templates/pages/page.html -->
<h1>Title</h1>
{% block main %}
<p>A paragraph in app1</p>
{% enblock %}
<footer>Copyright 2012</footer>

<!-- myproject/app2/templates/pages/page.html -->
{% overextends "pages/page.html" %}
{% block main %}
<p>A paragraph in app2, that wants to be on top of app1's main block</p>
{{ block.super }}
{% enblock %}

<!-- myproject/templates/pages/page.html -->
{% overextends "pages/page.html" %}
{% block main %}
{{ block.super }}
<p>A paragraph in the project's template directory, under the other main blocks</p>
{% enblock %}The resulting HTML rendered whenpages/page.htmlwas loaded would be:<h1>Title</h1>
<p>A paragraph in app2, that wants to be on top of app1's main block</p>
<p>A paragraph in app1</p>
<p>A paragraph in the project's template directory, under the other main blocks</p>
<footer>Copyright 2012</footer>For a detailed analysis of why you would use this approach, how it works,
and alternative approaches, read my initial blog post:Circular Template Inheritance for DjangoInstallationThe easiest way to install django-overextends is directly from PyPi
usingpipby running the following command:$ pip install -U django-overextendsOtherwise you can download django-overextends and install it directly
from source:$ python setup.py installProject ConfigurationOnce installed you can configure your project to use
django-overextends by adding theoverextendsapp to theINSTALLED_APPSin your project’ssettingsmodule:INSTALLED_APPS = (
    # ... other apps here ...
    'overextends',
)For Django 1.9+ you must add overextends to thebuiltinskey of yourTEMPLATESsetting:TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'APP_DIRS': True,
        'OPTIONS': {
            'builtins': ['overextends.templatetags.overextends_tags'],
        }
    },
]Note that while theoverextendstag is provided by the packageoverextends.templatetags.overextends_tags, it is unnecessary to use{% load overextends_tags %}in your templates. Like theextendstag,overextendsmust be the first tag in your template, so it is
automatically added to Django’s built-in template tags, removing the
need to load its tag library in each template.
Package: django-override-settings
django-override-settings provides an easy way to override settings in
Django tests.Theoverride_settingsclass can be used as either a class or
method decorator or as a context manager to temporarily override the
values of settings.  After each test case has finished (when using it
as a decorator) or after the context manager has exited, it resets the
values indjango.conf.settingsto what they were before.  This prevents
side-effects from creeping in and lets each test case run in its own
sandbox.This package also provides two convenience functions (with_appsandwithout_apps) to modify justINSTALLED_APPSas well as a
special object (SETTING_DELETED) to run tests without a given
setting defined.The functionality in this package will eventually be superseded when
Django 1.4 is released as it will come with a built-inoverride_settings.  But for those maintaining pre-1.4 codebases,
hopefully this package comes in handy.InstallationWe’re onPyPI:pip install django-override-settingsUsageIf you have a bunch of tests that require a given setting, you can
decorate the class and each test case will use that value.  For
example:from django.conf import settings
from django.test import TestCase
from override_settings import override_settings

@override_settings(FOO="abc")
class TestFoo(TestCase):
    def test_foo(self):
        self.assertEqual(settings.FOO, "abc")Or you can decorate a single test case and have it only apply on that
method:@override_settings(BAR="123")
class TestBar(TestCase):

    @override_settings(BAR="abc")
    def test_bar(self):
        self.assertEqual(settings.BAR, "abc")

    def test_bar_no_decoration(self):
        self.assertEqual(settings.BAR, "123")You can also use it as a context manager:class TestBar(TestCase):
    @override_settings(BAR="123")
    def test_bar(self):
        self.assertEqual(settings.BAR, "123")

        with override_settings(BAR="abc")
            self.assertEqual(settings.BAR, "abc")

        self.assertEqual(settings.BAR, "123")To modify justINSTALLED_APPS, usewith_appsorwithout_apps:from override_settings import with_apps, without_apps

class TestAppModifiers(TestCase):
    @with_apps('django.contrib.humanize')
    def test_humanize(self):
        # ...

    @without_apps('django.contrib.sites')
    def test_no_sites(self):
        # ...To run tests without a setting, useSETTING_DELETED:from override_settings import override_settings, SETTING_DELETED

class TestMissingSetting(TestCase):
    @override_settings(CUSTOM_OPTION=SETTING_DELETED)
    def test_delete_custom_option(self):
        """
        Useful to make sure a missing setting raises an Exception.
        """
        self.assertRaises(AttributeError, getattr, settings, 'CUSTOM_OPTION')RequirementsDjango >= 1.2ThanksJannis Leidelfor both theoriginal snippetand his work updating it
to work when decorating TestCases as part ofDjango proper.Joost Casseefor the idea ofSETTING_DELETEDas well aswith_appsandwithout_appsas part of hisdjango-analyticalproject.ContactIf you notice any bugs, pleaseopen a ticket.