rename 'content' to 'bpcms'
[sommitrealweird.git] / 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)
@@ -1,17 +1,17 @@
 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:
-            doc = Document.object.get(folder__exact=folder_id, slug__exact=slug)
+            doc = Document.objects.get(folder__exact=folder_id, slug__exact=slug)
             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.objects.get(slug__exact=slug, parent__exact=folder_id)
             raise validators.ValidationError(u'There is already a folder with that name')
         except:
             pass