On 30/10/2015 12:39 AM, Chi-Cheong Weng wrote:
I still see this in the latest dev build. At the bottom of http://127.0.0.1:8000/admin/auth/user/2/, I see my user profile info (i.e. phonenumber and company) appear twice.

Hi Chi-Cheong,

As I said in the other email, this is easy enough to solve in the template, see https://github.com/ryneeverett/mezzanine/commit/801b66152b96f1ec0e14a52127484065742552b7 for how the duplicate SitePermissions was solved.

for mine, I just added the following line immediately after that change in my app's copy of templates/admin/base_site.html:
$("#id_myprofile-__prefix__-id").parent().remove();

My profile module is named 'myprofile' so you'd probably have to use 'userprofile' instead.

Hope this helps,

Seeya. Danny.

See screen capture. This is seen even in the latest dev branch.

My user profile module is as follows:
AUTH_PROFILE_MODULE = "userprofiles.UserProfile"
cat userprofiles/models.py
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from phonenumber_field.modelfields import PhoneNumberField
from companies.models import Company

class UserProfile(models.Model):
user = models.OneToOneField(User, unique=True, verbose_name=_('user'), related_name='user_profile')
    phonenumber = PhoneNumberField(null=True, blank=True)
    company = models.ForeignKey(Company, null=True)

    def __unicode__(self):
return u'%s %s (%s), %s' % (self.user.first_name, self.user.last_name, self.user.username, self.phonenumber)


--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com <mailto:mezzanine-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.


--
*Danny Sag*
Chairperson
Round World Events SA, Inc
City of Small Gods Terry Pratchett Fan Club - http://cityofsmallgods.org.au

*Nullus Anxietas VI - The Australian Discworld Convention* - http://ausdwcon.org
"The Discworld Grand Tour" - Adelaide SA, August 4-6, 2017

--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to