Skip to content
Browse files

fixed some django 1.0.2 incompatiblities

added south support
  • Loading branch information...
1 parent afe2bc1 commit 015ba89ad4c017a835378fb1d95b4e973e7db704 @digi604 digi604 committed Apr 6, 2009
View
2 .gitignore
@@ -1,3 +1,3 @@
.tmp*
*.pyc
-cms/media/pictures/
+cms/media/cms_page_media/
View
2 cms/admin/__init__.py
@@ -107,7 +107,7 @@ def __call__(self, request, url):
return change_status(request, unquote(url[:-14]))
elif url.endswith('/change-navigation'):
return change_innavigation(request, unquote(url[:-18]))
- elif url.endswith('jsi18n'):
+ elif url.endswith('jsi18n') or url.endswith('jsi18n/'):
return HttpResponseRedirect("../../../jsi18n/")
elif ('history' in url or 'recover' in url) and request.method == "POST":
resp = super(PageAdmin, self).__call__(request, url)
View
25 cms/admin/views.py
@@ -94,22 +94,27 @@ def edit_plugin(request, plugin_id):
break
if request.method == "POST":
if instance:
+ instance.pk = cms_plugin.pk
+ instance.page = cms_plugin.page
+ instance.position = cms_plugin.position
+ instance.placeholder = cms_plugin.placeholder
+ instance.language = cms_plugin.language
+ instance.plugin_type = cms_plugin.plugin_type
form = plugin_class.form(request.POST, request.FILES, instance=instance)
else:
- form = plugin_class.form(request.POST, request.FILES)
+ instance = plugin_class.model()
+ instance.pk = cms_plugin.pk
+ instance.page = cms_plugin.page
+ instance.position = cms_plugin.position
+ instance.placeholder = cms_plugin.placeholder
+ instance.language = cms_plugin.language
+ instance.plugin_type = cms_plugin.plugin_type
+ form = plugin_class.form(request.POST, request.FILES, instance=instance)
if form.is_valid():
if 'history' in request.path:
return render_to_response('admin/cms/page/plugin_forms_history.html', {'CMS_MEDIA_URL':settings.CMS_MEDIA_URL, 'is_popup':True},RequestContext(request))
- inst = form.save(commit=False)
- inst.pk = cms_plugin.pk
- inst.page = cms_plugin.page
- inst.position = cms_plugin.position
- inst.placeholder = cms_plugin.placeholder
- inst.language = cms_plugin.language
- inst.plugin_type = cms_plugin.plugin_type
- inst.save()
+ inst = form.save()
inst.page.save()
- form.save_m2m()
if 'reversion' in settings.INSTALLED_APPS:
save_all_plugins(inst.page, [inst.pk])
revision.user = request.user
View
BIN cms/media/pictures/01616_overview_1440x900.jpg
Deleted file not rendered
View
BIN cms/media/pictures/Motorboot_2007.jpg
Deleted file not rendered
View
BIN cms/media/pictures/binnensee_rorschach_1.jpg
Deleted file not rendered
View
BIN cms/media/pictures/binnensee_rorschach_1_.jpg
Deleted file not rendered
View
2 cms/migrations/0001_initial.py
@@ -47,7 +47,7 @@ def forwards(self, orm):
# Adding model 'Page'
db.create_table('cms_page', (
- ('status', models.IntegerField(_("status"), default=DRAFT, db_index=True)),
+ ('status', models.IntegerField(_("status"), default=0, db_index=True)),
('rght', models.PositiveIntegerField(db_index=True, editable=False)),
('level', models.PositiveIntegerField(db_index=True, editable=False)),
('navigation_extenders', models.CharField(_("navigation extenders"), blank=True, max_length=80, null=True, db_index=True)),
View
2 example/settings.py
@@ -104,7 +104,7 @@
'reversion',
'example.categories',
'debug_toolbar',
- 'south',
+ #'south',
)

0 comments on commit 015ba89

Please sign in to comment.
Something went wrong with that request. Please try again.