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 %}
-
{{ fs.sum }} +
{{ howto.sum }}

{% for tag in howto.tags.all %}{{ tag.name }} {% endfor %}

@@ -24,6 +24,6 @@ {% block sidebartop %}{% endblock %} {% block sidebar %} - - + + {% endblock %} Modified: trunk/templates/paginator.html ================================================================= --- trunk/templates/paginator.html (original) +++ trunk/templates/paginator.html Sat Oct 6 14:14:55 2007 @@ -1,16 +1,17 @@ - From oi-commits at pardus.org.tr Sat Oct 6 14:49:05 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 14:49:05 +0300 (EEST) Subject: [Oi-commits] r587 - in trunk: media/hackergotchi st Message-ID: <20071006114905.49CE77C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 14:49:05 2007 New Revision: 587 Added: trunk/media/hackergotchi/ekinmeroglu.png (contents, props changed) Modified: trunk/st/models.py Log: Order alan? Modified: trunk/st/models.py ================================================================= --- trunk/st/models.py (original) +++ trunk/st/models.py Sat Oct 6 14:49:05 2007 @@ -153,6 +153,7 @@ videos = models.ManyToManyField(Video, blank=True) update = models.DateTimeField('Son G?ncelleme', blank=False) author = models.CharField('Yazar', maxlength=32) + order = models.PositiveIntegerField(unique=True, verbose_name='S?ralama') status = models.BooleanField('Aktif') def __str__(self): @@ -166,13 +167,13 @@ class Admin: fields = ( - ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','update','status',)}), + ('Genel', {'fields': ('author', 'title','sum','text','videos','tags','order','update','status',)}), ('Di?er', {'fields': ('slug',), 'classes': 'collapse'}), ) list_display = ('title', 'author', 'status', 'update') list_filter = ['update'] - ordering = ['-update'] + ordering = ['order'] search_fields = ['title', 'text', 'tags'] js = ("js/admin/sef.js", "js/tinymce/tiny_mce.js", "js/tinymce/textareas.js",) @@ -380,6 +381,7 @@ name = models.CharField('Sunucu ad?', maxlength = 64, blank = False, unique = True) url = models.CharField('Adres', maxlength = 128) type = models.SmallIntegerField('CD Tipi', maxlength=1, choices=cdtype) + order = models.PositiveIntegerField(verbose_name='S?ralama') status = models.BooleanField('Aktif') def __str__(self): @@ -391,5 +393,6 @@ search_fields = ['name'] class Meta: + unique_together = (('type', 'order'),) verbose_name = "Pardus Yans?s?" - verbose_name_plural = "Pardus Yans?lar?" + verbose_name_plural = "Pardus Yans?lar?" \ No newline at end of file From oi-commits at pardus.org.tr Sat Oct 6 14:59:11 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 14:59:11 +0300 (EEST) Subject: [Oi-commits] r588 - in branches/stable: media/hackergotchi st Message-ID: <20071006115911.18B837C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 14:59:10 2007 New Revision: 588 Added: branches/stable/media/hackergotchi/ekinmeroglu.png - copied unchanged from r587, trunk/media/hackergotchi/ekinmeroglu.png branches/stable/st/models.py - copied unchanged from r587, trunk/st/models.py Log: lala From oi-commits at pardus.org.tr Sat Oct 6 15:06:32 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 15:06:32 +0300 (EEST) Subject: [Oi-commits] r589 - branches/forum Message-ID: <20071006120632.7825B7C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 15:06:32 2007 New Revision: 589 Modified: branches/forum/TODO Log: asd Modified: branches/forum/TODO ================================================================= --- branches/forum/TODO (original) +++ branches/forum/TODO Sat Oct 6 15:06:32 2007 @@ -33,7 +33,7 @@ + Sorting + Lock + Pagination - / Topic + + Topic + Flood Control + Tags - Hot or Not (Reddit style) From oi-commits at pardus.org.tr Sat Oct 6 16:09:02 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:09:02 +0300 (EEST) Subject: [Oi-commits] r590 - trunk Message-ID: <20071006130902.535AD7C0038@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:09:02 2007 New Revision: 590 Modified: trunk/urls.py Log: order_by order Modified: trunk/urls.py ================================================================= --- trunk/urls.py (original) +++ trunk/urls.py Sat Oct 6 16:09:02 2007 @@ -45,7 +45,7 @@ } fs_dict = { - 'queryset': FS.objects.filter(status=1).order_by('title'), + 'queryset': FS.objects.filter(status=1).order_by('order'), 'template_name': 'fs/fs_main.html', 'paginate_by': FS_PER_PAGE, 'template_object_name': 'fs' From oi-commits at pardus.org.tr Sat Oct 6 16:11:18 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:11:18 +0300 (EEST) Subject: [Oi-commits] r591 - branches/stable Message-ID: <20071006131118.DDF7E7C0038@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:11:18 2007 New Revision: 591 Modified: branches/stable/urls.py Log: sync Modified: branches/stable/urls.py ================================================================= --- branches/stable/urls.py (original) +++ branches/stable/urls.py Sat Oct 6 16:11:18 2007 @@ -45,7 +45,7 @@ } fs_dict = { - 'queryset': FS.objects.filter(status=1).order_by('title'), + 'queryset': FS.objects.filter(status=1).order_by('order'), 'template_name': 'fs/fs_main.html', 'paginate_by': FS_PER_PAGE, 'template_object_name': 'fs' From oi-commits at pardus.org.tr Sat Oct 6 16:29:21 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:29:21 +0300 (EEST) Subject: [Oi-commits] r592 - in trunk/templates: download fs Message-ID: <20071006132921.CBDB47C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:29:21 2007 New Revision: 592 Modified: trunk/templates/download/download.html trunk/templates/fs/fs_main.html Log: up Modified: trunk/templates/download/download.html ================================================================= --- trunk/templates/download/download.html (original) +++ trunk/templates/download/download.html Sat Oct 6 16:29:21 2007 @@ -25,7 +25,7 @@ {% endif %} -

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: trunk/templates/fs/fs_main.html ================================================================= --- trunk/templates/fs/fs_main.html (original) +++ trunk/templates/fs/fs_main.html Sat Oct 6 16:29:21 2007 @@ -24,22 +24,6 @@ {% block sidebartop %}{% endblock %} {% block sidebar %} - - - {% endblock %} From oi-commits at pardus.org.tr Sat Oct 6 16:29:37 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 6 Oct 2007 16:29:37 +0300 (EEST) Subject: [Oi-commits] r593 - in branches/stable/templates: download fs Message-ID: <20071006132938.005C77C0033@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 6 16:29:37 2007 New Revision: 593 Modified: branches/stable/templates/download/download.html branches/stable/templates/fs/fs_main.html Log: sync Modified: branches/stable/templates/download/download.html ================================================================= --- branches/stable/templates/download/download.html (original) +++ branches/stable/templates/download/download.html Sat Oct 6 16:29:37 2007 @@ -25,7 +25,7 @@ {% endif %} -

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.*)/(?P\d+)/quote/(?P\d+)/$', 'oi.forum.views.reply'), (r'^(?P.*)/(?P\d+)/reply/$', 'oi.forum.views.reply'), (r'^(?P.*)/(?P\d+)/hide/(?P\d+)/$', 'oi.forum.views.hide'), + (r'^(?P.*)/(?P\d+)/edit/(?P\d+)/$', 'oi.forum.views.edit_post'), (r'^(?P.*)/(?P\d+)/hide/$', 'oi.forum.views.hide'), - (r'^(?P.*)/(?P\d+)/delete/(?P\d+)/$', 'oi.forum.views.delete'), - (r'^(?P.*)/(?P\d+)/delete/$', 'oi.forum.views.delete'), (r'^(?P.*)/(?P\d+)/lock/$', 'oi.forum.views.lock'), (r'^(?P.*)/(?P\d+)/stick/$', 'oi.forum.views.stick'), + (r'^(?P.*)/(?P\d+)/edit/$', 'oi.forum.views.edit_topic'), (r'^(?P.*)/(?P\d+)/$', 'oi.forum.views.topic'), (r'^(?P.*)/$', 'oi.forum.views.forum'), ) \ No newline at end of file Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Oct 27 16:57:29 2007 @@ -11,12 +11,10 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 -from django.core.paginator import ObjectPaginator from django.views.generic.list_detail import object_list from oi.forum.settings import * - -from oi.forum.forms import TopicForm, PostForm +from oi.forum.forms import * from oi.st.wrappers import render_response from oi.forum.models import Category, Forum, Topic, Post, AbuseReport, WatchList @@ -30,12 +28,12 @@ forum = get_object_or_404(Forum, slug=forum_slug) topics = forum.topic_set.all().order_by('-sticky', '-topic_latest_post') - return object_list(request, topics, template_name='forum/forum_detail.html', template_object_name='topic', extra_context={'forum': forum}, paginate_by=5, allow_empty=True) + return object_list(request, topics, template_name='forum/forum_detail.html', template_object_name='topic', extra_context={'forum': forum}, paginate_by=TOPICS_PER_PAGE, allow_empty=True) def topic(request, forum_slug, topic_id): forum = get_object_or_404(Forum, slug=forum_slug) topic = get_object_or_404(Topic, pk=topic_id) - posts = topic.post_set.all().order_by('update') + posts = topic.post_set.all().order_by('created') session_key = 'visited_'+topic_id @@ -62,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() @@ -79,6 +77,34 @@ return render_response(request, 'forum/reply.html', locals()) @login_required +def edit_post(request, forum_slug, topic_id, post_id): + forum = get_object_or_404(Forum, slug=forum_slug) + topic = get_object_or_404(Topic, pk=topic_id) + post = get_object_or_404(Post, pk=post_id) + + if forum.locked or topic.locked: + raise HttpResponseServerError #FIXME: Give an error message + + if request.method == 'POST': + form = PostForm(request.POST.copy()) + + flood,timeout = flood_control(request) + + if form.is_valid() and not flood: + post.text = form.cleaned_data['text'] + post.edit_count += 1 + post.edited = datetime.now() + post.last_edited_by = request.user + post.save() + + return HttpResponseRedirect(post.get_absolute_url()) + else: + if post in topic.post_set.all(): + form = PostForm(auto_id=True, initial={'text': post.text}) + + return render_response(request, 'forum/reply.html', locals()) + + at login_required def new_topic(request, forum_slug): forum = get_object_or_404(Forum, slug=forum_slug) @@ -91,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() @@ -108,6 +134,35 @@ return render_response(request, 'forum/new_topic.html', locals()) @login_required +def edit_topic(request, forum_slug, topic_id): + forum = get_object_or_404(Forum, slug=forum_slug) + topic = get_object_or_404(Topic, pk=topic_id) + first_post = topic.post_set.order_by('created')[0] + + if forum.locked or topic.locked: + raise HttpResponseServerError #FIXME: Give an error message + + if request.method == 'POST': + form = TopicForm(request.POST.copy()) + flood,timeout = flood_control(request) + + if form.is_valid() and not flood: + topic.title = form.cleaned_data['title'] + topic.topic_latest_post = first_post + topic.save() + + first_post.edit_count += 1 + first_post.edited = datetime.now() + first_post.last_edited_by = request.user + first_post.save() + + return HttpResponseRedirect(topic.get_absolute_url()) + else: + form = TopicForm(auto_id=True, initial={'title': topic.title, 'text': first_post.text}) + + return render_response(request, 'forum/new_topic.html', locals()) + + at login_required def hide(request, forum_slug, topic_id, post_id=False): forum = get_object_or_404(Forum, slug=forum_slug) topic = get_object_or_404(Topic, pk=topic_id) From oi-commits at pardus.org.tr Sat Oct 27 16:59:38 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 27 Oct 2007 16:59:38 +0300 (EEST) Subject: [Oi-commits] r602 - trunk/templates/forum Message-ID: <20071027135938.C48587C0025@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 27 16:59:38 2007 New Revision: 602 Added: trunk/templates/forum/forum_detail.html trunk/templates/forum/forum_list.html trunk/templates/forum/new_topic.html trunk/templates/forum/reply.html trunk/templates/forum/topic.html Removed: trunk/templates/forum/main.html Log: mrg From oi-commits at pardus.org.tr Sat Oct 27 17:28:02 2007 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 27 Oct 2007 17:28:02 +0300 (EEST) Subject: [Oi-commits] r603 - branches/forum Message-ID: <20071027142802.AEE4B7C0025@liste.uludag.org.tr> Author: ahmet Date: Sat Oct 27 17:28:02 2007 New Revision: 603 Removed: branches/forum/ Log: done