From oi-commits at pardus.org.tr Wed Jun 4 15:51:14 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 4 Jun 2008 15:51:14 +0300 (EEST) Subject: [Oi-commits] r1457 - in trunk: tema templates/tema Message-ID: <20080604125114.A654413840A0@liste.pardus.org.tr> Author: jnmbk Date: Wed Jun 4 15:51:14 2008 New Revision: 1457 Modified: trunk/tema/models.py trunk/templates/tema/base.html trunk/templates/tema/themeitem_detail.html trunk/templates/tema/themeitem_list.html Log: some cosmetics Modified: trunk/tema/models.py ================================================================= --- trunk/tema/models.py (original) +++ trunk/tema/models.py Wed Jun 4 15:51:14 2008 @@ -47,7 +47,7 @@ class Admin: list_display = ("name", "parent") search_fields = ["name", "parent"] - ordering=["parent"] + ordering=["name"] class Meta: verbose_name="Alt Kategori" Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Wed Jun 4 15:51:14 2008 @@ -29,9 +29,29 @@ {% block ust_menu %} {% endblock %} -
+ {% block tema_menu %} + + +
+

T?m?

+ {% for category in categories %} +

{{ category.name }}

+ + {% endfor %} +
+ {% endblock %} {% block content %} {% endblock %}
Modified: trunk/templates/tema/themeitem_detail.html ================================================================= --- trunk/templates/tema/themeitem_detail.html (original) +++ trunk/templates/tema/themeitem_detail.html Wed Jun 4 15:51:14 2008 @@ -16,7 +16,7 @@ {% endfor %}
{{ object.category }}
-
{{ object.submit_date }}
+
{{ object.submit_date|date:"d F Y" }}
{{ object.download_count }}
{{ object.rating }} 0 1 2 3 4
{{ object.author }}
Modified: trunk/templates/tema/themeitem_list.html ================================================================= --- trunk/templates/tema/themeitem_list.html (original) +++ trunk/templates/tema/themeitem_list.html Wed Jun 4 15:51:14 2008 @@ -4,39 +4,24 @@ {% endblock %} {% block ust_menu %} {% include "ust_menu_ayrinti.html" %} + {% endblock %} {% block content %} -
- En yeniler - En ?ok indirilenler - En y?ksek puanl?lar - Alfabe s?ras? - Ekle -
- -
-

T?m?

- {% for category in categories %} -

{{ category.name }}

