Awl Documentation. Release Christopher Trudeau
|
|
- Lucas Lang
- 6 years ago
- Views:
Transcription
1 Awl Documentation Release Christopher Trudeau Jan 09, 2018
2
3 Contents 1 Installation 3 2 Supports 5 3 Docs & Source 7 4 Contents Admin Tools Context Processors CSS Colours View Decorators Abstract Models Models RankedModel RankedModel Admin Template Tags & Filters Utilities Waelsteng Indices and tables 23 Python Module Index 25 i
4 ii
5 Yet another catch-all of tools for django. Includes utilities for admin, context processors, CSS colours, view and model mixins, template tags and unit testing. Contents 1
6 2 Contents
7 CHAPTER 1 Installation $ pip install django-awl 3
8 4 Chapter 1. Installation
9 CHAPTER 2 Supports django-awl has been tested with Python 2.7, 3.5, 3.6 and Django 1.11 and
10 6 Chapter 2. Supports
11 CHAPTER 3 Docs & Source Docs: Source: Version:
12 8 Chapter 3. Docs & Source
13 CHAPTER 4 Contents 4.1 Admin Tools A collection of utilites for writing better django admin objects. awl.admintools.admin_obj_attr(obj, attr) A safe version of :func:utils.get_obj_attr that returns and empty string in the case of an exception or an empty object awl.admintools.admin_obj_link(obj, display= ) Returns a link to the django admin change list with a filter set to only the object given. Parameters obj Object to create the admin change list display link for display Text to display in the link. Defaults to string call of the object Returns Text containing HTML for a link awl.admintools.make_admin_obj_mixin(name) This method dynamically creates a mixin to be used with your ModelAdmin classes. The mixin provides utility methods that can be referenced in side of the admin object s list_display and other similar attributes. Parameters name Each usage of the mixin must be given a unique name for the mixin class being created Returns Dynamically created mixin class The created class supports the following methods: add_obj_ref(funcname, attr, [title, display]) Django admin list_display does not support the double underscore semantics of object references. This method adds a function to the mixin that returns the str(obj) value from object relations. Parameters 9
14 funcname Name of the function to be added to the mixin. In the admin class object that includes the mixin, this name is used in the list_display tuple. attr Name of the attribute to dereference from the corresponding object, i.e. what will be dereferenced. This name supports double underscore object link referencing for models. ForeignKey members. title Title for the column of the django admin table. If not given it defaults to a capitalized version of attr display What to display as the text in the column. If not given it defaults to the string representation of the object for the row: str(obj). This parameter supports django templating, the context for which contains a dictionary key named obj with the value being the object for the row. add_obj_link(funcname, attr, [title, display]) This method adds a function to the mixin that returns a link to a django admin change list page for the member attribute of the object being displayed. Parameters Example usage: funcname Name of the function to be added to the mixin. In the admin class object that includes the mixin, this name is used in the list_display tuple. attr Name of the attribute to dereference from the corresponding object, i.e. what will be lined to. This name supports double underscore object link referencing for models. ForeignKey members. title Title for the column of the django admin table. If not given it defaults to a capitalized version of attr display What to display as the text for the link being shown. If not given it defaults to the string representation of the object for the row: str(obj). This parameter supports django templating, the context for which contains a dictionary key named obj with the value being the object for the row. # ---- models.py file ---- class Author(models.Model): name = models.charfield(max_length=100) class Book(models.Model): title = models.charfield(max_length=100) author = models.foreignkey(author, on_delete=models.cascade) # ---- admin.py file class Author(admin.ModelAdmin): list_display = ('name', ) mixin = make_admin_obj_mixin('bookmixin') mixin.add_obj_link('show_author', 'Author', 'Our Authors', '{{obj.name}} 10 Chapter 4. Contents
15 class BookAdmin(admin.ModelAdmin, mixin): list_display = ('name', 'show_author') A sample django admin page for Book would have the table: Name Hitchhikers Guide To The Galaxy War and Peace Dirk Gently Our Authors Douglas Adams (id=1) Tolstoy (id=2) Douglas Adams (id=1) Each of the items in the Our Authors column would be a link to the django admin change list for the Author object with a filter set to show just the object that was clicked. For example, if you clicked Douglas Adams (id=1) you would be taken to the Author change list page filtered just for Douglas Adams books. The add_obj_ref method is similar to the above, but instead of showing links, it just shows text and so can be used for view-only attributes of dereferenced objects. 4.2 Context Processors awl.context_processors.extra_context(request) Adds useful global items to the context for use in templates. request: the request object HOST: host name of server IN_ADMIN: True if you are in the django admin area 4.3 CSS Colours This module defines helpers for dealing with CSS colour strings. The following constants are available: PREDEFINED: Tuple of the predefined colour literals available in most web browsers HEX_MATCH [Compiled regular expression for HEX CSS colour values such as] #F1A or #AB4CD9 RGB_MATCH [Compiled regular expression for rgb function calls such as] rgb(0, 12, 255) RGBA_MATCH: Compiled regular expression for rgba function calls such as rgba(0, 12, 255, 0.3) HSL_MATCH: Compiled regular expression for hsl function calls such as hsl(120, 5%, 200%) HSLA_MATCH: Compiled regular expression for hsla function calls such as hsla(120, 5%, 200%, 0.3) awl.css_colours.is_colour(value) Returns True if the value given is a valid CSS colour, i.e. matches one of the regular expressions in the module or is in the list of predetefined values by the browser. 4.4 View Decorators awl.decorators.post_required(method_or_options=[]) View decorator that enforces that the method was called using POST. This decorator can be called with or 4.2. Context Processors 11
16 without parameters. As it is expected to wrap a view, the first argument of the method being wrapped is expected to be a request def some_view(request): 'lastname']) def some_view(request): pass The optional parameter contains a single list which specifies the names of the expected fields in the POST dictionary. The list is not exclusive, you can pass in fields that are not checked by the decorator. Parameters options List of the names of expected POST keys. 4.5 Abstract Models This is a collection of abstract django models that can be used as base classes or mixins with your regular django models. class awl.absmodels.timetrackmodel(*args, **kwargs) Abstract model with auto-updating create & update timestamp fields. Parameters created Date/time when the model was created updated Date/time when the model was last updated class awl.absmodels.validatingmixin(*args, **kwargs) Include this mixin to force model validation to happen on each save call. 4.6 Models This is a collection of django models base models that can be helpful in your implementations. class awl.models.choices A tuple of tuples pattern of ((id1, string1), (id2, string2)... ) is common in django for choices fields, etc. This object inspects its own members (i.e. the inheritors) and produces the corresponding tuples. class Colours(Choices): RED = 'r' LIGHT_BLUE = 'b' >> Colours.RED 'r' >> list(colours) [('r', 'Red'), ('b', 'Light Blue')] A member value can also be a tuple to override the default string class Colours(Choices): RED = 'r' BLUE = 'b', 'Blueish' 12 Chapter 4. Contents
17 >> list(colours) [('r', 'Red'), ('b', 'Blueish')] A inheriting class can also add or override members. class Colours(Choices): RED = 'r' BLUE = 'b' class MoreColours(Colours): GREEN = 'g' BLUE = 'b', 'Even More Blue' >> list(colours) [('r', 'Red'), ('b', 'Even More Blue'), ('g', 'Green')] class awl.models.counter(*args, **kwargs) A named counter in the database with atomic update. classmethod increment(name) Call this method to increment the named counter. This is atomic on the database. Parameters name Name for a previously created Counter object class awl.models.lock(*args, **kwargs) Implements a simple global locking mechanism across database accessors by using the select_for_update() feature. Example: # run once, or use a fixture Lock.objects.create(name='everything') # views.py def something(request): Lock.lock_until_commit('everything') classmethod lock_until_commit(name) Grabs this lock and holds it (using select_for_update()) until the next commit is done. Parameters name Name for a previously created Lock object class awl.models.querysetchain(*subquerysets) Chains together multiple querysets (possibly of different models) and behaves as one queryset. Supports minimal methods needed for use with django.core.paginator. Does not support re-ordering or re-filtering across the set. q1 = Thing.objects.filter(foo) q2 = Stuff.objects.filter(bar) qsc = QuerySetChain(q1, q2) init (*subquerysets) count() Performs a.count() for all subquerysets and returns the number of records as an integer Models 13
18 4.7 RankedModel class awl.rankedmodel.models.rankedmodel(*args, **kwargs) Abstract model used to have all the inheritors ordered in the database by this model s rank field. Ranks can either be across all instances of the inheriting model, or in a series of groups. See RankedModel. group_filter for details on implementing grouping. The rank field can be set and saved like any other field. The overridden RankedModel.save method maintains rank integrity. The order is maintained but it is not guaranteed that there are not gaps in the rank count for simplicity re-ordering is not done on deletion. If empty slots are a concern, use RankedModel.repack. Warning: Due to the use of the overridden save() for integrity caution must be employed when dealing with any update() calls or raw SQL as these will not call the save() method. Two admin helper functions are provided so you can do rank re-ording in the django admin. To use the functions, add columns to your admin instances of the inheriting class: from awl.rankedmodel.admintools import (admin_link_move_up, class FavouritesAdmin(admin.ModelAdmin): list_display = ('name', 'rank', 'move_up', 'move_down') def move_up(self, obj): return admin_link_move_up(obj) move_up.allow_tags = True move_up.short_description = 'Move Up Rank' def move_down(self, obj): return admin_link_move_down(obj) move_down.allow_tags = True move_down.short_description = 'Move Down Rank' Parameters rank Ranked order of object init (*args, **kwargs) grouped_filter() This method should be overridden in order to allow groupings of RankModel objects. The default is there is a single group which are all instances of the inheriting class. An example with a grouped model would be: class Grouped(RankedModel): group_number = models.integerfield() def grouped_filter(self): return Grouped.objects.filter( group_number=self.group_number) Returns QuerySet of RankedModel objects that are in the same group. repack() Removes any blank ranks in the order. 14 Chapter 4. Contents
19 save(*args, **kwargs) Overridden method that handles that re-ranking of objects and the integrity of the rank field. Parameters rerank Added parameter, if True will rerank other objects based on the change in this save. Defaults to True. 4.8 RankedModel Admin Two admin helper functions are provided so you can do rank re-ording in the django admin. To use the helper functions you will need to have awl.rankedmodel in your INSTALLED_APPS and include the urls. INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'awl.rankedmodel', ) urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^rankedmodel/', include('rankedmodel.urls')), ] The provided functions act return links to a django admin view that can move the associated objects. To use them, add them as columns in the admin model of your inheriting class. from awl.rankedmodel.admin import admin_link_move_up, class FavouritesAdmin(admin.ModelAdmin): list_display = ('name', 'rank', 'move_up', 'move_down') def move_up(self, obj): return admin_link_move_up(obj) move_up.allow_tags = True move_up.short_description = 'Move Up Rank' def move_down(self, obj): return admin_link_move_down(obj) move_down.allow_tags = True move_down.short_description = 'Move Up Rank' awl.rankedmodel.admintools.admin_link_move_down(obj, link_text= down ) Returns a link to a view that moves the passed in object down in rank. Parameters obj Object to move link_text Text to display in the link. Defaults to down Returns HTML link code to view for moving the object awl.rankedmodel.admintools.admin_link_move_up(obj, link_text= up ) Returns a link to a view that moves the passed in object up in rank RankedModel Admin 15
20 Parameters obj Object to move link_text Text to display in the link. Defaults to up Returns HTML link code to view for moving the object 4.9 Template Tags & Filters Custom Django Template Tags and Filters. awl.templatetags.awltags.accessor(parser, token) This template tag is used to do complex nested attribute accessing of an object. The first parameter is the object being accessed, subsequent paramters are one of: a variable in the template context a literal in the template context either of the above surrounded in square brackets For each variable or literal parameter given a getattr is called on the object, chaining to the next parameter. For any sqaure bracket enclosed items the access is done through a dictionary lookup. Example: {% accessor car where 'front_seat' [position] ['fabric'] %} The above would result in the following chain of commands: ref = getattr(car, where) ref = getattr(ref, 'front_seat') ref = ref[position] return ref['fabric'] This tag also supports as syntax, putting the results into a template variable: {% accessor car 'interior' as foo %} awl.templatetags.awltags.getitem(dictionary, keyvar) Custom django template filter that allows access to an item of a dictionary through the key contained in a template variable. Example: context_data = { 'data':{ 'foo':'bar', }, 'key':'foo', } template = Template('{% load awltags %}{{data getitem:key}}') context = Context(context_data) result = template.render(context) >>> result 'bar' 16 Chapter 4. Contents
21 Note: Any KeyErrors are ignored and return an empty string 4.10 Utilities Whenever a developer names something utils it really means stuff I don t know where to put. class awl.utils.urltree A tree representation of the django url paths. Each path is stored in a dictionary with its regex pattern, full path, name (if available) and children. Root items in the tree can be accessed through the children list attribute. init () as_list() Returns a list of strings describing the full paths and patterns along with the name of the urls. Example: print_tree() Convenience method for printing the results of URLTree.as_list to STDOUT awl.utils.get_field_names(obj, ignore_auto=true, ignore_relations=true, exclude=[]) Returns the field names of a Django model object. Parameters obj the Django model class or object instance to get the fields from ignore_auto ignore any fields of type AutoField. Defaults to True ignore_relations ignore any fields that involve relations such as the ForeignKey or ManyToManyField exclude exclude anything in this list from the results Returns generator of found field names awl.utils.get_obj_attr(obj, attr) Works like getattr() but supports django s double underscore object dereference notation. Example usage: >>> get_obj_attr(book, 'writer age') 42 >>> get_obj_attr(book, 'publisher address') <Address object at 105a79ac8> Parameters obj Object to start the derference from attr String name of attribute to return Returns Derferenced object Raises AttributeError in the attribute in question does not exist awl.utils.refetch(obj) Queries the database for the same object that is passed in, refetching its contents in case they are stale. Parameters obj Object to refetch Returns Refreshed version of the object Utilities 17
22 awl.utils.refetch_for_update(obj) Queries the database for the same object that is passed in, refetching its contents and runs select_for_update() to lock the corresponding row until the next commit. Parameters obj Object to refetch Returns Refreshed version of the object awl.utils.render_page(request, page_name, data={}) Deprecated since version 0.12: Use django.shortcuts.render instead This function was a wrapper for render_to_response that handled request context. shortcuts.render method does the same thing, so this just wraps that now. awl.utils.render_page_to_string(request, page_name, data={}) A shortcut for using render_to_string with a RequestContext automatically. The django Waelsteng [wel stæ ] / noun 1. literal: death pole or slaugher pole ; 2. Anglo Saxon tool for impailing enemies or those who had done wrong; 3. A collection of django testing tools Testing Django Views class awl.waelsteng.fakerequest(user=none, method= GET, cookies={}, data={}) Simulates a request object init (user=none, method= GET, cookies={}, data={}) Constructor Parameters user Django User object to include in the request. Defaults to None. If none is given then the parameter is not set at all method Request method. Defaults to GET cookies Dict containing cookies for the request. Defaults to empty data Dict for get or post fields. Defaults to empty Testing Admin Classes awl.waelsteng.create_admin(username= admin, = admin@admin.com, password= admin ) Create and save an admin user. Parameters username Admin account s username. Defaults to admin Admin account s address. Defaults to admin@admin.com password Admin account s password. Defaults to admin Returns Django user with staff and superuser privileges 18 Chapter 4. Contents
23 class awl.waelsteng.admintoolsmixin This mixin is used to help test django admin objects using the django client interface. A superuser is created during setup which can then be used throughout. Note: AdminToolsMixin.initiate must be called in the inheritor s TestCase.setUp method to properly initialize. Once AdminToolsMixin.intiate is called, the following will be available: Parameters site An instance of an AdminSite to test against admin_user A User object with staff and superuser privileges = 'admin@admin.com' Admin account s during the tests PASSWORD = 'admin' Admin account s password during the tests USERNAME = 'admin' Admin account s username during the tests authed_get(url, response_code=200, headers={}, follow=false) Does a django test client get against the given url after logging in the admin first. Parameters url URL to fetch response_code Expected response code from the URL fetch. This value is asserted. Defaults to 200 headers Optional dictionary of headers to send in the request follow When True, the get call will follow any redirect requests. Defaults to False. Returns Django testing Response object authed_post(url, data, response_code=200, follow=false, headers={}) Does a django test client post against the given url after logging in the admin first. Parameters url URL to fetch data Dictionary to form contents to post response_code Expected response code from the URL fetch. This value is asserted. Defaults to 200 headers Optional dictionary of headers to send in with the request Returns Django testing Response object authorize() Authenticates the superuser account via the web login. field_names(admin_model) Returns the names of the fields/columns used by the given admin model. Parameters admin_model Instance of a admin.modeladmin object that is responsible for displaying the change list Waelsteng 19
24 Returns List of field names field_value(admin_model, instance, field_name) Returns the value displayed in the column on the web interface for a given instance. Parameters admin_model Instance of a admin.modeladmin object that is responsible for displaying the change list instance Object instance that is the row in the admin change list Field_name Name of the field/column to fetch initiate() Sets up the AdminSite and creates a user with the appropriate privileges. This should be called from the inheritor s TestCase.setUp method. visit_admin_link(admin_model, instance, field_name, response_code=200, headers={}) This method is used for testing links that are in the change list view of the django admin. For the given instance and field name, the HTML link tags in the column are parsed for a URL and then invoked with AdminToolsMixin.authed_get. Parameters admin_model Instance of a admin.modeladmin object that is responsible for displaying the change list instance Object instance that is the row in the admin change list field_name Name of the field/column to containing the HTML link to get a URL from to visit response_code Expected HTTP status code resulting from the call. The value of this is asserted. Defaults to 200. headers Optional dictionary of headers to send in the request Returns Django test Response object Raises AttributeError If the column does not contain a URL that can be parsed WRunner This is an alternate to DiscoverRunner. Main differences are: Creates and destroys a media directory for uploads during testing Calls a dynamic method for loading test data Allows for short-form versions of test labels Sets static file handling to StaticFilesStorage Like any other runner, you can use it for your django tests by changing your settings: TEST_RUNNER = 'awl.waelsteng.wrunner' Configuration is done inside of the django settings module: WRUNNER = { 'CREATE_TEMP_MEDIA_ROOT':True, 'TEST_DATA':'package.module.function_name' } 20 Chapter 4. Contents
25 If CREATE_TEMP_MEDIA_ROOT is set, then a directory is created and the settings.media_root attribute is changed for the tests. The directory is then destoryed upon test completion. If TEST_DATA is set, then the named function is loaded and run after the database is created. This hook can be used to create test data. Shortcut test labels (using wrench.waelstow.find_shortcut_tests()) are supported by this runner. Any label that starts with = is checked against all tests for substring matches Waelsteng 21
26 22 Chapter 4. Contents
27 CHAPTER 5 Indices and tables genindex modindex search 23
28 24 Chapter 5. Indices and tables
29 Python Module Index a awl.absmodels, 12 awl.admintools, 9 awl.context_processors, 11 awl.css_colours, 11 awl.decorators, 11 awl.models, 12 awl.rankedmodel.admintools, 15 awl.rankedmodel.models, 14 awl.templatetags.awltags, 16 awl.utils, 17 awl.waelsteng, 18 25
30 26 Python Module Index
31 Index Symbols init () (awl.models.querysetchain method), 13 init () (awl.rankedmodel.models.rankedmodel method), 14 init () (awl.utils.urltree method), 17 A accessor() (in module awl.templatetags.awltags), 16 admin_link_move_down() (in module awl.rankedmodel.admintools), 15 admin_link_move_up() (in module awl.rankedmodel.admintools), 15 admin_obj_attr() (in module awl.admintools), 9 admin_obj_link() (in module awl.admintools), 9 AdminToolsMixin (class in awl.waelsteng), 18 as_list() (awl.utils.urltree method), 17 authed_get() (awl.waelsteng.admintoolsmixin method), 19 authed_post() (awl.waelsteng.admintoolsmixin method), 19 authorize() (awl.waelsteng.admintoolsmixin method), 19 awl.absmodels (module), 12 awl.admintools (module), 9 awl.context_processors (module), 11 awl.css_colours (module), 11 awl.decorators (module), 11 awl.models (module), 12 awl.rankedmodel.admintools (module), 15 awl.rankedmodel.models (module), 14 awl.templatetags.awltags (module), 16 awl.utils (module), 17 awl.waelsteng (module), 18 C Choices (class in awl.models), 12 count() (awl.models.querysetchain method), 13 Counter (class in awl.models), 13 create_admin() (in module awl.waelsteng), 18 E (awl.waelsteng.admintoolsmixin attribute), 19 extra_context() (in module awl.context_processors), 11 F field_names() (awl.waelsteng.admintoolsmixin method), 19 field_value() (awl.waelsteng.admintoolsmixin method), 20 G get_field_names() (in module awl.utils), 17 get_obj_attr() (in module awl.utils), 17 getitem() (in module awl.templatetags.awltags), 16 grouped_filter() (awl.rankedmodel.models.rankedmodel method), 14 I increment() (awl.models.counter class method), 13 initiate() (awl.waelsteng.admintoolsmixin method), 20 is_colour() (in module awl.css_colours), 11 L Lock (class in awl.models), 13 lock_until_commit() (awl.models.lock class method), 13 M make_admin_obj_mixin() (in module awl.admintools), 9 P PASSWORD (awl.waelsteng.admintoolsmixin attribute), 19 post_required() (in module awl.decorators), 11 print_tree() (awl.utils.urltree method), 17 Q QuerySetChain (class in awl.models), 13 27
32 R RankedModel (class in awl.rankedmodel.models), 14 refetch() (in module awl.utils), 17 refetch_for_update() (in module awl.utils), 17 render_page() (in module awl.utils), 18 render_page_to_string() (in module awl.utils), 18 repack() (awl.rankedmodel.models.rankedmodel method), 14 S save() (awl.rankedmodel.models.rankedmodel method), 15 T TimeTrackModel (class in awl.absmodels), 12 U URLTree (class in awl.utils), 17 USERNAME (awl.waelsteng.admintoolsmixin attribute), 19 V ValidatingMixin (class in awl.absmodels), 12 visit_admin_link() (awl.waelsteng.admintoolsmixin method), Index
django-embed-video Documentation
django-embed-video Documentation Release 0.7.stable Juda Kaleta December 21, 2013 Contents i ii Django app for easy embeding YouTube and Vimeo videos and music from SoundCloud. Repository is located on
More informationdjango-embed-video Documentation
django-embed-video Documentation Release 1.1.2-stable Juda Kaleta Nov 10, 2017 Contents 1 Installation & Setup 3 1.1 Installation................................................ 3 1.2 Setup...................................................
More informationdjango-scaffold Documentation
django-scaffold Documentation Release 1.1.1 James Stevenson May 27, 2015 Contents 1 Installation 3 2 Creating an app to extend scaffold 5 2.1 1. Create a new application........................................
More informationdjango-conduit Documentation
django-conduit Documentation Release 0.0.1 Alec Koumjian Apr 24, 2017 Contents 1 Why Use Django-Conduit? 3 2 Table of Contents 5 2.1 Filtering and Ordering.......................................... 5
More informationdjango-model-report Documentation
django-model-report Documentation Release 0.2.1 juanpex Nov 06, 2017 Contents 1 Demo 3 1.1 User Guide................................................ 3 1.2 Modules.................................................
More informationDjango starting guide
Django starting guide (and much more ) Alessandro Bucciarelli Outline Lesson 1 Intro to versioning systems (Git) Intro to Python and basic data structures Django Lesson 2 Interaction between Django and
More informationdjango-embed-video Documentation
django-embed-video Documentation Release 0.6.stable Juda Kaleta October 04, 2013 CONTENTS i ii Django app for easy embeding YouTube and Vimeo videos and music from SoundCloud. Repository is located on
More informationDjango Phantom Theme Documentation
Django Phantom Theme Documentation Release 1.1 Przemyslaw bespider Pajak for EggForSale Sep 28, 2017 Contents 1 Features 3 2 Authors and Contributors 5 3 Licence 7 4 Support or Contact 9 5 Instalation
More informationdjango-baton Documentation
django-baton Documentation Release 1.3.1 abidibo Nov 05, 2018 Contents 1 Features 3 2 Getting started 5 2.1 Installation................................................ 5 2.2 Configuration...............................................
More informationdjango-ratelimit-backend Documentation
django-ratelimit-backend Documentation Release 1.2 Bruno Renié Sep 13, 2017 Contents 1 Usage 3 1.1 Installation................................................ 3 1.2 Quickstart................................................
More informationdjango-slim Documentation
django-slim Documentation Release 0.5 Artur Barseghyan December 24, 2013 Contents i ii django-slim Contents 1 2 Contents CHAPTER 1 Description Simple implementation of multi-lingual
More informationdjango-baton Documentation
django-baton Documentation Release 1.0.7 abidibo Nov 13, 2017 Contents 1 Features 3 2 Getting started 5 2.1 Installation................................................ 5 2.2 Configuration...............................................
More informationBambu API Documentation
Bambu API Documentation Release 2.0.1 Steadman Sep 27, 2017 Contents 1 About Bambu API 3 2 About Bambu Tools 2.0 5 3 Installation 7 4 Basic usage 9 5 Questions or suggestions? 11 6 Contents 13 6.1 Defining
More informationDjam Documentation. Release Participatory Culture Foundation
Djam Documentation Release 0.1.0 Participatory Culture Foundation December 24, 2013 Contents 1 Links 3 2 Getting Started 5 2.1 Quick Start................................................ 5 2.2 Extending
More informationdjango-permission Documentation
django-permission Documentation Release 0.8.8 Alisue October 29, 2015 Contents 1 django-permission 1 1.1 Documentation.............................................. 1 1.2 Installation................................................
More informationpysharedutils Documentation
pysharedutils Documentation Release 0.5.0 Joel James August 07, 2017 Contents 1 pysharedutils 1 2 Indices and tables 13 i ii CHAPTER 1 pysharedutils pysharedutils is a convenient utility module which
More informationalphafilter Documentation
alphafilter Documentation Release 0.6 coordt September 09, 2013 CONTENTS i ii alphafilter Documentation, Release 0.6 Contents: CONTENTS 1 alphafilter Documentation, Release 0.6 2 CONTENTS CHAPTER ONE
More informationdjango-image-cropping Documentation
django-image-cropping Documentation Release 1.1.0 Jonas und der Wolf Nov 06, 2017 Contents 1 Installation 3 2 Configuration 5 3 Admin Integration 7 4 Backends 9 5 Frontend 11 5.1 easy_thumbnails.............................................
More informationDJOAuth2 Documentation
DJOAuth2 Documentation Release 0.6.0 Peter Downs Sep 27, 2017 Contents 1 Important Links 1 2 What is DJOAuth2? 3 3 Why use DJOAuth2? 5 4 What is implemented? 7 5 Quickstart Guide 9 5.1 Requirements...............................................
More informationdjango-oauth2-provider Documentation
django-oauth2-provider Documentation Release 0.2.7-dev Alen Mujezinovic Aug 16, 2017 Contents 1 Getting started 3 1.1 Getting started.............................................. 3 2 API 5 2.1 provider.................................................
More informationDjango PAM Documentation
Django PAM Documentation Release 1.4.1 Carl J. Nobile Aug 01, 2018 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Configuration...............................................
More informationska Documentation Release Artur Barseghyan
ska Documentation Release 1.6.7 Artur Barseghyan February 09, 2017 Contents 1 Key concepts 3 2 Features 5 2.1 Core ska module.............................................
More informationspaste Documentation Release 1.0 Ben Webster
spaste Documentation Release 1.0 Ben Webster May 28, 2015 Contents 1 Application Overview 3 1.1 Snippets................................................. 3 1.2 Contact Form...............................................
More informationDjango Extra Views Documentation
Django Extra Views Documentation Release 0.12.0 Andrew Ingram Nov 30, 2018 Contents 1 Features 3 2 Table of Contents 5 2.1 Getting Started.............................................. 5 2.2 Formset Views..............................................
More informationEasy-select2 Documentation
Easy-select2 Documentation Release 1.2.2 Lobanov Stanislav aka asyncee September 15, 2014 Contents 1 Installation 3 2 Quickstart 5 3 Configuration 7 4 Usage 9 5 Reference 11 5.1 Widgets..................................................
More informationFriday, 11 April 14. Advanced methods for creating decorators Graham Dumpleton PyCon US - April 2014
Advanced methods for creating decorators Graham Dumpleton PyCon US - April 2014 Intermission Rant about the history of this talk and why this topic matters. Python decorator syntax @function_wrapper def
More informationbzz Documentation Release Rafael Floriano and Bernardo Heynemann
bzz Documentation Release 0.1.0 Rafael Floriano and Bernardo Heynemann Nov 15, 2017 Contents 1 Getting Started 3 2 Flattening routes 5 3 Indices and tables 7 3.1 Model Hive................................................
More informationcanary Documentation Release 0.1 Branton K. Davis
canary Documentation Release 0.1 Branton K. Davis August 18, 2012 CONTENTS 1 Installation 3 1.1 Installing Canary Reports........................................ 3 1.2 Running the Demo Project........................................
More informationDjango File Picker Documentation
Django File Picker Documentation Release 0.5 Caktus Consulting Group LLC Nov 06, 2017 Contents 1 Dependencies 3 1.1 Required................................................. 3 1.2 Optional.................................................
More informationdjango-secure Documentation
django-secure Documentation Release 0.1.2 Carl Meyer and contributors January 23, 2016 Contents 1 Quickstart 3 1.1 Dependencies............................................... 3 1.2 Installation................................................
More informationDjango Extras Documentation
Django Extras Documentation Release 0.2.7.b1 Tim Savage September 22, 2017 Contents 1 Django Extras documentation 1 1.1 Project Status............................................... 1 1.2 Getting help...............................................
More informationDjango-Select2 Documentation. Nirupam Biswas
Nirupam Biswas Mar 07, 2018 Contents 1 Get Started 3 1.1 Overview................................................. 3 1.2 Installation................................................ 3 1.3 External Dependencies..........................................
More informationRuntime Dynamic Models Documentation Release 1.0
Runtime Dynamic Models Documentation Release 1.0 Will Hardy October 05, 2016 Contents 1 Defining a dynamic model factory 1 1.1 Django models.............................................. 1 1.2 Django s
More informationdjango-avatar Documentation
django-avatar Documentation Release 2.0 django-avatar developers Oct 04, 2018 Contents 1 Installation 3 2 Usage 5 3 Template tags and filter 7 4 Global Settings 9 5 Management Commands 11 i ii django-avatar
More informationMIT AITI Python Software Development Lab DJ1:
MIT AITI Python Software Development Lab DJ1: This lab will help you get Django installed and write your first application. 1 Each person in your group must complete this lab and have it checked off. Make
More informationDjango File Picker Documentation
Django File Picker Documentation Release 0.5 Caktus Consulting Group LLC Oct 31, 2017 Contents 1 Dependencies 3 1.1 Required................................................. 3 1.2 Optional.................................................
More informationSpaceEZ Documentation
SpaceEZ Documentation Release v1.0.0 Juniper Networks Inc. July 13, 2015 Contents 1 Class Index 1 2 Module Index 3 3 Rest 5 4 Resource 9 5 Collection 13 6 Method 17 7 Service 19 8 Application 21 9 Async
More informationDjango Admin Sortable Documentation
Django Admin Sortable Documentation Release 1.7.0 Brandon Taylor September 28, 2016 Contents 1 Supported Django Versions 3 1.1 Django 1.4.x............................................... 3 1.2 Django
More informationdjango-model-utils Documentation
django-model-utils Documentation Release 3.1.1 Carl Meyer Jan 10, 2018 Contents 1 Contents 3 1.1 Setup................................................... 3 1.1.1 Installation...........................................
More informationKiki Documentation. Release 0.7a1. Stephen Burrows
Kiki Documentation Release 0.7a1 Stephen Burrows August 14, 2013 CONTENTS i ii Kiki Documentation, Release 0.7a1 Kiki is envisioned as a Django-based mailing list manager which can replace Mailman. CONTENTS
More informationUNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 164 Spring 2005 P. N. Hilfinger Project #2: Static Analyzer for Pyth Due: Wednesday, 6 April
More informationdjango-precise-bbcode Documentation
django-precise-bbcode Documentation Release 1.0.x Morgan Aubert Aug 12, 2018 Contents 1 Features 3 2 Using django-precise-bbcode 5 2.1 Getting started.............................................. 5 2.2
More informationdjango-revproxy Documentation
django-revproxy Documentation Release 0.9.14 Sergio Oliveira Jun 30, 2017 Contents 1 Features 3 2 Dependencies 5 3 Install 7 4 Contents: 9 4.1 Introduction...............................................
More informationLinguistic Architecture
Linguistic Architecture Modeling Software Knowledge SoftLang Team, University of Koblenz-Landau Prof. Dr. Ralf Lämmel Msc. Johannes Härtel Msc. Marcel Heinz Outline Motivating Software Documentation Classic
More informationDjango: Views, Templates, and Sessions
Django: Views, Templates, and Sessions CS 370 SE Practicum, Cengiz Günay (Some slides courtesy of Eugene Agichtein and the Internets) CS 370, Günay (Emory) Django Views/Templates Spring 2014 1 / 7 Agenda
More informationCGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message.
What is CGI? The Common Gateway Interface (CGI) is a set of standards that define how information is exchanged between the web server and a custom script. is a standard for external gateway programs to
More informationdjango-allauth-2fa Documentation
django-allauth-2fa Documentation Release 0.4.3 Víðir Valberg Guðmundsson, Percipient Networks Apr 25, 2018 Contents: 1 Features 3 2 Compatibility 5 3 Contributing 7 3.1 Running tests...............................................
More informationDjango REST Framework JSON API Documentation
Django REST Framework JSON API Documentation Release 2.0.0-alpha.1 Jerel Unruh Jan 25, 2018 Contents 1 Getting Started 3 1.1 Requirements............................................... 4 1.2 Installation................................................
More informationdjango-push Documentation
django-push Documentation Release 1.1 Bruno Renié Jun 06, 2018 Contents 1 Installation 3 2 Manual 5 2.1 Being a publisher............................................. 5 2.2 Being a subscriber............................................
More informationGraphene Documentation
Graphene Documentation Release 1.0.dev Syrus Akbary Nov 09, 2017 Contents 1 Introduction tutorial - Graphene and Django 3 1.1 Set up the Django project........................................ 3 1.2 Hello
More informationDjango Data Importer Documentation
Django Data Importer Documentation Release 2.2.1 Valder Gallo May 15, 2015 Contents 1 Django Data Importer 3 1.1 Documentation and usage........................................ 3 1.2 Installation................................................
More informationneo4django Documentation
neo4django Documentation Release 0.1.8-dev Matt Luongo Sep 09, 2017 Contents 1 Details 3 1.1 Getting Started.............................................. 3 1.2 Writing Models..............................................
More informationZeroVM Package Manager Documentation
ZeroVM Package Manager Documentation Release 0.2.1 ZeroVM Team October 14, 2014 Contents 1 Introduction 3 1.1 Creating a ZeroVM Application..................................... 3 2 ZeroCloud Authentication
More informationdjango-auditlog Documentation
django-auditlog Documentation Release 0.4.3 Jan-Jelle Kester Jul 05, 2017 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Usage...................................................
More informationDjango Concurrency Documentation
Django Concurrency Documentation Release 1.5.a20180306090556 Stefano Apostolico Mar 06, 2018 Contents 1 Overview 1 2 How it works 3 3 Table Of Contents 5 4 Links 25 i ii CHAPTER 1 Overview django-concurrency
More informationVector Issue Tracker and License Manager - Administrator s Guide. Configuring and Maintaining Vector Issue Tracker and License Manager
Vector Issue Tracker and License Manager - Administrator s Guide Configuring and Maintaining Vector Issue Tracker and License Manager Copyright Vector Networks Limited, MetaQuest Software Inc. and NetSupport
More informationdjango-avatar Documentation
django-avatar Documentation Release 2.0 django-avatar developers Sep 27, 2017 Contents 1 Installation 3 2 Usage 5 3 Template tags and filter 7 4 Global Settings 9 5 Management Commands 11 i ii django-avatar
More informationdjango-organizations Documentation
django-organizations Documentation Release 1.1.1 Ben Lopatin Aug 29, 2018 Contents 1 Getting started 3 1.1 Installation................................................ 3 1.2 Configuration...............................................
More informationDjango Synctool Documentation
Django Synctool Documentation Release 1.0.0 Preston Timmons November 01, 2014 Contents 1 Basic usage 3 1.1 How it works............................................... 4 2 Installation 5 3 Contents 7 3.1
More informationSQL Deluxe 2.0 User Guide
Page 1 Introduction... 3 Installation... 3 Upgrading an existing installation... 3 Licensing... 3 Standard Edition... 3 Enterprise Edition... 3 Enterprise Edition w/ Source... 4 Module Settings... 4 Force
More informationCIS192 Python Programming
CIS192 Python Programming HTTP Requests and HTML Parsing Robert Rand University of Pennsylvania March 30, 2016 Robert Rand (University of Pennsylvania) CIS 192 March 30, 2016 1 / 19 Outline 1 HTTP Requests
More informationbehave-webdriver Documentation
behave-webdriver Documentation Release 0.0.1a Spencer Young Mar 08, 2018 Contents 1 behave-webdriver 1 1.1 Installation................................................ 1 1.2 Quickstart................................................
More informationCE419 Web Programming. Session 15: Django Web Framework
CE419 Web Programming Session 15: Django Web Framework Web Applications & Databases In modern Web applications, the arbitrary logic often involves interacting with a database. Behind the scenes, a database-driven
More informationRa Documentation. Release. Brandicted
Ra Documentation Release Brandicted Oct 05, 2017 Contents 1 Table of Contents 3 1.1 Getting Started.............................................. 3 1.2 Writing Tests...............................................
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu Rwanda Summer 2011 Django 01: Models Models Suppose we want to create a web application to manage data about thousands of movies What
More informationTastyTopping Documentation
TastyTopping Documentation Release 1.2.5 Christian Boelsen August 10, 2015 Contents 1 Contents 3 1.1 Getting Started.............................................. 3 1.2 Authentication..............................................
More informationMyGeotab Python SDK Documentation
MyGeotab Python SDK Documentation Release 0.8.0 Aaron Toth Dec 13, 2018 Contents 1 Features 3 2 Usage 5 3 Installation 7 4 Documentation 9 5 Changes 11 5.1 0.8.0 (2018-06-18)............................................
More informationdjango-sticky-uploads Documentation
django-sticky-uploads Documentation Release 0.2.0 Caktus Consulting Group October 26, 2014 Contents 1 Requirements/Installing 3 2 Browser Support 5 3 Documentation 7 4 Running the Tests 9 5 License 11
More informationLotus IT Hub. Module-1: Python Foundation (Mandatory)
Module-1: Python Foundation (Mandatory) What is Python and history of Python? Why Python and where to use it? Discussion about Python 2 and Python 3 Set up Python environment for development Demonstration
More informationDjango urls Django Girls Tutorial
Django urls Django Girls Tutorial about:reader?url=https://tutorial.djangogirls.org/en/django_urls/ 1 di 6 13/11/2017, 20:01 tutorial.djangogirls.org Django urls Django Girls Tutorial DjangoGirls 6-8 minuti
More informationdjango-renderit Documentation
django-renderit Documentation Release 1.2 jsoares Nov 20, 2017 Contents 1 Installation 3 2 Getting Started 5 2.1 Basic Usage............................................... 5 2.2 Extra Arguments.............................................
More informationCIS192 Python Programming
CIS192 Python Programming HTTP & HTML & JSON Harry Smith University of Pennsylvania November 1, 2017 Harry Smith (University of Pennsylvania) CIS 192 Lecture 10 November 1, 2017 1 / 22 Outline 1 HTTP Requests
More informationpylatexenc Documentation
pylatexenc Documentation Release 1.2 Philippe Faist Apr 28, 2017 Contents: 1 Simple Parser for LaTeX Code 3 1.1 The main LatexWalker class....................................... 3 1.2 Exception Classes............................................
More informationnptdms Documentation Release Adam Reeve
nptdms Documentation Release 0.11.4 Adam Reeve Dec 01, 2017 Contents 1 Contents 3 1.1 Installation and Quick Start....................................... 3 1.2 Reading TDMS files...........................................
More informationiwiki Documentation Release 1.0 jch
iwiki Documentation Release 1.0 jch January 31, 2014 Contents i ii Contents: Contents 1 2 Contents CHAPTER 1 Python 1.1 Python Core 1.1.1 Strings 1.1.2 Functions Argument Lists *args tuple/list **kwargs
More informationdjango-crucrudile Documentation
django-crucrudile Documentation Release 0.9.1 Hugo Geoffroy (pstch) July 27, 2014 Contents 1 Installation 1 1.1 From Python package index....................................... 1 1.2 From source...............................................
More informationdragonfluid Documentation
dragonfluid Documentation Release 0.9.0.a5 Charles J. Daniels September 25, 2015 Contents 1 Welcome to dragonfluid! 3 1.1 About................................................... 3 1.2 It s Not For Everyone..........................................
More informationweb-transmute Documentation
web-transmute Documentation Release 0.1 Yusuke Tsutsumi Dec 19, 2017 Contents 1 Writing transmute-compatible functions 3 1.1 Add function annotations for input type validation / documentation..................
More informationdjango-openid Documentation
django-openid Documentation Release 2.0a Simon Willison September 27, 2017 Contents 1 Installation 3 2 Accepting OpenID 5 2.1 Redirecting somewhere else....................................... 6 2.2 Requesting
More informationCIS192 Python Programming
CIS192 Python Programming Generators Exceptions and IO Eric Kutschera University of Pennsylvania February 13, 2015 Eric Kutschera (University of Pennsylvania) CIS 192 February 13, 2015 1 / 24 Outline 1
More informationdjango-dajaxice Documentation
django-dajaxice Documentation Release 0.7 Jorge Bastida Nov 17, 2017 Contents 1 Documentation 3 1.1 Installation................................................ 3 1.2 Quickstart................................................
More informationGargoyle Documentation
Gargoyle Documentation Release 0.11.0 DISQUS Aug 27, 2017 Contents 1 Installation 3 1.1 Enable Gargoyle............................................. 3 1.2 Nexus Frontend.............................................
More informationChapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More informationflask-jwt-simple Documentation
flask-jwt-simple Documentation Release 0.0.3 vimalloc rlam3 Nov 17, 2018 Contents 1 Installation 3 2 Basic Usage 5 3 Changing JWT Claims 7 4 Changing Default Behaviors 9 5 Configuration Options 11 6 API
More information7401ICT eservice Technology. (Some of) the actual examination questions will be more precise than these.
SAMPLE EXAMINATION QUESTIONS (Some of) the actual examination questions will be more precise than these. Basic terms and concepts Define, compare and discuss the following terms and concepts: a. HTML,
More informationdjango-cron Documentation
django-cron Documentation Release 0.3.5 Tivix Inc. Mar 04, 2017 Contents 1 Introduction 3 2 Installation 5 3 Configuration 7 4 Sample Cron Configurations 9 4.1 Retry after failure feature........................................
More informationwagtailmenus Documentation
wagtailmenus Documentation Release 2.12 Andy Babic Nov 17, 2018 Contents 1 Full index 3 1.1 Overview and key concepts....................................... 3 1.1.1 Better control over top-level menu
More informationhca-cli Documentation
hca-cli Documentation Release 0.1.0 James Mackey, Andrey Kislyuk Aug 08, 2018 Contents 1 Installation 3 2 Usage 5 2.1 Configuration management....................................... 5 3 Development 7
More informationCourse Title: Python + Django for Web Application
Course Title: Python + Django for Web Application Duration: 6 days Introduction This course offer Python + Django framework ( MTV ) training with hands on session using Eclipse+Pydev Environment. Python
More informationdjango-debreach Documentation
django-debreach Documentation Release 1.4.1 Luke Pomfrey October 16, 2016 Contents 1 Installation 3 2 Configuration 5 2.1 CSRF token masking (for Django < 1.10)................................ 5 2.2 Content
More informationdoubles Documentation
doubles Documentation Release 1.1.0 Jimmy Cuadra August 23, 2015 Contents 1 Installation 3 2 Integration with test frameworks 5 2.1 Pytest................................................... 5 2.2 Nose...................................................
More informationContext-Oriented Programming with Python
Context-Oriented Programming with Python Martin v. Löwis Hasso-Plattner-Institut an der Universität Potsdam Agenda Meta-Programming Example: HTTP User-Agent COP Syntax Implicit Layer Activation Django
More informationBuilding a Django Twilio Programmable Chat Application
Building a Django Twilio Programmable Chat Application twilio.com/blog/08/0/python-django-twilio-programmable-chat-application.html March 7, 08 As a developer, I ve always wanted to include chat capabilities
More informationParis Documentation. Release. Jamie Matthews and Simon Holywell
Paris Documentation Release Jamie Matthews and Simon Holywell Mar 21, 2017 Contents 1 Philosophy 3 2 Installation 5 2.1 Packagist................................................. 5 2.2 Download.................................................
More informationCIS192 Python Programming
CIS192 Python Programming HTTP Requests and HTML Parsing Raymond Yin University of Pennsylvania October 12, 2016 Raymond Yin (University of Pennsylvania) CIS 192 October 12, 2016 1 / 22 Outline 1 HTTP
More informationdjango-mama-cas Documentation
django-mama-cas Documentation Release 2.4.0 Jason Bittel Oct 06, 2018 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Settings..................................................
More informationDjango Leaflet Documentation
Django Leaflet Documentation Release 0.20 Makina Corpus Oct 04, 2017 Contents 1 Installation 3 1.1 Configuration............................................... 3 1.2 Example.................................................
More informationsolrq Documentation Release Michał Jaworski
solrq Documentation Release 1.1.1 Michał Jaworski Mar 27, 2017 Contents 1 solrq 1 2 usage 3 2.1 quick reference.............................................. 4 3 contributing 7 4 testing 9 5 Detailed
More informationdjango-subdomains Documentation
django-subdomains Documentation Release 2.1.0 ted kaemming April 29, 2016 Contents 1 Installation 3 2 Quick Start 5 2.1 Example Configuration.......................................... 5 3 Basic Usage
More informationBabu Madhav Institute of Information Technology, UTU 2015
Five years Integrated M.Sc.(IT)(Semester 5) Question Bank 060010502:Programming in Python Unit-1:Introduction To Python Q-1 Answer the following Questions in short. 1. Which operator is used for slicing?
More information