I have an application called CMS with category and article. Simple enough.
I am rewriting app_index.html to enable app_index.html by app_index.html based on ajax and moving articles from one category to another.
Now I would like to redirect after saving / deleting an article or category in cms' app_index.html instead of the change_list.html model. How can this be done?
thanks
class Category(models.Model): order = models.IntegerField() title = models.CharField(max_length=100) text = models.TextField() class Article(models.Model): published = models.BooleanField(default=None) images = generic.GenericRelation(Photo) category = models.ForeignKey(Category) title = models.CharField(max_length=100) text = models.TextField() order = models.IntegerField(blank = True, null = True)
Daniel's answer did half the job: redirecting after changing articles and categories.
Not very elegant solution: redirecting to urls.py
def redirect_cms(response): return HttpResponseRedirect('/admin/cms/') urlpatterns += patterns('', (r'^admin/cms/article/$',redirect_cms),
any other idea?
source share