projects
/
sommitrealweird.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename 'content' to 'bpcms'
[sommitrealweird.git]
/
sommitrealweird
/
bpcms
/
content_val.py
diff --git
a/sommitrealweird/content/content_val.py
b/sommitrealweird/bpcms/content_val.py
similarity index 68%
rename from
sommitrealweird/content/content_val.py
rename to
sommitrealweird/bpcms/content_val.py
index a7ba5827c43b2e0ced9678c3be8a7b2c0dee05b2..0e621503cb6988eb7f7df7b963c8ba03e7c33262 100644
(file)
--- a/
sommitrealweird/content/content_val.py
+++ b/
sommitrealweird/bpcms/content_val.py
@@
-1,17
+1,17
@@
from django.core import validators
def is_unique_name(slug, all_data):
from django.core import validators
def is_unique_name(slug, all_data):
- from
content
.models import Document, Folder
+ from
bpcms
.models import Document, Folder
if all_data["folder"] != '' and all_data["id"] == '':
folder_id = int(all_data["folder"])
try:
if all_data["folder"] != '' and all_data["id"] == '':
folder_id = int(all_data["folder"])
try:
- doc = Document.object.get(folder__exact=folder_id, slug__exact=slug)
+ doc = Document.object
s
.get(folder__exact=folder_id, slug__exact=slug)
raise validators.ValidationError(u'There is already a document with that name')
except:
pass
try:
raise validators.ValidationError(u'There is already a document with that name')
except:
pass
try:
- folder = Folder.object.get(slug__exact=slug, parent__exact=folder_id)
+ folder = Folder.object
s
.get(slug__exact=slug, parent__exact=folder_id)
raise validators.ValidationError(u'There is already a folder with that name')
except:
pass
raise validators.ValidationError(u'There is already a folder with that name')
except:
pass