GithubHelp home page GithubHelp logo

regme's Introduction

Registration for MongoEngine

User registration and management library using MongoEngine

Features

  • Create inactive user
  • Generate activation token
  • Try to activate user via activation token
  • Set user password
  • Check is activation token expired
  • Integrate with django.contrib.auth
  • Registration form
  • Activation form
  • Sample/default registration templates

TODO

  • Django command to prune users that were not activated.

Installation

pip install regme

Configuration

In addition to MongoEngine Django support settings Regme requires following settings:

# The number of days activation token will be valid
ACCOUNT_ACTIVATION_DAYS = 7

# Regme custom user document for MongoEngine
# You should not change it unless you know what are you doing
MONGOENGINE_USER_DOCUMENT = 'regme.documents.User'

# Include regme into installed apps list 
INSTALLED_APPS = (
    # …
    'django.contrib.auth',
    # …
    'mongoengine.django.mongo_auth',
    # …
    'regme',
    # …
)

# Site information (domain and name) for use in activation mail messages
SITE = {'domain': 'domain.tld', 'name': 'Site Name'}

Usage

Simple

  • Include regme.urls into your urlconf.
  • Use tag {% url 'register' %} to point to the regme registration view.
  • (Optional) Override default templates placed in regme/templates folder.

Advanced

  • Use or subclass regme.forms.UserCreationForm and regme.forms.UserActivationForm manually.
  • Subclass regme.documents.User and perform whatever magic you want.

Contribute

Feel free to report any issue or fork this project on Regme Github page.

Authors

Serge Matveenko

License

Apache License. See LICENSE file.

regme's People

Contributors

l0rda avatar lig avatar

Watchers

 avatar  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.