Skip to main content

Django accounts app

Project description

# MP-Accounts

Django accounts app.

### Installation

Install with pip:

pip install django-mp-accounts

Add accounts to

urlpatterns += i18n_patterns(

path('account/', include('apps.accounts.urls')),


Add accounts to


### Profile model


from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User

class UserProfile(models.Model):

user = models.OneToOneField(
User, related_name='profile', on_delete=models.CASCADE)

mobile = models.CharField(_('Mobile number'), max_length=255, blank=True)

address = models.CharField(_('Address'), max_length=255, blank=True)

@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):

if not hasattr(instance, 'profile'):


from accounts import urls

app_name = urls.app_name

urlpatterns = urls.urlpatterns + [
# Custom patterns

Run migrations:
$ python migrate

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-mp-accounts, version 3.1
Filename, size File type Python version Upload date Hashes
Filename, size django-mp-accounts-3.1.tar.gz (13.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page