Add permissions for Profile class

parent 3f34af3d
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-11-29 11:30
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='profile',
options={'permissions': (('can_edit_users', 'Can edit users'),), 'verbose_name': 'User'},
),
]
......@@ -39,6 +39,9 @@ class Profile(models.Model):
class Meta:
verbose_name = _("User")
app_label = "userprofile"
permissions = (
("can_edit_users", "Can edit users",),
)
def __str__(self):
"""Returns user username"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment