Git Product home page Git Product logo

django-libs's Introduction

Django Libs

This project aims to provide commonly used building blocks for Django projects and applications.

Current features:

  • A custom testrunner that uses django-nose for discovering tests and django-coverage for automatically generating a coverage report on each test run
  • A factory for creating User objects
  • TestCase mixins to ease the process of testing views via self.client.get
  • A JSONResponseMixin
  • New generic class based view DetailViewWithPostAction which is able to handle custom post actions.
  • Template filter to provide field's verbose names
  • Template tag for displaying the currently selected main navigation item
  • Custom test_email_backend that sends emails to your own address no matter who the recepient is
  • Functions to test callable or non-callable views
  • Dummy views to test your 404 and 500 templates
  • RapidPrototypingView to render any template even when it has no view hooked up in urls.py.
  • AjaxRedirectMiddleware for jQuery AJAX calls that return 301 redirects
  • AjaxResponseMixin for views that can return their normal template or a partial template when it is an ajax call
  • AccessMixin which allows to use views with the login_required decorator based on a setting.
  • A context processor to add your analytics tracking code to your template context.
  • A decorator lockfile for wrapping handle methods of admin commands so that they never run twice at the same time.
  • A getCookie js function that can be used to retrieve the csrf token for AJAX POST requests.
  • A templatetag call which allows to call any method with params.
  • A SimpleTranslationMixin which adds a get_translaion method to a model that is registered with simple-translation.
  • A SimpleTranslationMixin which makes it easier to write factories for models that are registered with simple-translation.
  • Utilities for loading classes from a string like myproject.models.Foobar.

Coming soon:

  • View mixins to make class based views private for authenticated users
  • Extensive fabfile for checking pep8 compliancy, running tests, importing and exporting the database and locale files, dumping and loading fixtures etc.
  • Useful shell scripts to be installed on the server for various maintenance and deployment tasks
  • Smart urlpatterns to serve static and media files when you set DEBUG=False locally, no need to setup Apache on your development machine
  • A set of templates for django-registration and some partials for rendering forms compatible with Twitter Bootstrap.

Installation

To get the latest stable release from PyPi:

$ pip install django-libs

To get the latest commit from GitHub:

$ pip install -e git://github.com/bitmazk/django-libs.git#egg=django_libs

Usage

See the docs folder for descriptions of the different tools this project provides.

Or read the docs here: http://django-libs.readthedocs.org/en/latest/

Contribute

If you want to contribute to this project, please perform the following steps:

# Fork this repository
# Clone your fork
$ mkvirtualenv -p python2.7 django-libs
$ pip install -r requirements.txt

$ git co -b feature_branch master
# Implement your feature and tests
$ git add . && git commit
$ git push -u origin feature_branch
# Send us a pull request for your feature branch

django-libs's People

Contributors

mbrochh avatar dkaufhold avatar

Watchers

Brent Hoover avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.