Saravanan666/pypi-org huggingface dataset:
Package: django-flashcard
What is the motivation behind the project?To provide a tool to quickly review new/old vocabulary, definitions
and other stuff which can be resumed in under 200 words.InstallationUsually:$ python setup.py installshould do it. If you don’t have root access, then issue the following
command:$ python setup.py install –userBuiling it outThis project is developed with the help of buildout [1], vim, and a lot
of love.Generally, to replicate my working environment, issue the following commands:$ python bootstrap.py && ./bin/buildoutThis may take some time, but believe me it’s worth it. :-)[1]http://www.buildout.orgContributeYou have a great idea, like to report/squash a bug, or write some code? Your my man.Check out the GitHub project page:https://github.com/km0r3/django-flashcardCoding guidelinesTrying to follow PEP8, and the KISS and DRY principle.
Package: django-flashcookie
Example:views.pydef some_action(request):
    ...
    request.flash['error'] = "You can't post comments in this section"
    return HttpReponseRedirect("/")base.html{% if flash %}
    {% for message in flash.error %}
        {{ message }}
    {% endfor %}
{% endif %}Download:hg clonehttp://bitbucket.org/offline/django-flashcookie/
Package: django-flashpolicies
This application provides management of Flash cross-domain access
policies forDjangosites. For
example, the following URL pattern is all you’d need to set up
cross-domain access for Flash files served from your media server:fromdjango.urlsimportpathfromflashpolicies.viewsimportallow_domainsurlpatterns=[# ...your other URL patterns here...path('crossdomain.xml',allow_domains,{'domains':['media.example.com']}),]Various other views are included, handling other common and
not-so-common cases, as well as utilities for generating custom
cross-domain policies.Full documentation for all functionality is also included andavailable online.
Package: django-flasky
Write a Django site which looks like Flask, then turn it into a proper Django site when
it starts to get complicated.QuickstartInstall django-flasky:pip install django-flaskyWrite a Django app in the same style as you would a Flask app, but using models and other Django goodness:fromdjango.dbimportmodelsfromdjango_flaskyimportDjangoapp=Django()classCountLog(models.Model):timestamp=models.DateTimeField(auto_now_add=True)@app.route("/")defcount(request):CountLog.objects.create()returnf"<p>Number of page loads:{CountLog.objects.count()}</p>"Save that ascounter.pyand run it with:django-flaskycounter.pyrunmigratedjango-flaskycounter.pyrunIt will create your database in adb.sqlite3file next to yourcounter.py.Why would you do this? Why?Developers often begin projects with Flask because it looks easier to get started with
than Django, but as the project grows it’s easy for it to become an unmaintainable
mashup of third party libraries and hand-rolled bodges just to begin to get close to
what Django offers out of the box.As someone who has often been brought in to try to rescue these projects, I decided that
enough is enough - it is time to eliminate that excuse for picking Flask over Django.Django-Flasky makes it as easy to start a Django project as it is to start a Flask
project, but because it’s using Django from the start you’ll be able to take advantage
of everything that Django has to offer - models, admin, forms, and the rest - and then
switch to a normal Django site structure when you’re ready to do things properly.Using django-flaskySettingsOverride settings by passing them into yourDjango(..)object constructor, eg:app=Django(SECRET_KEY="some-secret",ALLOWED_HOSTS=["lol.example.com"])Templates and static filesPlace your templates and static assets next tohello_world.py, under atemplatesandstaticdirectory respectively.LimitationsDjango really doesn’t like running from a single file, so measures were taken during the
development of Django-Flasky which may lead to problems as your project grows.It is strongly recommended that this project is not used for anything serious.Converting to a sensible Django projectOnce you’ve got a couple of models and views, you’ll start thinking “Hey, maybe I should
start splitting this project into apps”. You are correct, and now is the time to turn
your project into an actual Django project.One day you will be able to run:django-flaskyhello.pyupgradeThis will do its best to break up yourhello_world.pyinto a proper Django project
underhello_world.Right now though, this is not implemented, so you’ll just need to do it yourself - put
your models in yourmodels.py, your views inviews.pyand routes inurls.py.
Package: django-flatblocks-xtd
django-flatblocks-xtd=====================|TravisCI|_.. |TravisCI| image:: https://secure.travis-ci.org/danirus/django-flatblocks-xtd.png?branch=master.. _TravisCI: https://travis-ci.org/danirus/django-flatblocks-xtddjango-flatblocks-xtd is a fork of `django-flatblocks <https://github.com/zerok/django-flatblocks>`_ that uses `django-inline-media <https://github.com/danirus/django-inline-media>`_'s `TextFieldWithInlines` rather than `TextFields` so that you can add inline content to your flatblocks.Tested under:* Python 3.2 and django 1.6 `builds <http://buildbot.danir.us/builders/django-flatblocks-xtd-py32dj16>`_* Python 3.2 and django 1.5.5 `builds <http://buildbot.danir.us/builders/django-flatblocks-xtd-py32dj15>`_* Python 2.7 and django 1.5.5 `builds <http://buildbot.danir.us/builders/django-flatblocks-xtd-py27dj15>`_* Python 2.7 and django 1.4.10 `builds <http://buildbot.danir.us/builders/django-flatblocks-xtd-py27dj14>`_
Package: django-flatcontent
Django FlatContent is intended as a flatpages-like app but for smaller chunks
of content that can be edited in the Django admin.FeaturesSimple FlatContent modelTemplate tag for pulling FlatContent into templatesTemplate rendering of flatcontent itemsCaching of FlatContent for performanceInstallationpip install flatcontent.Addflatcontentto yourINSTALLED_APPS.Run the commandmanage.py migrateto install the models.UsageOnce content is available in theFlatContentmodel, it can be accessed via
the templates using the provided template tags:{% load flatcontent_tags %}
<div id="footer">
    {% flatcontent footer %}
</div>The above will perform a slug lookup on the text “footer” and return the
content associated with that slug.You can also put the content into a template variable for passing to other
template tags or filters.  For example, getting the footer and processing the
text through thetextilefilter:{% load flatcontent_tags markup %}
<div id="footer">
    {% flatcontent footer as content %}
    {{ content|textile }}
</div>Add context for flatcontent rendering using thewithkeyword. For example, if
you have a flatcontent item with the contentHomer {{ last_name }}, you could
use the following in your django template to achieveHomer Simpsonas the
output:{% load flatcontent_tags %}
{% flatcontent homer-simpson with last_name='Simpson' %}
Package: django-flat-json-widget
If you ever needed to store a flexible dictionary of keys and values in your
django models, you may have felt the need of giving your users a widget to
easily manipulate the data by adding or removing rows,
instead of having to edit the raw JSON.This package solves exactly that problem:it offers a widget to manipulate
a flat JSON object made of simple keys and values.CompatibilityTested on python >= 3.7 and Django >= 3.0.It should work also on previous versions of Django.Install stable version from pypiInstall from pypi:pipinstalldjango-flat-json-widgetUsageAddflat_json_widgettoINSTALLED_APPS:INSTALLED_APPS=[# other apps...'flat_json_widget',]Then load the widget where you need it, for example, here’s how to use it in the
django admin site:fromdjango.contribimportadminfromdjangoimportformsfrom.modelsimportJsonDocumentfromflat_json_widget.widgetsimportFlatJsonWidgetclassJsonDocumentForm(forms.ModelForm):classMeta:widgets={'content':FlatJsonWidget}@admin.register(JsonDocument)classJsonDocumentAdmin(admin.ModelAdmin):list_display=['name']form=JsonDocumentFormInstalling for developmentInstall your forked repo:gitclonegit://github.com/<your_fork>/django-flat-json-widgetcddjango-flat-json-widget/pythonsetup.pydevelopInstall development dependencies:pipinstall-e.[test]npminstall-gjslintstylelintCreate database:cdtests/./manage.pymigrate./manage.pycreatesuperuserLaunch development server:./manage.pyrunserver0.0.0.0:8000You can access the admin interface athttp://127.0.0.1:8000/admin/.Run tests with:./runtests.pyRun quality assurance tests with:./run-qa-checksContributingPlease refer to theOpenWISP contributing guidelines.ChangelogSeeCHANGES.LicenseSeeLICENSE.SupportSeeOpenWISP Support Channels.
Package: django-flatly
django-flatlyServing flat pages with Django without views and database.Helps to separate deployment of front- and backend.Compatibilitydjango>= 2.0python>= 3.6InstallationInstall the latest release with pip:pip install django-flatlyThan add a URL to urlpatterns:# urls.pyurlpatterns=[...,# all others urls above - flatly.urls last one to try!path('',include('flatly.urls')),]Quick startIn your root template directory createflatlyfolder.DefineFLATLY_TEMPLATE_ROOTsetting:FLATLY_TEMPLATE_ROOT='flatly'Any.htmlfiles you create in yourflatlydirectory
will be automatically served. So if you create a new fileflatly/about_us/overview.htmlthen it will be visible at/about-us/overview/.Note thatdjango-flatlyautomatically replaces underscores (_)
with dashes (-).Search pathSuppose you are requesting the page/account/user-profile/,django-flatlywill render the first template that exists:${FLATLY_TEMPLATE_ROOT}/account/user_profile${FLATLY_TEMPLATE_ROOT}/account/user_profile.html${FLATLY_TEMPLATE_ROOT}/account/user_profile/index.htmlSettingsTemplate rootdjango-flatlybased on Django'sget_templatefunction.
So, user can access any template on your website. You can
restrict access to certain templates by adding the path prefix
to the template name before search:FLATLY_TEMPLATE_ROOT='flatly'Note thatflatlyfolder can be located in both root and
application template directories.Defaults toflatly.Template engineYou can restrict the template search to a particular template engine.FLATLY_ENGINE='jinja2'Defaults toNone.Template cachingBy default (whenDEBUGisTrue), the template system
searches, reads and compiles your templates every time
they’re rendered. It's convenient for local development,
because no need to restart the server after adding/removing
templates.You can enforce template caching:FLATLY_CACHE_ENABLED=TrueThe cachedTemplateinstance is returned for subsequent
requests to load the same template.Defaults toTrueissettings.DEBUGisFalse.ExtensionsList of file extensions to iterate over all matching files.FLATLY_EXTENSIONS=['html','jinja2']Defaults to['html'].
Package: django-flatpages-i18n
Translatable version of django.contrib.flatpages with menu support.RequirementsDjangodjango_modeltransdjango_mpttdjango-pragmaticTested with Django 1.8.InstallationInstall python library using pip:pip installdjango-flatpages-i18nAddmptt,modeltransandflatpages_i18ntoINSTALLED_APPSin your Django settings fileMigrate your databaseSpecify desired languages in your Django settings file:from django.utils.translation import gettext

LANGUAGE_CODE = 'en'
LANGUAGES = (
    ('en', gettext('English')),
    ('de', gettext('German')),
)Addd'flatpages_i18n.urls'to your urls.py:if 'flatpages_i18n' in settings.INSTALLED_APPS:
    urlpatterns += i18n_patterns(
        path(pgettext_lazy('url', 'pages/'), include('flatpages_i18n.urls')),
    )UsageTo get all flatpages:In your HTML template:{% load i18n flatpages_i18n %}
{% get_flatpages_i18n as flatpages_i18n %}

<ul>
    {% for flatpage in flatpages_i18n %}
        <li><a href="{{ flatpage.get_absolute_url }}">{{ flatpage }}</a></li>
    {% endfor %}
</ul>To get flatpage by its PK:{% get_flatpage_i18n 123 as my_flatpage %}
{{ my_flatpage.content_i18n }}or by its machine_name:{% get_flatpage_i18n 'my-flatpage' as my_flatpage %}Menu system:To print all menu items:<div id="navigation">
    {% menu_i18n %}
</div>to get only children of menu item identified by its PK:<div id="navigation">
    {% menu_i18n 2 %}
</div>or by its machine_name:<div id="navigation">
    {% menu_i18n 'footer-menu' %}
</div>You can also assign menu items into variable:{% get_menu_i18n 'my-menu' as my_menu %}
{% for item in my_menu %}
    <a href="{{ item.get_absolute_url }}" target="{{ item.target }}">{{ item }}</a>
{% endfor %}AuthorsLibrary is byErik TelepovskyfromPragmatic Mates. Seeour other libraries.
Package: django-flatpages-multilanguage
Translatable version of django.contrib.flatpages with basic menu support.RequirementsDjangodjango_modeltranslationdjango_mpttTested with Django 1.8.InstallationInstall python library using pip:pip installdjango-flatpages-i18nAddmptt,modeltranslationandflatpages_i18ntoINSTALLED_APPSin your Django settings fileAddflatpages_i18n.middleware.FlatpageFallbackMiddlewaretoMIDDLEWARE_CLASSESin your Django settings fileSpecify desired languages in your Django settings file:from django.utils.translation import gettext

LANGUAGE_CODE = 'en'
LANGUAGES = (
    ('en', gettext('English')),
    ('de', gettext('German')),
)Migrate your databaseRunsync_translation_fieldsandupdate_translation_fieldscommands (frommodeltranslationapp)If you want to use Redactor WYSIWYG editor (see settings below), you need to add'flatpages_i18n.urls'to your urls.py:if 'flatpages_i18n' in settings.INSTALLED_APPS:
    urlpatterns += i18n_patterns(
        url(r'^', include('flatpages_i18n.urls')),
    )UsageTo get all flatpages:In your HTML template:{% load i18n flatpages_i18n %}

{% get_available_languages as LANGUAGES %}
{% get_flatpages_i18n as flatpages_i18n %}

<ul>
    {% for flatpage in flatpages_i18n %}
        <li><a href="/{{ LANGUAGE_CODE }}{{ flatpage.url }}">{{ flatpage.title }}</a></li>
    {% endfor %}
</ul>To get flatpage by its PK:{% get_flatpage_i18n 123 as my_flatpage %}
{{ my_flatpage.content }}or by its machine_name:{% get_flatpage_i18n 'my-flatpage' as my_flatpage %}Menu system:To print all menu items:<div id="navigation">
    {% get_menu %}
</div>to get only children of menu item identified by its PK:<div id="navigation">
    {% get_menu 2 %}
</div>or by its machine_name:<div id="navigation">
    {% get_menu 'footer-menu' %}
</div>SettingsFLATPAGES_EDITORIf you wish to useRedactoras WYSIWYG editor, set it to'REDACTOR'. Default:None.FLATPAGES_REDACTOR_JSPath to Redactor .js file. Default:'js/redactor/redactor.js'.FLATPAGES_REDACTOR_CSSPath to Redactor .css file. Default:'css/redactor/redactor.css'.AuthorsLibrary is byErik TelepovskyfromPragmatic Mates. Seeour other libraries.
Package: django-flatpages-x
An extension to django.contrib.flatpages to provideBetter support formarkdownand other similar markup formats. We provide support for Markdown but you can write your own parser to support rst or creole.Optional support for the excellentmarkItUpjquery editor. This requires the installationdjango-markitup.Easy inclusion of images in flatpages. Viewing Adminimage thumbnailsrequires the installation ofsorl-thumbnail.The inclusion of HTMLmetatagssuch as keywords and descriptions in flatpages.Contentrevisions.Migrating you data to flapages_x should not be difficult since the
data which currently in the contrib.Flatpage model (content, titles) is not affected.
Your templates will still utilize the{{flatpage.content}}and{{flatpage.body}}context variables.
Once you install flatpages_x, the Markdown
is actually stored in the related Revisions model.
When you save a flatpage, this will be rendered as html via the markdown
parser and saved to the Flatpage.content fieldContributorsChristopher ClarkeLendl R SmithMikhail AndreevEddyMahmoud YaserQuickstartCreate a virtual environment for your project and activate it:$ virtualenv mysite-env
$ source mysite-env/bin/activate
(mysite-env)$Next installflatpages_x(mysite-env)$ pip install django-flatpages-xAddflatpages_xto your INSTALLED_APPS setting.Inside your project run:(mysite-env)$ python manage.py syncdbDjango-flatpages-x comes with support forMarkdownYou can also associate and display images with your flatpages.
To include your images in your content using reference-style image syntax looks like this![Atl text][image.pk]Where [image.pk] is the primary key of image the that you want to include.
The primary key of the image
should is visible in the flatpages Admin form which will now contains an inline image formmarkItUp supportIf you want to use the excellent markItUp! editor widget. Install django-markItUp:(mysite-env)$ pip install django-markitupYou need a few configuration stepsAdd ‘markitup’ to your INSTALLED_APPS setting.Add the following to settings:MARKITUP_SET = 'markitup/sets/markdown'
MARKITUP_SKIN = 'markitup/skins/markitup'
MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True})You need to use the AJAX-based preview for the admin widget:url(r'^markitup/', include('markitup.urls'))in your root URLconf.Admin thumbnailsIf you want view admin image thumbnails install sorl-thumbnail:(mysite-env)$ pip install sorl-thumbnailAddsorl.thumbnailto yoursettings.INSTALLED_APPS.Configure yoursettingsIf you are using the cached database key value store you need to sync the
database:python manage.py syncdbMarkup SupportDjango-flatpages-x come with a simple parser that supports Markdown. However,
you can supply your own parser by setting the value forFLATPAGES_X_PARSERto settings.py. So if you want to use a parsermyparser_parsersimply add
the following to you settingsFLATPAGES_X_PARSER= ["flatpages_x.markdown_parser.parse", {}]DocumentationSee thefull documentationfor more details.
Package: django-flatqueries
Installing the app package from PyPIIf you already have a working Django 1.3+ project and you just want to install the app:Get the package:pip install django-flatqueriesAdd ‘flatqueries’ to your INSTALLED_APPS in settings.py.Add this to your urls.py:(r’^flatqueries/’, ‘flatqueries.urls’)Create the database table required by this app:python manage.py syncdbGetting the sample projectThis project runs out-of-the box on Django 1.3. Here’s how:Grab the code.svn checkouthttp://django-flatqueries.googlecode.com/svn/trunkdjango-flatqueries-democd django-flatqueries-demo/sample_projectCreate the database.python manage.py syncdb
- Yes, create a superuserLoad the demo data. *(Optional, but see deployment note)python manage.py loaddata demo_data.jsonStart the local development server.python manage.py runserverLogin athttp://127.0.0.1:8000/adminto play with flatqueries.UsageTO RUN A FLATQUERYOn its view page, click the “view on site” button.Click the “Run” button.DEPLOYMENT: VERY IMPORTANTIf you put this on another domain, you need to make sure your “site” values
are correct. Otherwise, the “view on site” button will not work correctly!SECURITYFor editing, the standard Django Admin permissions apply. Any superuser will
be able to edit, as well as any staff person with the appropriate permissions.For running queries, an additional permission is needed for staff users.
Assign ‘flatqueries.can_run_query’ to grant this permission to users or groups.Still, be careful not to let query URLs fall into the hands of users you
don’t want running them. If you ignore this warning, then any trouble that
results is YOUR OWN FAULT. :P
Package: django-flat-theme
django-flat-themeis included aspartof Django fromversion 1.9! :tada:Please use this app if your project is powered by an older Django version.Descriptiondjango-flat-themebrings fresh air to the default Django Admin
interface which hasn’t changed in 10 years, since the very first version of
Django framework. This theme makes the UI modern and clean.This app overrides the default admin’s CSS. All the changes only involve CSS:
colors, margins, sizes and icons; nothing major is changed.InstallationInstall via pip:pip installdjango-flat-themePutflatapp in yourINSTALLED_APPSbeforedjango.contrib.admin:INSTALLED_APPS = (
    ...
    'flat',
    'django.contrib.admin',
    ...
)Enjoy!CompatibilityWorks properly in Django 1.5+.FontThis theme uses theRoboto fontwhich is under Apache 2.0 licence.TestingTested in:Internet Explorer 7+ (IE8 and less doesn’t support SVG so icons are not displayed)Firefox 30+ (Windows, Ubuntu, OS X)Chrome 35+ (Windows, Ubuntu, OS X)Safari 8 (OS X)Screenshot ExamplesLogin pageDashboardList of objectsNew object
Package: django-flexible-content-ckeditor
A flexible item type for django-flexible-content that implements a CKEditorWhy?Becausedjango-flexible-contentis designed to be as minimal as possible, its default set of item types was never meant to satisfy everyone. I designed this plugin for my own use, for obvious reasons: sometimes plain text isn’t featureful enough, and HTML isn’t a user-friendly option.What does it do?It allows user-friendly input of basic text:paragraphsbold, italic, underlinelistslinks (these can be configured)In addition, the underlying CKEditorField itself can optionally clean the submitted HTML, removing all fields except those above. So if you want to strip outside styles and tags at all cost, it can do that. Alternatively, if you want to leave room for small HTML tweaks, you can disable this as well.What doesn’t it do?It intentionallydoesn’tsupport uploading images or files. One of the ideas behinddjango-flexible-contentwas that those things are style-able and well-managed on the back-end.A few examples:If you want to display an image or download with a heading above it, a caption below it, or a description next to it, your image type can support that. A WYSIWYG editor almost never could.If you have the same PDF or image uploaded in 18 different places, you can choose how to handle that in your image type (offer a list of existing files; detect duplicate uploads and point all those references to a single version of the file).Technically, you could manually link to an uploaded file, or reference an image in the raw HTML… oh well.How do I set it up?Install the package:pip installdjango-flexible-content-ckeditorUpdate the project’s settings to include the package inINSTALLED_APPS:INSTALLED_APPS = (
    # your other apps here
    # ...
    'flexible_ckeditor',
)Update the project’s settings to include the new CKEditor flexible item type:FLEXIBLE_CONTENT = {
    'ITEM_TYPES': (
        'flexible_ckeditor.CKEditorText',

        # You'll probably want to include some of the default item types,
        # if you hadn't configured FLEXBILE_CONTENT['ITEM_TYPES'] yet.
        'default_item_types.Download',
        'default_item_types.Image',
        'default_item_types.Video',
    ),
}Restart your server and go!Can I use the editor elsewhere in my project?Yes! Though the editor may be trimmed down, it can be used to support basic formatting on arbitrary models, outside ofdjango-flexible-content’s content areas:from django.db import models
from flexible_ckeditor.fields import CKEditorField

class Person(models.Model):
    name = models.CharField(max_length=100)
    bio = CKEditorField()Note that it’ll still abide by the settings defined inFLEXIBLE_CONTENT['ckeditor'], such as whether or not to clean the HTML upon submission.