- - {% endfor %} -
-
{% for item in object_list %}
-
{% if item.screenshot_set.count %}ekran g?r?nt?s?{% endif %}
- - - {% if item.comment_set.count %}
{{ item.comment_set.count }} yorum
{% endif %} -
{{ item.rating }}
-
{{ item.submit_date|date:"d F Y" }}
+
+
{% if item.screenshot_set.count %}ekran g?r?nt?s?{% endif %}
+ + +
+
+ {% if item.comment_set.count %}
{{ item.comment_set.count }} yorum
{% endif %} +
Puan: %{{ item.rating }}
+
Tarih: {{ item.edit_date|date:"d F Y" }}
+
{% endfor %}
From oi-commits at pardus.org.tr Thu Jun 5 14:34:47 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 14:34:47 +0300 (EEST) Subject: [Oi-commits] r1458 - trunk/st Message-ID: <20080605113447.ABB5F13840E6@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 14:34:47 2008 New Revision: 1458 Modified: trunk/st/signals.py Log: trying to fix adding of tags (couldn't test properly) Modified: trunk/st/signals.py ================================================================= --- trunk/st/signals.py (original) +++ trunk/st/signals.py Thu Jun 5 14:34:47 2008 @@ -46,6 +46,8 @@ topic = Topic(forum=forum[0], title=instance.title #or any ) + for tag in instance.tags.all(): + topic.tags.add(tag) topic.save() post = Post(topic=topic, @@ -65,6 +67,8 @@ topic = Topic(forum=forum[0], title=instance.title #news title ) + for tag in instance.tags.all(): + topic.tags.add(tag) topic.save() post = Post(topic=topic, From oi-commits at pardus.org.tr Thu Jun 5 15:04:38 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 15:04:38 +0300 (EEST) Subject: [Oi-commits] r1459 - trunk/st Message-ID: <20080605120439.3481E13840E9@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 15:04:38 2008 New Revision: 1459 Modified: trunk/st/signals.py Log: should work now Modified: trunk/st/signals.py ================================================================= --- trunk/st/signals.py (original) +++ trunk/st/signals.py Thu Jun 5 15:04:38 2008 @@ -46,9 +46,9 @@ topic = Topic(forum=forum[0], title=instance.title #or any ) + topic.save() for tag in instance.tags.all(): topic.tags.add(tag) - topic.save() post = Post(topic=topic, author=user[0], @@ -67,9 +67,9 @@ topic = Topic(forum=forum[0], title=instance.title #news title ) + topic.save() for tag in instance.tags.all(): topic.tags.add(tag) - topic.save() post = Post(topic=topic, author=user[0], From oi-commits at pardus.org.tr Thu Jun 5 15:35:55 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 15:35:55 +0300 (EEST) Subject: [Oi-commits] r1460 - trunk/st Message-ID: <20080605123555.497A013840A3@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 15:35:55 2008 New Revision: 1460 Modified: trunk/st/signals.py Log: we can't save tags if it's new Modified: trunk/st/signals.py ================================================================= --- trunk/st/signals.py (original) +++ trunk/st/signals.py Thu Jun 5 15:35:55 2008 @@ -47,8 +47,6 @@ title=instance.title #or any ) topic.save() - for tag in instance.tags.all(): - topic.tags.add(tag) post = Post(topic=topic, author=user[0], From oi-commits at pardus.org.tr Thu Jun 5 15:45:41 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 15:45:41 +0300 (EEST) Subject: [Oi-commits] r1461 - trunk/st Message-ID: <20080605124541.B451713840A1@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 15:45:41 2008 New Revision: 1461 Modified: trunk/st/signals.py Log: put the post as latest post when adding topic Modified: trunk/st/signals.py ================================================================= --- trunk/st/signals.py (original) +++ trunk/st/signals.py Thu Jun 5 15:45:41 2008 @@ -53,6 +53,8 @@ text=instance.text ) post.save() + topic.topic_latest_post = post + topic.save() else: return From oi-commits at pardus.org.tr Thu Jun 5 16:09:46 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 16:09:46 +0300 (EEST) Subject: [Oi-commits] r1462 - trunk/st Message-ID: <20080605130946.C47F913840D4@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 16:09:46 2008 New Revision: 1462 Modified: trunk/st/models.py trunk/st/signals.py Log: don't use pre_save, use post_save Modified: trunk/st/models.py ================================================================= --- trunk/st/models.py (original) +++ trunk/st/models.py Thu Jun 5 16:09:46 2008 @@ -265,7 +265,7 @@ verbose_name = "Nas?l" verbose_name_plural = "Nas?l Belgeleri" -dispatcher.connect(open_forum_topic,signal=signals.pre_save, sender=HowTo) +dispatcher.connect(open_forum_topic,signal=signals.post_save, sender=HowTo) class Game(models.Model): ratings = (('1','1'),('2','2'),('3','3'),('4','4'),('5','5'),('6','6'),('7','7'),('8','8'),('9','9'),('10','10')) @@ -318,7 +318,7 @@ verbose_name = "Oyun" verbose_name_plural = "Oyunlar" -dispatcher.connect(open_forum_topic,signal=signals.pre_save, sender=Game) +dispatcher.connect(open_forum_topic,signal=signals.post_save, sender=Game) class News(models.Model): title = models.CharField('Ba?l?k', max_length=32, blank=False) @@ -355,7 +355,7 @@ verbose_name = "Haber" verbose_name_plural = "Haberler" -dispatcher.connect(open_forum_topic,signal=signals.pre_save, sender=News) +dispatcher.connect(open_forum_topic,signal=signals.post_save, sender=News) class Package(models.Model): ratings = (('1','1'),('2','2'),('3','3'),('4','4'),('5','5'),('6','6'),('7','7'),('8','8'),('9','9'),('10','10')) @@ -402,7 +402,7 @@ verbose_name = "Paket" verbose_name_plural = "Paketler" -dispatcher.connect(open_forum_topic,signal=signals.pre_save, sender=Package) +dispatcher.connect(open_forum_topic,signal=signals.post_save, sender=Package) class PardusVersion(models.Model): number = models.CharField('S?r?m numaras?', max_length = 16, blank = False, unique = True) Modified: trunk/st/signals.py ================================================================= --- trunk/st/signals.py (original) +++ trunk/st/signals.py Thu Jun 5 16:09:46 2008 @@ -47,6 +47,8 @@ title=instance.title #or any ) topic.save() + for tag in instance.tags.all(): + topic.tags.add(tag) post = Post(topic=topic, author=user[0], From oi-commits at pardus.org.tr Thu Jun 5 16:27:25 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 16:27:25 +0300 (EEST) Subject: [Oi-commits] r1463 - trunk/st Message-ID: <20080605132725.B306913840EA@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 16:27:25 2008 New Revision: 1463 Added: trunk/st/models.py - copied unchanged from r1459, trunk/st/models.py trunk/st/signals.py - copied unchanged from r1461, trunk/st/signals.py Log: revert last From oi-commits at pardus.org.tr Thu Jun 5 16:44:24 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 16:44:24 +0300 (EEST) Subject: [Oi-commits] r1464 - trunk/templates Message-ID: <20080605134424.47E2513840CF@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 16:44:23 2008 New Revision: 1464 Modified: trunk/templates/404.html Log: better 404 page Modified: trunk/templates/404.html ================================================================= --- trunk/templates/404.html (original) +++ trunk/templates/404.html Thu Jun 5 16:44:23 2008 @@ -2,10 +2,22 @@ {% block title %}Sayfa Bulunamad? - {% endblock %} +{% block header_menu %} + {% include "header.html" %} +{% endblock %} +
+{% block ust_menu %} + {% include "ust_menu_ayrinti.html" %} +{% endblock %} + {% block content %}
-

Ula?maya ?al??t???n?z sayfa bulunamad?...

<- Anasayfa - +

Ula?maya ?al??t???n?z sayfa bulunamad?...

+ {% endblock %} From oi-commits at pardus.org.tr Thu Jun 5 17:17:33 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 5 Jun 2008 17:17:33 +0300 (EEST) Subject: [Oi-commits] r1465 - in branches/stable: docs st tema tema/templatetags templates templates/forum templates/game templates/howto templates/news templates/package templates/tema Message-ID: <20080605141733.3596813840CF@liste.pardus.org.tr> Author: jnmbk Date: Thu Jun 5 17:17:32 2008 New Revision: 1465 Added: branches/stable/templates/tema/message.html - copied unchanged from r1464, trunk/templates/tema/message.html branches/stable/templates/tema/themeitem_change.html - copied unchanged from r1464, trunk/templates/tema/themeitem_change.html Removed: branches/stable/tema/templatetags/ Modified: branches/stable/docs/oi.xmi branches/stable/st/signals.py branches/stable/tema/feeds.py branches/stable/tema/forms.py branches/stable/tema/models.py branches/stable/tema/urls.py branches/stable/tema/views.py branches/stable/templates/404.html branches/stable/templates/footer.html branches/stable/templates/forum/forum_footer.html branches/stable/templates/game/game_detail.html branches/stable/templates/howto/howto_detail.html branches/stable/templates/news/news_detail.html branches/stable/templates/package/package_detail.html branches/stable/templates/tema/base.html branches/stable/templates/tema/themeitem_detail.html branches/stable/templates/tema/themeitem_list.html Log: merge Modified: branches/stable/docs/oi.xmi ================================================================= Suppressed! Too long (more than 250 lines) diff output suppressed... Modified: branches/stable/st/signals.py ================================================================= --- branches/stable/st/signals.py (original) +++ branches/stable/st/signals.py Thu Jun 5 17:17:32 2008 @@ -53,6 +53,8 @@ text=instance.text ) post.save() + topic.topic_latest_post = post + topic.save() else: return @@ -66,6 +68,8 @@ title=instance.title #news title ) topic.save() + for tag in instance.tags.all(): + topic.tags.add(tag) post = Post(topic=topic, author=user[0], Modified: branches/stable/tema/feeds.py ================================================================= --- branches/stable/tema/feeds.py (original) +++ branches/stable/tema/feeds.py Thu Jun 5 17:17:32 2008 @@ -8,7 +8,7 @@ from django.contrib.syndication.feeds import Feed from django.utils.feedgenerator import Atom1Feed -from oi.tema.models import ThemeItem, Category +from oi.tema.models import ThemeItem, ParentCategory from oi.settings import SITE_NAME, WEB_URL, SITE_DESC from django.contrib.syndication.feeds import FeedDoesNotExist @@ -42,7 +42,7 @@ if not len(bits)==1: raise ObjectDoesNotExist - return Category.objects.get(id=bits[0]) + return ParentCategory.objects.get(id=bits[0]) def title(self,obj): return SITE_NAME + " Tema Kategori : %s" % obj.category Modified: branches/stable/tema/forms.py ================================================================= --- branches/stable/tema/forms.py (original) +++ branches/stable/tema/forms.py Thu Jun 5 17:17:32 2008 @@ -21,4 +21,4 @@ class ThemeItemForm(forms.ModelForm): class Meta: model = ThemeItem - exclude = ("author", "rating", "download_count", "submit_date", "edit_date", "approved") + exclude = ("parentcategory", "author", "rating", "download_count", "submit_date", "edit_date", "approved") Modified: branches/stable/tema/models.py ================================================================= --- branches/stable/tema/models.py (original) +++ branches/stable/tema/models.py Thu Jun 5 17:17:32 2008 @@ -9,17 +9,17 @@ from django.contrib.auth.models import User from oi.st.models import License -class Category(models.Model): - "Each theme item belongs to a Category" +class ParentCategory(models.Model): + "Each theme item belongs to a ParentCategory and a SubCategory" - name=models.CharField(max_length=100, verbose_name="Kategori ad?",unique=True) - slug=models.SlugField(verbose_name="SEF Ba?l?k",prepopulate_from=("name",)) + name = models.CharField(max_length=100, verbose_name="Kategori ad?", unique=True) + slug = models.SlugField(verbose_name="SEF Ba?l?k", prepopulate_from=("name",), unique=True) def __unicode__(self): return self.name def get_absolute_url(self): - return "/tema/kategori/%s/" % (self.slug) + return "/tema/listele/%s/tumu/tarih/" % (self.slug) class Admin: list_display = ('name',) @@ -30,11 +30,36 @@ verbose_name="Kategori" verbose_name_plural="Kategoriler" + +class SubCategory(models.Model): + "Each theme item belongs to a ParentCategory and a SubCategory" + + parent = models.ForeignKey(ParentCategory) + name = models.CharField(max_length=100, verbose_name="Kategori ad?") + slug = models.SlugField(verbose_name="SEF Ba?l?k", prepopulate_from=("name",), unique=True) + + def __unicode__(self): + return u"%s > %s" % (self.parent.name, self.name) + + def get_absolute_url(self): + return "/tema/listele/%s/%s/tarih/" % (self.parent.slug, self.slug) + + class Admin: + list_display = ("name", "parent") + search_fields = ["name", "parent"] + ordering=["name"] + + class Meta: + verbose_name="Alt Kategori" + verbose_name_plural="Alt Kategoriler" + + class ThemeItem(models.Model): "A theme item mainly consists of screenshots and files to download" name = models.CharField(max_length=100, unique=True, verbose_name="Ba?l?k", help_text="Buraya, ekleyece?iniz i?eri?in ismini yaz?n.") - category = models.ForeignKey(Category, verbose_name="Kategori") + parentcategory = models.ForeignKey(ParentCategory, verbose_name="?st Kategori") + category = models.ForeignKey(SubCategory, verbose_name="Kategori") author = models.ForeignKey(User) license = models.ForeignKey(License, verbose_name="Lisans") description = models.TextField(blank=False, verbose_name="Tan?m", help_text="Ekleyece?iniz dosyalar hakk?ndaki a??klamalar?n?z? bu b?l?mde belirtebilirsiniz.") @@ -44,6 +69,7 @@ submit_date = models.DateTimeField(auto_now_add=True, verbose_name="Olu?turulma Tarihi") edit_date = models.DateTimeField(auto_now_add=True, verbose_name="D?zenlenme Tarihi") comment_enabled = models.BooleanField(default=True,verbose_name="Yoruma A??k", help_text="Di?er ?yelerin bu i?eri?e yorum yap?p yapamayaca??n? buradan belirtebilirsiniz.") + #TODO: change this to False before we're on air approved = models.BooleanField(default=True, verbose_name="Kabul Edilmi?") class Meta: @@ -60,7 +86,7 @@ }), ("Di?er", { "classes": "collapse", - "fields": ("author", "license", "rating", "download_count", "submit_date", "edit_date", "comment_enabled") + "fields": ("author", "license", "rating", "download_count", "submit_date", "edit_date", "comment_enabled", "parentcategory") }) ) list_display = ("name", "license", "category", "approved") @@ -73,7 +99,11 @@ verbose_name_plural="Sanat Birimleri" def get_absolute_url(self): - return "/tema/dosya/%s/" % (self.id) + return "/tema/goster/%s/%s/%s/" % (self.parentcategory.slug, self.category.slug, self.id) + + def get_change_url(self): + return "/tema/duzenle/%s/%s/%s/" % (self.parentcategory.slug, self.category.slug, self.id) + class File(models.Model): "File for download" Modified: branches/stable/tema/urls.py ================================================================= --- branches/stable/tema/urls.py (original) +++ branches/stable/tema/urls.py Thu Jun 5 17:17:32 2008 @@ -18,9 +18,9 @@ urlpatterns = patterns ('oi.tema.views', #the first page listing - (r'^goster/(?P(son|begenilen|indirilen))/$','themeitem_list'), - (r'^kategori/(?P[a-z-]+)/$','list_category'), - (r'^dosya/(?P[0-9]+)/$','themeitem_detail'), + (r'^listele/(?P[a-z0-9-_]+)/(?P[a-z0-9-_]+)/(?P(alfabe|puan|indirilme|tarih))/$','themeitem_list'), + (r'^goster/(?P[a-z0-9-_]+)/(?P[a-z0-9-_]+)/(?P[0-9]+)/$','themeitem_detail'), + (r'^duzenle/(?P[a-z0-9-_]+)/(?P[a-z0-9-_]+)/(?P[0-9]+)/$','themeitem_change'), (r'^kullanici/(?P[a-z]+)/$','list_user'), (r'^oyla/(?P[0-9]+)/(?P[0-4])/$','vote'), (r'^ekle/$','themeitem_create'), Modified: branches/stable/tema/views.py ================================================================= --- branches/stable/tema/views.py (original) +++ branches/stable/tema/views.py Thu Jun 5 17:17:32 2008 @@ -7,7 +7,7 @@ from oi.forum.views import flood_control from oi.st.wrappers import render_response -from oi.tema.models import Category, ThemeItem, File, ScreenShot, Vote, Comment +from oi.tema.models import ParentCategory, SubCategory, ThemeItem, File, ScreenShot, Vote, Comment from oi.tema.forms import ThemeItemForm from oi.tema.settings import THEME_ITEM_PER_PAGE @@ -18,41 +18,54 @@ from django.shortcuts import get_object_or_404 from django.core.exceptions import ObjectDoesNotExist -def themeitem_list(request, sort_by): +def themeitem_list(request, parentcategory, subcategory, order_by): "List approved theme items" + #first we take approved items + themeItems=ThemeItem.objects.filter(approved=True) - if sort_by == "begenilen": - themeItems=ThemeItem.objects.filter(approved=True).order_by("-download_count") - elif sort_by == "indirilen": - themeItems=ThemeItem.objects.filter(approved=True).order_by("-rating") - else: - themeItems=ThemeItem.objects.filter(approved=True).order_by("-edit_date") + #filter by parent category if no subcategory is selected + if parentcategory != "tum-kategoriler": + parentcategory = get_object_or_404(ParentCategory, slug=parentcategory) + themeItems = themeItems.filter(parentcategory=parentcategory) + parentcategory = parentcategory.slug + + #filter by subcategory + if subcategory != "tumu": + subcategory = get_object_or_404(SubCategory, slug=subcategory) + themeItems = themeItems.filter(category=subcategory) + subcategory = subcategory.slug + + #order_by + if order_by == "tarih": + themeItems = themeItems.order_by("-edit_date") + elif order_by == "indirilme": + themeItems = themeItems.order_by("-download_count") + elif order_by == "puan": + themeItems = themeItems.order_by("-rating") + else:# order_by == "alfabe" + themeItems = themeItems.order_by("name") - params={ + params = { "queryset": themeItems, "paginate_by": THEME_ITEM_PER_PAGE, + "extra_context": { + "order_by": order_by, + "parentcategory": parentcategory, + "subcategory": subcategory, + "categories": ParentCategory.objects.all(), + }, } return object_list(request, **params) -def list_category(request, category): - "List theme items by category" - - category = get_object_or_404(Category, slug=category) - themeItems = category.themeitem_set.filter(approved=True) - - params={ - 'queryset': themeItems, - 'paginate_by': THEME_ITEM_PER_PAGE, - } - return object_list(request,**params) - - -def themeitem_detail(request, item_id): +def themeitem_detail(request, parentcategory, subcategory, item_id): object = get_object_or_404(ThemeItem, pk=item_id) if not object.approved and not request.user == object.author: return render_response(request, "404.html") + if request.user == object.author or request.user.has_perm("can_change_themeitem"): + button_change = True + return render_response(request, 'tema/themeitem_detail.html', locals()) @@ -65,7 +78,6 @@ 'queryset': themeItems, 'paginate_by': THEME_ITEM_PER_PAGE, } - return object_list(request, **params) @@ -95,7 +107,7 @@ themeitem.rating = rating / voteCount themeitem.save() - return themeitem_detail(request, item_id) + return HttpResponseRedirect(themeitem.get_absolute_url()) @login_required @@ -105,7 +117,7 @@ flood, timeout = flood_control(request) if form.is_valid() and not flood: - item = ThemeItem( + object = ThemeItem( name = form.cleaned_data["name"], category = form.cleaned_data["category"], license = form.cleaned_data["license"], @@ -115,8 +127,46 @@ author = request.user, ) - item.save() - return themeitem_detail(request, item.id) + object.parentcategory = object.category.parent + object.save() + #TODO: Send e-mail to admins + return HttpResponseRedirect(object.get_absolute_url()) else: form = ThemeItemForm() return render_response(request, "tema/themeitem_create.html", locals()) + + at login_required +def themeitem_change(request, parentcategory, subcategory, item_id): + object = get_object_or_404(ThemeItem, pk=item_id) + if request.user == object.author or request.user.has_perm("can_change_themeitem"): + if request.method == "POST": + form = ThemeItemForm(request.POST.copy()) + flood, timeout = flood_control(request) + if flood: + render_response(request, "tema/message.html", {"type": "error", "message": "L?tfen %s saniye sonra tekrar deneyiniz." % timeout }) + + if form.is_valid(): + object.name = form.cleaned_data["name"] + object.category = form.cleaned_data["category"] + object.license = form.cleaned_data["license"] + object.description = form.cleaned_data["description"] + object.changelog = form.cleaned_data["changelog"] + object.comment_enabled = form.cleaned_data["comment_enabled"] + object.parentcategory = object.category.parent + object.save() + return HttpResponseRedirect(object.get_absolute_url()) + else: + return render_response(request, "tema/themeitem_change.html", locals()) + else: + default_data = { + "name": object.name, + "category": object.category.id, + "license": object.license.id, + "description": object.description, + "changelog": object.changelog, + "comment_enabled": object.comment_enabled, + } + form = ThemeItemForm(initial=default_data) + return render_response(request, "tema/themeitem_change.html", locals()) + else: + return render_response(request, "tema/message.html", {"type": "error", "message": "Bu i?lemi yapmak i?in yetkiniz yok."}) Modified: branches/stable/templates/404.html ================================================================= --- branches/stable/templates/404.html (original) +++ branches/stable/templates/404.html Thu Jun 5 17:17:32 2008 @@ -2,10 +2,22 @@ {% block title %}Sayfa Bulunamad? - {% endblock %} +{% block header_menu %} + {% include "header.html" %} +{% endblock %} +
+{% block ust_menu %} + {% include "ust_menu_ayrinti.html" %} +{% endblock %} + {% block content %}
-

Ula?maya ?al??t???n?z sayfa bulunamad?...

<- Anasayfa - +

Ula?maya ?al??t???n?z sayfa bulunamad?...

+
    +
  • Anasayfa'ya gitmek i?in t?klay?n
  • +
  • ?zg?rl?k??in e-dergiye gitmek i?in t?klay?n
  • +
  • ?zg?rl?k??in forumlar?na gitmek i?in t?klay?n
  • +
{% endblock %} Modified: branches/stable/templates/footer.html ================================================================= --- branches/stable/templates/footer.html (original) +++ branches/stable/templates/footer.html Thu Jun 5 17:17:32 2008 @@ -1,6 +1,6 @@