The solution I found consisted in *overriding dashboard*.*pages* and then 
in a *validators.py* recreate the *URLDoesNotExistValidator *in order to be 
specific to the flatpages.

So I've overriden PageUpdateForm() and PageCreateView() in order to import 
my version of this specific validator.

class URLDoesNotExistValidator(validators.URLValidator):

    def __call__(self, value):
        try:
            FlatPage.objects.get(url=value)
        except FlatPage.DoesNotExist:
            return
        else:
            raise ValidationError(
                _('Specified page already exists!'), code='invalid')

-- 
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
--- 
You received this message because you are subscribed to the Google Groups 
"django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-oscar+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-oscar/658a5c80-a559-4589-9f6e-c2a92bab15ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to