On 30 October 2015 at 09:55, Stephen McDonald <[email protected]> wrote:
> I can actually reproduce this using latest grappelli-safe > > The patch resolved the issue for the site permission field, but I get > duplicate fields for profile fields. > > Not sure what the solution is but I've opened an issue here: > > https://github.com/stephenmcd/mezzanine/issues/1449 > > Hi Stephen, I can also confirm - I've updated to the latest grapelli-safe and although Site Permissions is no longer duplicated, the profile fields are. I'd be interested in a solution too, if anyone manages to work it out. Seeya. Danny. > On Fri, Oct 30, 2015 at 7:33 AM, Ryne Everett <[email protected]> > wrote: > >> 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. >> >> >> I don't think that's the link you think it is. That patch removes the >> javascript hack (which is what you're referring to as the "solution") but >> turned out to also be the wrong solution and was never merged. >> >> The correct solution to that specific issue turned out to be >> https://github.com/stephenmcd/grappelli-safe/pull/56 and (assuming the >> duplicate field is a tabular inline) upgrading to grappelli-safe master may >> solve this issue as well. >> >> On Thu, Oct 29, 2015 at 3:12 PM, Danny <[email protected]> wrote: >> >>> 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 [email protected]. >>> 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>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 [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> 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 [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Stephen McDonald > http://jupo.org > > -- > 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
