HPNL 10 місяців тому
батько
коміт
ba332c586d
3 змінених файлів з 10 додано та 8 видалено
  1. 2 0
      admin.py
  2. 6 6
      migrations/0003_auto_20240123_1638.py
  3. 2 2
      views.py

+ 2 - 0
admin.py

@@ -14,9 +14,11 @@ class Wiki_Admin(ImportExportModelAdmin):
 	form = Wiki_Admin_Form
 	list_display = ('w_titre', 'w_description', 'w_publier','w_publdate','w_reading')
 	list_filter = ('w_publier','w_cat','w_publdate')
+	exclude = ('w_publier','w_reading',)
 	filter_horizontal = ('w_cat',)
 	actions = [bt_w_publier, bt_w_not_publier]
 	search_fields = ['w_titre','w_contenu']
+
 admin.site.register(Wiki, Wiki_Admin)
 
 class Cat_Wiki_Admin(admin.ModelAdmin):

+ 6 - 6
migrations/0003_auto_20240123_1638.py

@@ -1,7 +1,7 @@
 # Generated by Django 3.2.23 on 2024-01-23 16:38
 
 from django.db import migrations, models
-import django_quill.fields
+# import django_quill.fields
 
 
 class Migration(migrations.Migration):
@@ -11,11 +11,11 @@ class Migration(migrations.Migration):
     ]
 
     operations = [
-        migrations.AlterField(
-            model_name='wiki',
-            name='w_contenu',
-            field=django_quill.fields.QuillField(),
-        ),
+        # migrations.AlterField(
+        #     model_name='wiki',
+        #     name='w_contenu',
+        #     field=django_quill.fields.QuillField(),
+        # ),
         migrations.AlterField(
             model_name='wiki',
             name='w_description',

+ 2 - 2
views.py

@@ -41,9 +41,9 @@ def wiki_index(request, cat):
 		page.wiki_search = Wiki_search_Form()
 	if cat == "index":
 		if w_search != None:
-			wiki_art = Wiki.objects.filter( w_publier = True ).filter(q).order_by( '-w_publdate' )[:5]
+			wiki_art = Wiki.objects.filter( w_publier = True ).filter(q).order_by( '-w_publdate' )
 		else :
-			wiki_art = Wiki.objects.filter( w_publier = True ).order_by( '-w_publdate' )[:5]
+			wiki_art = Wiki.objects.filter( w_publier = True ).order_by( '-w_publdate' )
 		page.wiki_cat = Cat_Wiki.objects.all()[:15]
 
 	elif cat == "all":