From oi-commits at pardus.org.tr Sat Oct 6 14:14:55 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 14:14:55 +0300 (EEST) Subject: [Oi-commits] r586 - in trunk: media/css media/img templates templates/forum templates/howto Message-ID: <20071006111455.BB3427C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 14:14:55 2007 New Revision: 586 Added: trunk/media/img/sidebar_red.png trunk/templates/forum/main.html Removed: trunk/templates/forum/forum_detail.html trunk/templates/forum/forum_list.html trunk/templates/forum/new_topic.html trunk/templates/forum/paginator.html trunk/templates/forum/reply.html trunk/templates/forum/topic.html Modified: trunk/media/css/style.css trunk/templates/howto/howto_detail.html trunk/templates/howto/howto_main.html trunk/templates/paginator.html Log: sync Modified: trunk/media/css/style.css ================================================================= --- trunk/media/css/style.css (original) +++ trunk/media/css/style.css Sat Oct 6 14:14:55 2007 @@ -738,6 +738,17 @@ background-image: url('/media/img/sidebar_yellow.png'); } +.sidebar_red_title { + margin-top: 10px; + padding-top: 4px; + height: 25px; + font-size: 14px; + font-weight: bold; + color: #ffffff; + background-repeat: no-repeat; + background-image: url('/media/img/sidebar_red.png'); +} + /* base */ body { font: 75%/150% "Trebuchet MS", Tahoma, Arial; Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Sat Oct 6 14:14:55 2007 @@ -23,14 +23,14 @@ {% endblock %} {% block sidebar %} -
+ {% if videos %} - + {% endif %} - + {% endblock %} \ No newline at end of file Modified: trunk/templates/howto/howto_main.html ================================================================= --- trunk/templates/howto/howto_main.html (original) +++ trunk/templates/howto/howto_main.html Sat Oct 6 14:14:55 2007 @@ -12,7 +12,7 @@ {% for howto in howto_list %}Ayr?ca {{ version.number }} {{ version.codename }} Kurulan CD'sini torrent adresini kullanarak P2P ara?lar? ile de indirebilirsiniz.
+Ayr?ca {{ version.number }} {{ version.codename }} Kurulan CD'sini torrent adresini kullanarak P2P ara?lar? ile de indirebilirsiniz. Pardus ile birlikte gelen KTorrent ile ilgili yaz?m?z? okumak i?in t?klay?n.
Pardus'un eski s?r?mlerini kullanan kullan?c?lar g?ncelleme yaparak {{ version.number }} {{ version.codename }} kullanmaya ba?layabilirler, ayr?ca kurulum yapmalar? gerekmez.
Ayr?ca {{ version.number }} {{ version.codename }} Kurulan CD'sini torrent adresini kullanarak P2P ara?lar? ile de indirebilirsiniz.
+Ayr?ca {{ version.number }} {{ version.codename }} Kurulan CD'sini torrent adresini kullanarak P2P ara?lar? ile de indirebilirsiniz. Pardus ile birlikte gelen KTorrent ile ilgili yaz?m?z? okumak i?in t?klay?n.
Pardus'un eski s?r?mlerini kullanan kullan?c?lar g?ncelleme yaparak {{ version.number }} {{ version.codename }} kullanmaya ba?layabilirler, ayr?ca kurulum yapmalar? gerekmez.
Modified: branches/stable/templates/fs/fs_main.html ================================================================= --- branches/stable/templates/fs/fs_main.html (original) +++ branches/stable/templates/fs/fs_main.html Sat Oct 6 16:29:37 2007 @@ -24,22 +24,6 @@ {% block sidebartop %}{% endblock %} {% block sidebar %} - - - {% endblock %} From oi-commits at pardus.org.tr Sat Oct 6 16:37:26 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:37:26 +0300 (EEST) Subject: [Oi-commits] r594 - branches/stable/st trunk/st Message-ID: <20071006133726.19DA37C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:37:25 2007 New Revision: 594 Modified: branches/stable/st/models.py trunk/st/models.py Log: unique_together'? ?ok sevdim Modified: branches/stable/st/models.py ================================================================= --- branches/stable/st/models.py (original) +++ branches/stable/st/models.py Sat Oct 6 16:37:25 2007 @@ -378,7 +378,7 @@ class PardusMirror(models.Model): cdtype = (('1','Kurulan'),('2','?al??an')) - name = models.CharField('Sunucu ad?', maxlength = 64, blank = False, unique = True) + name = models.CharField('Sunucu ad?', maxlength = 64, blank = False) url = models.CharField('Adres', maxlength = 128) type = models.SmallIntegerField('CD Tipi', maxlength=1, choices=cdtype) order = models.PositiveIntegerField(verbose_name='S?ralama') @@ -393,6 +393,6 @@ search_fields = ['name'] class Meta: - unique_together = (('type', 'order'),) + unique_together = (('type', 'order'),('type', 'name'),) verbose_name = "Pardus Yans?s?" verbose_name_plural = "Pardus Yans?lar?" \ No newline at end of file Modified: trunk/st/models.py ================================================================= --- trunk/st/models.py (original) +++ trunk/st/models.py Sat Oct 6 16:37:25 2007 @@ -378,7 +378,7 @@ class PardusMirror(models.Model): cdtype = (('1','Kurulan'),('2','?al??an')) - name = models.CharField('Sunucu ad?', maxlength = 64, blank = False, unique = True) + name = models.CharField('Sunucu ad?', maxlength = 64, blank = False) url = models.CharField('Adres', maxlength = 128) type = models.SmallIntegerField('CD Tipi', maxlength=1, choices=cdtype) order = models.PositiveIntegerField(verbose_name='S?ralama') @@ -393,6 +393,6 @@ search_fields = ['name'] class Meta: - unique_together = (('type', 'order'),) + unique_together = (('type', 'order'),('type', 'name'),) verbose_name = "Pardus Yans?s?" verbose_name_plural = "Pardus Yans?lar?" \ No newline at end of file From oi-commits at pardus.org.tr Sat Oct 6 16:41:17 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:41:17 +0300 (EEST) Subject: [Oi-commits] r595 - branches/stable/st trunk/st Message-ID: <20071006134117.EC73E7C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:41:17 2007 New Revision: 595 Modified: branches/stable/st/views.py trunk/st/views.py Log: django luv Modified: branches/stable/st/views.py ================================================================= --- branches/stable/st/views.py (original) +++ branches/stable/st/views.py Sat Oct 6 16:41:17 2007 @@ -95,8 +95,8 @@ def download(request): version = PardusVersion.objects.filter(status=1).order_by('-number')[:1][0] - install_mirrors = PardusMirror.objects.filter(status=1, type=1).order_by('-name') - live_mirrors = PardusMirror.objects.filter(status=1, type=2).order_by('-name') + install_mirrors = PardusMirror.objects.filter(status=1, type=1).order_by('order') + live_mirrors = PardusMirror.objects.filter(status=1, type=2).order_by('order') return render_response(request, 'download/download.html', locals()) def download_detail_releasenotes(request, version): Modified: trunk/st/views.py ================================================================= --- trunk/st/views.py (original) +++ trunk/st/views.py Sat Oct 6 16:41:17 2007 @@ -95,8 +95,8 @@ def download(request): version = PardusVersion.objects.filter(status=1).order_by('-number')[:1][0] - install_mirrors = PardusMirror.objects.filter(status=1, type=1).order_by('-name') - live_mirrors = PardusMirror.objects.filter(status=1, type=2).order_by('-name') + install_mirrors = PardusMirror.objects.filter(status=1, type=1).order_by('order') + live_mirrors = PardusMirror.objects.filter(status=1, type=2).order_by('order') return render_response(request, 'download/download.html', locals()) def download_detail_releasenotes(request, version): From oi-commits at pardus.org.tr Sat Oct 6 16:54:23 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:54:23 +0300 (EEST) Subject: [Oi-commits] r596 - in trunk: st templates/game templates/howto templates/package Message-ID: <20071006135423.9F1137C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:54:23 2007 New Revision: 596 Modified: trunk/st/models.py trunk/templates/game/game_detail.html trunk/templates/howto/howto_detail.html trunk/templates/package/package_detail.html Log: wiki sayfalar? Modified: trunk/st/models.py ================================================================= --- trunk/st/models.py (original) +++ trunk/st/models.py Sat Oct 6 16:54:23 2007 @@ -34,6 +34,25 @@ verbose_name = "Etiket" verbose_name_plural = "Etiketler" +class Wiki(models.Model): + name = models.CharField('Madde ad?', maxlength=128, blank=False, unique=True) + + def __str__(self): + return self.name + + def get_absolute_url(self): + return "http://tr.pardus-wiki.org/%s" % self.name + + class Admin: + list_display = ('name', 'id') + ordering = ['-name'] + search_fields = ['name'] + + class Meta: + ordering = ['name'] + verbose_name = "Wiki sayfas?" + verbose_name_plural = "Wiki sayfalar?" + class Contribute(models.Model): name = models.CharField('Tan?m', maxlength=64, blank=False, unique=True) @@ -187,6 +206,7 @@ sum = models.TextField('?zet', blank=False) text = models.TextField('Metin', blank=False) tags = models.ManyToManyField(Tag, blank=False) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) @@ -236,6 +256,7 @@ atmosphere = models.SmallIntegerField('Atmosfer', maxlength=1, choices=ratings) learning_time = models.CharField('??renme S?resi', maxlength=128, help_text='1 g?n, 3 saat, 5 ay, y?llarca gibi.') tags = models.ManyToManyField(Tag, blank=False) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) @@ -318,6 +339,7 @@ path = models.CharField('?al??t?rma Yolu', maxlength=128, help_text='Paketin Pardus men?s?ndeki yeri (?rn. Programlar > Yard?mc? Programlar > KNazar)') ss = models.ManyToManyField(ScreenShot) tags = models.ManyToManyField(Tag) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) Modified: trunk/templates/game/game_detail.html ================================================================= --- trunk/templates/game/game_detail.html (original) +++ trunk/templates/game/game_detail.html Sat Oct 6 16:54:23 2007 @@ -50,6 +50,11 @@ +{% if game.wiki.all %} + + +{% endif %} + {% if videos %} Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Sat Oct 6 16:54:23 2007 @@ -26,6 +26,11 @@ +{% if howto.wiki.all %} + + +{% endif %} + {% if videos %} Modified: trunk/templates/package/package_detail.html ================================================================= --- trunk/templates/package/package_detail.html (original) +++ trunk/templates/package/package_detail.html Sat Oct 6 16:54:23 2007 @@ -42,6 +42,11 @@ +{% if package.wiki.all %} + + +{% endif %} + {% if videos %} From oi-commits at pardus.org.tr Sat Oct 6 16:56:55 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:56:55 +0300 (EEST) Subject: [Oi-commits] r597 - in branches/stable: st templates/game templates/howto templates/package Message-ID: <20071006135655.1F96C7C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:56:54 2007 New Revision: 597 Modified: branches/stable/st/models.py branches/stable/templates/game/game_detail.html branches/stable/templates/howto/howto_detail.html branches/stable/templates/package/package_detail.html Log: sync Modified: branches/stable/st/models.py ================================================================= --- branches/stable/st/models.py (original) +++ branches/stable/st/models.py Sat Oct 6 16:56:54 2007 @@ -34,6 +34,25 @@ verbose_name = "Etiket" verbose_name_plural = "Etiketler" +class Wiki(models.Model): + name = models.CharField('Madde ad?', maxlength=128, blank=False, unique=True) + + def __str__(self): + return self.name + + def get_absolute_url(self): + return "http://tr.pardus-wiki.org/%s" % self.name + + class Admin: + list_display = ('name', 'id') + ordering = ['-name'] + search_fields = ['name'] + + class Meta: + ordering = ['name'] + verbose_name = "Wiki sayfas?" + verbose_name_plural = "Wiki sayfalar?" + class Contribute(models.Model): name = models.CharField('Tan?m', maxlength=64, blank=False, unique=True) @@ -187,6 +206,7 @@ sum = models.TextField('?zet', blank=False) text = models.TextField('Metin', blank=False) tags = models.ManyToManyField(Tag, blank=False) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) @@ -236,6 +256,7 @@ atmosphere = models.SmallIntegerField('Atmosfer', maxlength=1, choices=ratings) learning_time = models.CharField('??renme S?resi', maxlength=128, help_text='1 g?n, 3 saat, 5 ay, y?llarca gibi.') tags = models.ManyToManyField(Tag, blank=False) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) @@ -318,6 +339,7 @@ path = models.CharField('?al??t?rma Yolu', maxlength=128, help_text='Paketin Pardus men?s?ndeki yeri (?rn. Programlar > Yard?mc? Programlar > KNazar)') ss = models.ManyToManyField(ScreenShot) tags = models.ManyToManyField(Tag) + wiki = models.ManyToManyField(Wiki, blank=True) videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) Modified: branches/stable/templates/game/game_detail.html ================================================================= --- branches/stable/templates/game/game_detail.html (original) +++ branches/stable/templates/game/game_detail.html Sat Oct 6 16:56:54 2007 @@ -50,6 +50,11 @@ +{% if game.wiki.all %} + + +{% endif %} + {% if videos %} Modified: branches/stable/templates/howto/howto_detail.html ================================================================= --- branches/stable/templates/howto/howto_detail.html (original) +++ branches/stable/templates/howto/howto_detail.html Sat Oct 6 16:56:54 2007 @@ -26,6 +26,11 @@ +{% if howto.wiki.all %} + + +{% endif %} + {% if videos %} Modified: branches/stable/templates/package/package_detail.html ================================================================= --- branches/stable/templates/package/package_detail.html (original) +++ branches/stable/templates/package/package_detail.html Sat Oct 6 16:56:54 2007 @@ -42,6 +42,11 @@ +{% if package.wiki.all %} + + +{% endif %} + {% if videos %} From oi-commits at pardus.org.tr Sat Oct 6 18:37:43 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 18:37:43 +0300 (EEST) Subject: [Oi-commits] r598 - branches/stable/st trunk/st Message-ID: <20071006153743.944B8864002@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 18:37:43 2007 New Revision: 598 Modified: branches/stable/st/models.py trunk/st/models.py Log: y?netim panelinde g?ster Modified: branches/stable/st/models.py ================================================================= --- branches/stable/st/models.py (original) +++ branches/stable/st/models.py Sat Oct 6 18:37:43 2007 @@ -223,7 +223,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','update','status',)}), + ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','wiki','update','status',)}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), ) @@ -273,7 +273,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title', 'sum', 'text', 'videos', 'tags', 'update', 'status')}), + ('Genel', {'fields': ('author', 'title', 'sum', 'text', 'videos', 'tags', 'wiki', 'update', 'status')}), ('Oyun bilgileri', {'fields': ('url', 'path', 'learning_time', 'license', 'installed_size', 'download_size')}), ('De?erlendirme', {'fields': ('gameplay', 'graphics', 'sound', 'scenario', 'atmosphere')}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), @@ -356,7 +356,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title','sum','text', 'license','installed_size','download_size','url','point','path','ss','tags','videos','update','status')}), + ('Genel', {'fields': ('author', 'title','sum','text', 'license','installed_size','download_size','url','point','path','ss','tags','wiki','videos','update','status')}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), ) list_display = ('title', 'author', 'status', 'update') Modified: trunk/st/models.py ================================================================= --- trunk/st/models.py (original) +++ trunk/st/models.py Sat Oct 6 18:37:43 2007 @@ -223,7 +223,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','update','status',)}), + ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','wiki','update','status',)}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), ) @@ -273,7 +273,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title', 'sum', 'text', 'videos', 'tags', 'update', 'status')}), + ('Genel', {'fields': ('author', 'title', 'sum', 'text', 'videos', 'tags', 'wiki', 'update', 'status')}), ('Oyun bilgileri', {'fields': ('url', 'path', 'learning_time', 'license', 'installed_size', 'download_size')}), ('De?erlendirme', {'fields': ('gameplay', 'graphics', 'sound', 'scenario', 'atmosphere')}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), @@ -356,7 +356,7 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title','sum','text', 'license','installed_size','download_size','url','point','path','ss','tags','videos','update','status')}), + ('Genel', {'fields': ('author', 'title','sum','text', 'license','installed_size','download_size','url','point','path','ss','tags','wiki','videos','update','status')}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), ) list_display = ('title', 'author', 'status', 'update') From oi-commits at pardus.org.tr Sat Oct 6 18:41:05 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 18:41:05 +0300 (EEST) Subject: [Oi-commits] r599 - branches/stable/templates/game branches/stable/templates/howto branches/stable/templates/package trunk/templates/game trunk/templates/howto trunk/templates/package Message-ID: <20071006154105.80C9E864002@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 18:41:05 2007 New Revision: 599 Modified: branches/stable/templates/game/game_detail.html branches/stable/templates/howto/howto_detail.html branches/stable/templates/package/package_detail.html trunk/templates/game/game_detail.html trunk/templates/howto/howto_detail.html trunk/templates/package/package_detail.html Log: renkler Modified: branches/stable/templates/game/game_detail.html ================================================================= --- branches/stable/templates/game/game_detail.html (original) +++ branches/stable/templates/game/game_detail.html Sat Oct 6 18:41:05 2007 @@ -51,7 +51,7 @@ {% if game.wiki.all %} - + {% endif %} Modified: branches/stable/templates/howto/howto_detail.html ================================================================= --- branches/stable/templates/howto/howto_detail.html (original) +++ branches/stable/templates/howto/howto_detail.html Sat Oct 6 18:41:05 2007 @@ -27,7 +27,7 @@ {% if howto.wiki.all %} - + {% endif %} Modified: branches/stable/templates/package/package_detail.html ================================================================= --- branches/stable/templates/package/package_detail.html (original) +++ branches/stable/templates/package/package_detail.html Sat Oct 6 18:41:05 2007 @@ -43,7 +43,7 @@ {% if package.wiki.all %} - + {% endif %} Modified: trunk/templates/game/game_detail.html ================================================================= --- trunk/templates/game/game_detail.html (original) +++ trunk/templates/game/game_detail.html Sat Oct 6 18:41:05 2007 @@ -51,7 +51,7 @@ {% if game.wiki.all %} - + {% endif %} Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Sat Oct 6 18:41:05 2007 @@ -27,7 +27,7 @@ {% if howto.wiki.all %} - + {% endif %} Modified: trunk/templates/package/package_detail.html ================================================================= --- trunk/templates/package/package_detail.html (original) +++ trunk/templates/package/package_detail.html Sat Oct 6 18:41:05 2007 @@ -43,7 +43,7 @@ {% if package.wiki.all %} - + {% endif %} From oi-commits at pardus.org.tr Sat Oct 27 15:39:06 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 27 Oct 2007 15:39:06 +0300 (EEST) Subject: [Oi-commits] r600 - branches/forum/forum Message-ID: <20071027123906.7E2717C0025@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 27 15:39:06 2007 New Revision: 600 Modified: branches/forum/forum/views.py Log: deprecated use Modified: branches/forum/forum/views.py ================================================================= --- branches/forum/forum/views.py (original) +++ branches/forum/forum/views.py Sat Oct 27 15:39:06 2007 @@ -60,7 +60,7 @@ if form.is_valid() and not flood: post = Post(topic=topic, author=request.user, - text=form.clean_data['text'] + text=form.cleaned_data['text'] ) post.save() @@ -91,7 +91,7 @@ flood,timeout = flood_control(request) if form.is_valid() and not flood: - post.text = form.clean_data['text'] + post.text = form.cleaned_data['text'] post.edit_count += 1 post.edited = datetime.now() post.last_edited_by = request.user @@ -117,13 +117,13 @@ if form.is_valid() and not flood: topic = Topic(forum=forum, - title=form.clean_data['title'] + title=form.cleaned_data['title'] ) topic.save() post = Post(topic=topic, author=request.user, - text=form.clean_data['text'] + text=form.cleaned_data['text'] ) post.save() @@ -147,7 +147,7 @@ flood,timeout = flood_control(request) if form.is_valid() and not flood: - topic.title = form.clean_data['title'] + topic.title = form.cleaned_data['title'] topic.topic_latest_post = first_post topic.save() From oi-commits at pardus.org.tr Sat Oct 27 16:57:29 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 27 Oct 2007 16:57:29 +0300 (EEST) Subject: [Oi-commits] r601 - trunk/forum Message-ID: <20071027135729.55DAD7C0025@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 27 16:57:29 2007 New Revision: 601 Modified: trunk/forum/forms.py trunk/forum/models.py trunk/forum/settings.py trunk/forum/urls.py trunk/forum/views.py Log: merge Modified: trunk/forum/forms.py ================================================================= --- trunk/forum/forms.py (original) +++ trunk/forum/forms.py Sat Oct 27 16:57:29 2007 @@ -1,8 +1,5 @@ from django import newforms as forms -from django.contrib.auth import authenticate -from django.contrib.auth.models import User - class TopicForm(forms.Form): title = forms.CharField(label='Ba?l?k', required=True, max_length=100, widget=forms.TextInput(attrs={'size': '40',})) text = forms.CharField(label='?leti', required=True, widget=forms.Textarea(attrs={'rows': '20', 'cols': '60',})) Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Sat Oct 27 16:57:29 2007 @@ -26,8 +26,9 @@ text = models.TextField(verbose_name='?leti') hidden = models.BooleanField(blank=True, null=True, default=0, verbose_name='Gizli') created = models.DateTimeField(blank=True, null=True, auto_now_add=True, verbose_name='Olu?turulma tarihi') - update = models.DateTimeField(blank=True, null=True, auto_now_add=True, verbose_name='G?ncellenme tarihi') - update_count = models.IntegerField(default=0, verbose_name='G?ncellenme say?s?') + edited = models.DateTimeField(blank=True, null=True, auto_now_add=True, verbose_name='G?ncellenme tarihi') + edit_count = models.IntegerField(default=0, verbose_name='G?ncellenme say?s?') + last_edited_by = models.ForeignKey(User, blank=True, null=True, related_name='last edited by', verbose_name='Yazar') ip = models.IPAddressField(blank=True, verbose_name='IP adresi') def __str__(self): @@ -48,11 +49,14 @@ def get_delete_url(self): return '/forum/%s/%s/delete/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + def get_delete_confirm_url(self): + return '/forum/%s/%s/delete/%s/yes/' % (self.topic.forum.slug, self.topic.id, self.id) + class Admin: list_display = ('id', 'topic', 'author', 'created', 'ip') class Meta: - ordering = ('-update',) + ordering = ('-edited',) verbose_name = '?leti' verbose_name_plural = '?letiler' permissions = ( @@ -61,11 +65,10 @@ ) def save(self): + new_post = False + if not self.id: new_post = True - else: - #self.update_count += 1 - new_post = False self.ip = threadlocals.get_current_ip() super(Post, self).save() @@ -83,15 +86,16 @@ def delete(self): if self.id: + f = Forum.objects.get(id=self.topic.forum.id) t = Topic.objects.get(id=self.topic.id) - #FIXME: set the latest post after deletion - #t.topic_latest_post_id = self.id + + latest_post = t.post_set.all().order_by('-created')[0].id + + t.topic_latest_post_id = latest_post t.posts -= 1 t.save() - f = Forum.objects.get(id=self.topic.forum.id) - #FIXME: set the latest post after deletion - #f.forum_latest_post_id = self.id + f.forum_latest_post_id = latest_post f.posts -= 1 f.save() @@ -120,6 +124,12 @@ def get_reply_url(self): return '/forum/%s/%s/reply/' % (self.forum.slug, self.id) + def get_merge_url(self): + return '/forum/%s/%s/merge/' % (self.forum.slug, self.id) + + def get_edit_url(self): + return '/forum/%s/%s/edit/' % (self.forum.slug, self.id) + def get_stick_url(self): return '/forum/%s/%s/stick/' % (self.forum.slug, self.id) @@ -129,9 +139,6 @@ def get_hide_url(self): return '/forum/%s/%s/hide/' % (self.forum.slug, self.id) - def get_delete_url(self): - return '/forum/%s/%s/delete/' % (self.forum.slug, self.id) - class Admin: list_display = ('forum', 'title', 'sticky', 'locked', 'hidden') @@ -197,7 +204,7 @@ class Category(models.Model): name = models.CharField(maxlength=255, verbose_name='Kategori ismi') hidden = models.BooleanField(blank=True, null=True, verbose_name='Gizli') - order = models.PositiveIntegerField(verbose_name='S?ralama') + order = models.PositiveIntegerField(unique=True, verbose_name='S?ralama') def __str__(self): return self.name Modified: trunk/forum/settings.py ================================================================= --- trunk/forum/settings.py (original) +++ trunk/forum/settings.py Sat Oct 27 16:57:29 2007 @@ -5,5 +5,5 @@ # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/copyleft/gpl.txt. -TOPICS_PER_PAGE = 5 #FIXME: it's 2 for pagination testing, default is 20 +TOPICS_PER_PAGE = 20 FLOOD_TIMEOUT = 30 \ No newline at end of file Modified: trunk/forum/urls.py ================================================================= --- trunk/forum/urls.py (original) +++ trunk/forum/urls.py Sat Oct 27 16:57:29 2007 @@ -20,11 +20,11 @@ (r'^(?P