| author | ymh <ymh.work@gmail.com> |
| Wed, 22 Jun 2011 11:59:57 +0200 | |
| changeset 50 | dca0c476617b |
| parent 47 | 08b008c5a07d |
| child 51 | 6b1338c7964c |
| permissions | -rw-r--r-- |
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
1 |
# -*- coding: utf-8 -*- |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
2 |
|
| 27 | 3 |
from django.conf import settings |
4 |
from django.contrib.auth.decorators import login_required #@UnusedImport |
|
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
5 |
from django.core.paginator import Paginator |
| 28 | 6 |
from django.db.models import Max |
| 47 | 7 |
from django.http import HttpResponseBadRequest |
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
8 |
from django.shortcuts import render_to_response, redirect |
| 27 | 9 |
from django.template import RequestContext |
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
10 |
from haystack.constants import DJANGO_ID |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
11 |
from haystack.query import SearchQuerySet |
| 47 | 12 |
from hdabo.wp_utils import process_tag |
13 |
from hdabo.utils import OrderedDict |
|
14 |
from hdabo.wp_utils import (normalize_tag, query_wikipedia_title, |
|
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
15 |
get_or_create_tag) |
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
16 |
from models import Datasheet, Organisation, Tag, TagCategory, TaggedSheet |
| 27 | 17 |
from wikitools import wiki |
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
18 |
import django.utils.simplejson as json |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
19 |
|
| 27 | 20 |
|
21 |
||
22 |
#@login_required |
|
23 |
def home(request): |
|
24 |
||
| 47 | 25 |
# Get all organizations |
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
26 |
orgas = Organisation.objects.all().order_by('name') |
| 27 | 27 |
# Count all validated, unvalidated sheets for each organisation |
28 |
org_list = [] |
|
29 |
for orga in orgas : |
|
30 |
all_datasheets = Datasheet.objects.filter(organisation=orga) |
|
31 |
nb_all = len(all_datasheets) |
|
32 |
nb_val = len(all_datasheets.filter(validated=True)) |
|
33 |
nb_unval = len(all_datasheets.filter(validated=False)) |
|
34 |
org_list.append({'organisation':orga, 'nb_all':nb_all, 'nb_val':nb_val, 'nb_unval':nb_unval}) |
|
35 |
||
| 28 | 36 |
return render_to_response("organisation_list.html", |
| 27 | 37 |
{'organisations':org_list}, |
38 |
context_instance=RequestContext(request)) |
|
39 |
||
40 |
||
41 |
#@login_required |
|
42 |
def list_for_orga(request, orga_id=None, valid=None, start_index=None): |
|
43 |
||
44 |
orga = Organisation.objects.get(id=orga_id) |
|
45 |
orga_name = orga.name |
|
46 |
||
47 |
if start_index : |
|
48 |
try: |
|
49 |
start_index = int(start_index) |
|
50 |
except : |
|
51 |
start_index = 0 |
|
52 |
else : |
|
53 |
start_index = 0 |
|
54 |
||
55 |
# If valid = 0, we search unvalidated sheets |
|
56 |
# If valid = 1, we search validated sheets |
|
57 |
# If valid = 2, we search AND DISPLAY all sheets |
|
58 |
if valid == "1" : |
|
59 |
# We count all the validated sheets |
|
60 |
datasheets = Datasheet.objects.filter(organisation=orga).filter(validated=True) |
|
61 |
nb_sheets = len(datasheets) |
|
62 |
# And select the current one |
|
63 |
datasheets = [datasheets[start_index]] |
|
64 |
elif valid != "2": |
|
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
65 |
valid = "0" |
| 27 | 66 |
# We count all the validated sheets |
67 |
datasheets = Datasheet.objects.filter(organisation=orga).filter(validated=False) |
|
68 |
nb_sheets = len(datasheets) |
|
69 |
# And select the current one |
|
70 |
datasheets = [datasheets[start_index]] |
|
71 |
else : |
|
72 |
datasheets = Datasheet.objects.filter(organisation=orga) |
|
73 |
nb_sheets = len(datasheets) |
|
74 |
||
75 |
# We get the ORDERED tags if we display one sheet (case valid = 0 and 1) |
|
76 |
ordered_tags = None |
|
77 |
if valid != "2" : |
|
78 |
ordered_tags = TaggedSheet.objects.filter(datasheet=datasheets[0]).order_by('order') |
|
79 |
||
80 |
displayed_index = start_index + 1; |
|
81 |
prev_index = max(start_index - 1, 0); |
|
82 |
next_index = min(nb_sheets - 1, start_index + 1); |
|
83 |
last_index = max(nb_sheets - 1, 0); |
|
84 |
||
| 28 | 85 |
return render_to_response("list_for_orga.html", |
| 27 | 86 |
{'datasheets':datasheets, 'orga_name':orga_name, |
87 |
'nb_sheets':nb_sheets, 'orga_id':orga_id, 'ordered_tags':ordered_tags, |
|
88 |
'prev_index':prev_index, 'next_index':next_index, 'last_index':last_index, |
|
| 46 | 89 |
'start_index':start_index, 'displayed_index':displayed_index, 'valid':valid, |
90 |
'categories':json.dumps(get_categories())}, |
|
| 27 | 91 |
context_instance=RequestContext(request)) |
92 |
||
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
93 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
94 |
#@login_required |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
95 |
def all_tags(request, num_page=None, nb_by_page=None): |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
96 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
97 |
alltags = Tag.objects.order_by('label') |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
98 |
nb_total = len(alltags) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
99 |
# We build the paginator for the requested list |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
100 |
if nb_by_page : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
101 |
try: |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
102 |
nb_by_page = int(nb_by_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
103 |
except : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
104 |
nb_by_page = 25 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
105 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
106 |
nb_by_page = 25 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
107 |
if num_page : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
108 |
try: |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
109 |
num_page = int(num_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
110 |
except : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
111 |
num_page = 1 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
112 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
113 |
num_page = 1 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
114 |
p = Paginator(alltags, nb_by_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
115 |
current_page = p.page(num_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
116 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
117 |
prev_page = max(num_page - 1, 1) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
118 |
next_page = min(num_page + 1, p.num_pages) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
119 |
last_page = p.num_pages |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
120 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
121 |
return render_to_response("all_tags.html", |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
122 |
{'nb_total':nb_total, 'tags':current_page.object_list, 'current_page':current_page, |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
123 |
'prev_page':prev_page, 'next_page':next_page, 'last_page':last_page, |
| 46 | 124 |
'num_page':num_page, 'nb_by_page':nb_by_page, 'categories':json.dumps(get_categories())}, |
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
125 |
context_instance=RequestContext(request)) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
126 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
127 |
|
| 27 | 128 |
#@login_required |
129 |
def tag_up_down(request): |
|
130 |
ds_id = request.POST["datasheet_id"] |
|
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
131 |
# post vars new_order and old_order indicate the position (from 1) of the tag in the list. |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
132 |
# NB : it is different from the TagSheet.order in the database. |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
133 |
new_order = int(request.POST["new_order"]) - 1 |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
134 |
old_order = int(request.POST["old_order"]) - 1 |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
135 |
# First we get the datasheet's TaggedSheets (list to force evaluation) |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
136 |
ordered_tags = list(TaggedSheet.objects.filter(datasheet=Datasheet.objects.get(id=ds_id)).order_by('order')) |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
137 |
# We change the moved TaggedSheets's order |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
138 |
new_ts_order = ordered_tags[new_order].order |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
139 |
moved_ts = ordered_tags[old_order] |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
140 |
moved_ts.order = new_ts_order |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
141 |
moved_ts.save() |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
142 |
# We move the TaggedSheets's order |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
143 |
if new_order > old_order : |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
144 |
# And we decrease the other ones |
| 47 | 145 |
for i in range(old_order + 1, new_order + 1) : |
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
146 |
ts = ordered_tags[i] |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
147 |
ts.order = ts.order - 1 |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
148 |
ts.save() |
| 27 | 149 |
else : |
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
150 |
# And we increase the other ones |
| 47 | 151 |
for i in range(new_order, old_order) : |
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
152 |
ts = ordered_tags[i] |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
153 |
ts.order = ts.order + 1 |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
154 |
ts.save() |
| 47 | 155 |
ds = Datasheet.objects.get(id=ds_id) |
156 |
ds.manual_order = True |
|
157 |
ds.save() |
|
| 27 | 158 |
|
159 |
return get_tag_table(request=request, ds_id=ds_id, valid=0) |
|
160 |
||
161 |
||
162 |
#@login_required |
|
163 |
def get_tag_table(request=None, ds_id=None, valid=None): |
|
164 |
||
165 |
ordered_tags = TaggedSheet.objects.filter(datasheet=Datasheet.objects.filter(id=ds_id)[0]).order_by('order') |
|
166 |
||
167 |
return render_to_response("partial/tag_table.html", |
|
168 |
{'ordered_tags':ordered_tags, 'valid':valid}, |
|
169 |
context_instance=RequestContext(request)) |
|
170 |
||
171 |
||
172 |
#@login_required |
|
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
173 |
def get_all_tags_table(request, num_page=None, nb_by_page=None): |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
174 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
175 |
alltags = Tag.objects.order_by('label') |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
176 |
# We build the paginator for the requested list |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
177 |
if nb_by_page : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
178 |
try: |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
179 |
nb_by_page = int(nb_by_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
180 |
except : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
181 |
nb_by_page = 25 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
182 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
183 |
nb_by_page = 25 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
184 |
if num_page : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
185 |
try: |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
186 |
num_page = int(num_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
187 |
except : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
188 |
num_page = 1 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
189 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
190 |
num_page = 1 |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
191 |
p = Paginator(alltags, nb_by_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
192 |
current_page = p.page(num_page) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
193 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
194 |
return render_to_response("partial/all_tags_table.html", |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
195 |
{'tags':current_page.object_list}, |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
196 |
context_instance=RequestContext(request)) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
197 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
198 |
|
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
199 |
#@login_required |
| 27 | 200 |
def remove_tag_from_list(request=None): |
201 |
||
202 |
ds_id = request.POST["datasheet_id"] |
|
203 |
tag_id = request.POST["tag_id"] |
|
204 |
# First we get the datasheet's TaggedSheets |
|
205 |
ds_tags = TaggedSheet.objects.filter(datasheet=Datasheet.objects.filter(id=ds_id)[0]) |
|
206 |
# We get the current TaggedSheet and we delete it |
|
207 |
ts = ds_tags.filter(tag=Tag.objects.filter(id=tag_id))[0] |
|
208 |
ts.delete() |
|
209 |
||
| 47 | 210 |
ds = Datasheet.objects.get(id=ds_id) |
211 |
ds.manual_order = True |
|
212 |
ds.save() |
|
213 |
||
| 27 | 214 |
return get_tag_table(request=request, ds_id=ds_id, valid=0) |
215 |
||
216 |
||
217 |
#@login_required |
|
218 |
def modify_tag(request): |
|
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
219 |
|
| 27 | 220 |
tag_id = request.POST["id"] |
221 |
tag_label = request.POST["value"] |
|
222 |
||
223 |
tag = Tag.objects.get(id=tag_id) |
|
224 |
||
225 |
if tag.label != tag_label: |
|
226 |
||
227 |
tag.label = tag_label |
|
228 |
||
229 |
site = wiki.Wiki(settings.WIKIPEDIA_API_URL) #@UndefinedVariable |
|
| 47 | 230 |
wp_res = query_wikipedia_title(site, tag_label) |
| 50 | 231 |
status, url, pageid, dbpedia_uri = (wp_res['status'], wp_res['wikipedia_url'], wp_res['pageid'], wp_res["dbpedia_uri"]) |
| 27 | 232 |
|
233 |
if status is not None: |
|
234 |
tag.url_status = status |
|
| 47 | 235 |
|
236 |
tag.wikipedia_url = url |
|
237 |
tag.wikipedia_pageid = pageid |
|
238 |
tag.dbpedia_uri = dbpedia_uri |
|
| 27 | 239 |
|
240 |
tag.save() |
|
241 |
||
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
242 |
return get_all_tags_table(request=request, num_page=request.POST["num_page"], nb_by_page=request.POST["nb_by_page"]) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
243 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
244 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
245 |
#@login_required |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
246 |
def modify_tag_datasheet(request): |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
247 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
248 |
tag_id = request.POST["id"] |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
249 |
tag_label = request.POST["value"] |
| 47 | 250 |
ds_id = request.POST["datasheet_id"] |
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
251 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
252 |
tag = Tag.objects.get(id=tag_id) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
253 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
254 |
ds = Datasheet.objects.get(id=ds_id) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
255 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
256 |
if tag.label != tag_label: |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
257 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
258 |
if tag_label.lower() in [t.label.lower() for t in ds.tags.all()]: |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
259 |
return HttpResponseBadRequest(json.dumps({'error': 'duplicate_tag', 'message': u"Le tag %s existe déjà pour cette fiche." % (tag_label)}), mimetype="application/json") |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
260 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
261 |
tag, created = get_or_create_tag(tag_label) #@UnusedVariable |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
262 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
263 |
ts = TaggedSheet.objects.get(tag=tag_id, datasheet=ds_id) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
264 |
ts.tag = tag |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
265 |
kwargs = {DJANGO_ID + "__exact": unicode(ds_id)} |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
266 |
results = SearchQuerySet().filter(title=tag_label).filter_or(description=tag_label).filter(**kwargs) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
267 |
if len(results) > 0: |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
268 |
ts.index_note = results[0].score |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
269 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
270 |
ts.save() |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
271 |
|
| 47 | 272 |
ds.manual_order = True |
273 |
ds.save() |
|
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
274 |
|
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
275 |
return get_tag_table(request=request, ds_id=ds_id, valid=0) |
|
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
276 |
|
| 27 | 277 |
|
278 |
||
279 |
#@login_required |
|
280 |
def reset_wikipedia_info(request): |
|
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
281 |
# 2 cases : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
282 |
# - ordered tag for one datasheet : POST["datasheet_id"] is not null |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
283 |
# - all tags list : POST["datasheet_id"] is null and POST["num_page"] and POST["nb_by_page"] are not null |
|
31
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
284 |
tag_id = request.POST["tag_id"] |
| 27 | 285 |
|
286 |
tag = Tag.objects.get(id=tag_id) |
|
287 |
site = wiki.Wiki(settings.WIKIPEDIA_API_URL) #@UndefinedVariable |
|
288 |
||
289 |
tag.label = normalize_tag(tag.original_label) |
|
290 |
||
| 33 | 291 |
#reset tag info |
292 |
tag.wikipedia_url = None |
|
293 |
tag.wikipedia_pageid = None |
|
| 36 | 294 |
|
| 27 | 295 |
process_tag(site, tag, 0) |
296 |
||
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
297 |
if u"datasheet_id" in request.POST : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
298 |
return get_tag_table(request=request, ds_id=request.POST["datasheet_id"], valid=0) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
299 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
300 |
return get_all_tags_table(request=request, num_page=request.POST["num_page"], nb_by_page=request.POST["nb_by_page"]) |
| 28 | 301 |
|
302 |
||
303 |
#@login_required |
|
304 |
def add_tag(request=None): |
|
305 |
||
306 |
ds_id = request.POST["datasheet_id"] |
|
307 |
tag_label = request.POST["value"] |
|
| 43 | 308 |
|
309 |
ds = Datasheet.objects.get(id=ds_id) |
|
310 |
if tag_label.lower() in [t.label.lower() for t in ds.tags.all()]: |
|
311 |
return HttpResponseBadRequest(json.dumps({'error': 'duplicate_tag', 'message': u"Le tag %s existe déjà pour cette fiche." % (tag_label)}), mimetype="application/json") |
|
312 |
||
| 29 | 313 |
|
|
42
861a78f74a37
modify behavior for tag modification on the datasheet
ymh <ymh.work@gmail.com>
parents:
36
diff
changeset
|
314 |
tag, created = get_or_create_tag(tag_label) |
| 28 | 315 |
# We put the tag at the bottom of the datasheet's tag list |
316 |
# if the tag is created or if the tag is not in the list |
|
| 43 | 317 |
|
| 28 | 318 |
list_ts = TaggedSheet.objects.filter(datasheet=ds) |
| 47 | 319 |
if created or len(list_ts.filter(tag=tag)) == 0 : |
| 28 | 320 |
new_order = list_ts.aggregate(Max('order'))['order__max'] + 1 |
321 |
ts = TaggedSheet.objects.create(datasheet=ds, tag=tag, original_order=new_order, order=new_order) |
|
322 |
ts.save() |
|
| 47 | 323 |
ds.manual_order = True |
324 |
ds.save() |
|
| 28 | 325 |
|
326 |
return get_tag_table(request=request, ds_id=ds_id, valid=0) |
|
327 |
||
|
31
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
328 |
|
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
329 |
#@login_required |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
330 |
def remove_wp_link(request=None): |
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
331 |
# 2 cases : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
332 |
# - ordered tag for one datasheet : POST["datasheet_id"] is not null |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
333 |
# - all tags list : POST["datasheet_id"] is null and POST["num_page"] and POST["nb_by_page"] are not null |
|
31
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
334 |
tag_id = request.POST["tag_id"] |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
335 |
tag = Tag.objects.filter(id=tag_id)[0] |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
336 |
tag.wikipedia_url = None |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
337 |
tag.wikipedia_pageid = None |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
338 |
tag.url_status = 0; |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
339 |
tag.save() |
|
142d0440c9aa
Remove wp link button activated. Some js function gathered.
cavaliet
parents:
30
diff
changeset
|
340 |
|
|
32
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
341 |
if u"datasheet_id" in request.POST : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
342 |
return get_tag_table(request=request, ds_id=request.POST["datasheet_id"], valid=0) |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
343 |
else : |
|
ffd77b2b939f
First step of tag list. Enhance js function for datasheet context or tag list context.
cavaliet
parents:
31
diff
changeset
|
344 |
return get_all_tags_table(request=request, num_page=request.POST["num_page"], nb_by_page=request.POST["nb_by_page"]) |
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
345 |
|
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
346 |
|
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
347 |
#@login_required |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
348 |
def validate_datasheet(request=None, ds_id=None, valid=None): |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
349 |
# We set if valid is true of false, function of the url parameters |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
350 |
if valid == "1" or valid == "true" or not valid : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
351 |
valid = True |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
352 |
else : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
353 |
valid = False |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
354 |
# We validate or unvalidate the requester datasheet |
| 47 | 355 |
|
356 |
if request.user.is_authenticated(): |
|
357 |
user = request.user |
|
358 |
else: |
|
359 |
user = None |
|
360 |
||
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
361 |
ds = Datasheet.objects.get(id=ds_id) |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
362 |
if valid : |
| 47 | 363 |
ds.validate(user) |
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
364 |
else : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
365 |
ds.unvalidate() |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
366 |
ds.save() |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
367 |
# If there are still some unvalidated/validated ds for the ds's orga, we display the first one |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
368 |
same_organisation_ds = Datasheet.objects.filter(organisation=ds.organisation).filter(validated=not valid) |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
369 |
if valid : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
370 |
# We ask to display the unvalidated ds |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
371 |
valid_req = 0 |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
372 |
else : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
373 |
# We ask to display the validated ds |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
374 |
valid_req = 1 |
| 47 | 375 |
if len(same_organisation_ds) > 0 : |
|
34
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
376 |
return redirect('list_for_orga', orga_id=ds.organisation.id, valid=valid_req) |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
377 |
else : |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
378 |
return redirect('home') |
|
26368d096723
Datasheet validation, better repartition of js function, hand cursor on buttons.
cavaliet
parents:
32
diff
changeset
|
379 |
|
| 36 | 380 |
|
381 |
#@login_required |
|
382 |
def update_tag_alias(request): |
|
383 |
# 2 cases : |
|
384 |
# - ordered tag for one datasheet : POST["datasheet_id"] is not null |
|
385 |
# - all tags list : POST["datasheet_id"] is null and POST["num_page"] and POST["nb_by_page"] are not null |
|
386 |
tag_id = request.POST["id"] |
|
387 |
tag_alias = request.POST["value"] |
|
388 |
tag = Tag.objects.get(id=tag_id) |
|
389 |
tag.alias = tag_alias |
|
390 |
tag.save() |
|
391 |
||
392 |
if u"datasheet_id" in request.POST : |
|
393 |
return get_tag_table(request=request, ds_id=request.POST["datasheet_id"], valid=0) |
|
394 |
else : |
|
395 |
return get_all_tags_table(request=request, num_page=request.POST["num_page"], nb_by_page=request.POST["nb_by_page"]) |
|
396 |
||
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
397 |
|
| 46 | 398 |
#@login_required |
399 |
def get_categories(): |
|
400 |
# List of categories in an OrderedDict |
|
401 |
categories = OrderedDict({"":""}) |
|
402 |
for c in TagCategory.objects.order_by('label') : |
|
403 |
categories.update({c.label:c.label}) |
|
404 |
return categories |
|
|
44
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
405 |
|
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
406 |
|
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
407 |
#@login_required |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
408 |
def update_tag_category(request): |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
409 |
|
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
410 |
tag_id = request.POST["id"] |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
411 |
cat = request.POST["value"] |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
412 |
tag = Tag.objects.get(id=tag_id) |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
413 |
if cat and cat != "" : |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
414 |
tag.category = TagCategory.objects.get(label=cat) |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
415 |
else : |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
416 |
tag.category = None |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
417 |
tag.save() |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
418 |
# This function is available only in all_tags_table context |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
419 |
return get_all_tags_table(request=request, num_page=request.POST["num_page"], nb_by_page=request.POST["nb_by_page"]) |
|
244d805b4921
Reorder taggedsheet by drag and drop. Remove wikipedia_activated for a tag. TagCategory chosen by closed list.
cavaliet
parents:
43
diff
changeset
|
420 |
|
| 47 | 421 |