There is not, but there's an open ticket for that enhancement. 
https://code.djangoproject.com/ticket/26472

On Friday, February 9, 2018 at 6:58:08 AM UTC-5, Mattias Linnap wrote:
>
> Hi djangonauts,
>
> > System check identified some issues:
>
> > HINT: ForeignKey(unique=True) is usually better served by a 
> OneToOneField.
>
> I would like to keep using ForeignKey(unique=True) for this particular 
> model, and mark the warning as disabled for this model only (keep it 
> enabled project-wide for other models).
>
> For example, Java has the @SupressWarnings() annotation, and C++/Clang 
> has the #pragma clang diagnostic ignored block directive.
>
> Is there a way to do this with Python/Django?
>
> Best,
>
> Mattias
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52ccb9b6-de83-4ab1-bf60-69e9a7f0c2f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to