Giter Club home page Giter Club logo

django-usergroups's Introduction

=================
Django Usergroups
=================

A simple application that adds basic, albeit extensible, functionality to
manage groups of users in a project.

Disclaimer
==========

This is a total rewrite of my ancient reusable group app. There are several
kinks that I have not yet worked out. I will be modifying my old projects to
support this application. There might be some backwards incompatible changes
to this application as well (class-, module- and attribute name  changes,
modified views, URL layout changes, improved way to register configs etc).

Installation and configuration
==============================

Add ``usergroups`` to ``INSTALLED_APPS`` in your project's settings module.

Add urls::

    (r'^', include('usergroups.urls')),

Create a model that extends the BaseGroup::

    class MyGroup(BaseGroup):
        extra = models.CharField(max_length=20)

Register the model::

    options.register('groups', MyGroup)

A list of groups should then be available at::

    /groups/

You can override default behaviour and settings by extending
``options.BaseUserGroupConfiguration`` (see ``options.py`` for details)::

    class MyConfig(options.BaseUserGroupConfiguration):
        paginate_members_by = 35

        list_template_name = 'my_list_template.html'

        def get_create_group_form(self):
            return MyGroupForm

And register the configuration::

    options.register('groups', MyGroup, MyConfig)

Examples
========

There are some non-exhaustive examples in the application `example` located in
the root directory of the repository.

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.