I should also mention that I have some AJAX calls for the same information
and they still work fine.  So I am quite certain it is in the Admin
templates or the Admin properties definitions.

On Fri, Jan 16, 2015 at 5:56 PM, Timothy W. Cook <t...@mlhim.org> wrote:

> Is this a bug or did I miss something in the release notes?
>
> ​Moving from 1.6.4 to 1.7.3  the listing in the Admin UI is not resolving
> a related field now.  There are not any model changes involved.
>
> Attached are two screen shots named for the versions.
>
> I haven't changed the admin code either.  For the screen shots the admin
> code is:
>
> ​class DvBooleanAdmin(admin.ModelAdmin):
>     list_filter = ['prj_name__rm_version__version_id','prj_name',]
>     search_fields = ['data_name','ct_id']
>     ordering = ['prj_name','data_name']
>     actions = [make_published, unpublish, copy_dt, republish]
>     readonly_fields =
> ['published','schema_code','r_code','xqr_code','xqw_code',]
>     def get_form(self, request, obj=None, **kwargs):
>         try:
>             if obj.published:
>                 self.readonly_fields =
> ['prj_name','published','lang','schema_code','data_name','valid_trues','valid_falses','description','sem_attr','resource_uri','asserts','xqr_code','xqw_code',]
>         except (AttributeError, TypeError) as e:
>             self.readonly_fields =
> ['published','schema_code','r_code','xqr_code','xqw_code',]
>         return super(DvBooleanAdmin, self).get_form(request, obj, **kwargs)
>
>     fieldsets = (
>         (None, {'classes':('wide',),
>
>  
> 'fields':('published','prj_name','data_name','lang','valid_trues','valid_falses')}),
>         ("Additional Information ", {'classes':('wide',),
>
>  'fields':('description','sem_attr','resource_uri','asserts',)}),
>         ("PCT Code (read-only)", {'classes':('collapse',),
>
>  'fields':('schema_code','r_code','xqr_code','xqw_code',)}),
>
>     )
>     list_display = ('data_name','prj_name','published',)
> admin.site.register(DvBoolean, DvBooleanAdmin)
>
> ​In the model for the displayed admin:
> ​    prj_name = models.ForeignKey(Project, verbose_name=_("Project Name"),
> to_field="prj_name", help_text=_('Choose the name of your Project.'))
>
> ​and the related field in Project is:
>     prj_name = models.CharField(_("project name"), max_length=110,
> unique=True, db_index=True, help_text=_('Enter the name of your project.'))
>
> ...
>
>     def __unicode__(self):
>             return self.prj_name
> ​
>
>
> ​Any ideas?​
>
> Should I file a bug report?
>
> ​Thanks,
> Tim
> ​
>
>
>
>
>
> ============================================
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>


-- 

============================================
Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3UFiy1QfL8HbpO_GBq16SfVpH0kFmrv1-zLxyGZiFwWnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to