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

lig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

regme's Issues

Unexpected error in create connection

Request Method: POST
After adding to setting.py
SITE = {'domain': 'domain.tld', 'name': 'Site Name'}

register page after form filling looks like this (assume mongodb error, but i checked Robomongo - it works and create connection):

Request URL: http://127.0.0.1:8000/reg/register/
Django Version: 1.6.2
Exception Type: error
Exception Value:

10061 ����������� �� �����������,

Exception Location: D:\WinPython-32bit-2.7.5.1\python-2.7.5\lib\socket.py in create_connection, line 571

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.