def save(self, *args, **kw):
    if not
mdlcountry.objects.filter(country_name=self.country_name).exists():
        super(mdlroomtypes, self).save(*args, **kw)
    else:
        #do something or do nothing
        pass 


Here in else part how will i set error message that should display to the
user
-- 
View this message in context: 
http://old.nabble.com/How-to-raise-integrity-error-in-save-method-of-model-tp28328713p28328972.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to