Browse Source

Error corrected

prieto 8 years ago
parent
commit
0f2261f8a6
2 changed files with 5 additions and 5 deletions
  1. 1
    1
      lodel/plugins/webui/interface/controllers/listing.py
  2. 4
    4
      progs/create_datas.sh

+ 1
- 1
lodel/plugins/webui/interface/controllers/listing.py View File

@@ -9,7 +9,7 @@ from ...exceptions import *
9 9
 ##@brief These functions are called by the rules defined in ../urls.py
10 10
 ## To browse the editorial model
11 11
 def index(request):
12
-    return get_response(''listing/collections.html', my_classes=dyncode')
12
+    return get_response('listing/collections.html', my_classes=dyncode')
13 13
 
14 14
 ##@brief Controller's function to list all types (classes) of the editorial model
15 15
 # @param request : the request (get or post)

+ 4
- 4
progs/create_datas.sh View File

@@ -116,7 +116,7 @@ do
116 116
         issue=$(printf "use $dbname\n db.Issue.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo  $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" )
117 117
        
118 118
         # On entre les textes correspondants aux numéros indépendemment des parts
119
-        NBT=$(shuf '2' '3' '4' '5' '6' '8' | head -n 1)
119
+        NBT=$(shuf -e '2' '3' '4' '5' '6' '8' | head -n 1)
120 120
         for i in `eval echo {1..$NBT}`;
121 121
         do
122 122
             # Classe Article, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container, abstract, appendix, bibliography, author_note
@@ -168,7 +168,7 @@ do
168 168
             ATCAN=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
169 169
             curl -A "Mozilla/5.0" -L -s -d "field_input_title=$ATCT&field_input_subtitle=$ATCST&field_input_language=$LG&field_input_text=$ATCTXT&field_input_pub_date=$ATCDATE&field_input_footnotes=$ATCFN&field_input_linked_entries=$ATCLE&field_input_linked_persons=$ATCLP&field_input_linked_container=$ATCLC&field_input_abstract=$ATCAB&field_input_appendix=$ATCAP&field_input_bibliography=$ATCBI&field_input_author_note=$ATCAN&classname=Article" http://$host/$instance/admin/create?classname=Article
170 170
         done
171
-        NBR=$(shuf '0' '2' '1' | head -n 1)
171
+        NBR=$(shuf -e '0' '2' '1' | head -n 1)
172 172
         for i in `eval echo {1..$NBR}`;
173 173
         do
174 174
         # Classe Review, champs à remplir :  title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container,reference
@@ -242,7 +242,7 @@ do
242 242
             part=$(printf "use $dbname\n db.Part.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo  $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" )
243 243
        
244 244
             # On entre les textes correspondants aux  parts
245
-            NBPANBT=$(shuf '2' '3' '4' | head -n 1)
245
+            NBPANBT=$(shuf -e '2' '3' '4' | head -n 1)
246 246
             for i in `eval echo {1..$NBPANBT}`;
247 247
             do
248 248
                 # Classe Article, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container, abstract, appendix, bibliography, author_note
@@ -294,7 +294,7 @@ do
294 294
                 ATCAN=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
295 295
                 curl -A "Mozilla/5.0" -L -s -d "field_input_title=$ATCT&field_input_subtitle=$ATCST&field_input_language=$LG&field_input_text=$ATCTXT&field_input_pub_date=$ATCDATE&field_input_footnotes=$ATCFN&field_input_linked_entries=$ATCLE&field_input_linked_persons=$ATCLP&field_input_linked_container=$ATCLC&field_input_abstract=$ATCAB&field_input_appendix=$ATCAP&field_input_bibliography=$ATCBI&field_input_author_note=$ATCAN&classname=Article" http://$host/$instance/admin/create?classname=Article
296 296
             done
297
-            NBPANBR=$(shuf '0' '1' '2' | head -n 1)
297
+            NBPANBR=$(shuf -e '0' '1' '2' | head -n 1)
298 298
             for i in `eval echo {1..$NBPANBR}`;
299 299
             do
300 300
             # Classe Review, champs à remplir :  title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container,reference

Loading…
Cancel
Save