Salut,

Si collectstatic ne récupère pas les fichiers de markitup c'est que Django n'en 
a pas connaissance. Donc si tu utilises django-markitup, évidemment il faut 
qu'il soit renseigné dans ton settings.INSTALLED_APPS pour que django ailler 
"fouiner" dans son répertoire des statics.

Si tu a essayé d'intégrer markitup directement, alors il suffit juste d'ajouter 
le chemin de ta copie de markitup dans settings.STATICFILES_DIRS et Django 
pourra alors le retrouver.

Attention, STATIC_ROOT n'est pas le répertoire qui __diffuse__ les fichiers 
statiques, c'est uniquement un rép

> [quote=Xavier Ordoquy]Donc, tu remplaces ton STATIC_ROOT par
> STATICFILES_DIRS et ça devrait marcher[/quote]

Il y a du avoir incompréhension je pense, STATIC_ROOT doit être rempli 
correctement et ce que tu avais fait initialement semble correct : 

> STATIC_ROOT = '/home/arnaud/site/static/'

Ca c'est bien, c'est le répertoire où seront mis les fichiers static collectés 
(par collectstatic ou le loader en mode de développement)

À la base tu ne dois rien y mettre, c'est django qui doit le remplir 
(virtuellement par le loader en mode DEBUG, ou pour de vrai avec 
collectstatic).

Donc tu déplace ton markitup qui était "/home/arnaud/site/static/markitup", 
ailleurs, ou tu veux puis tu renseigne son nouveau chemin :

STATICFILES_DIRS = ('/monchemin/vers/ma/copie/de/markitup',)

Une fois fait tu lances collectstatic juste pour voir ce qu'il peut scanner 
(pas la peine de créer les statics en mode debug). En théorie il devrait 
parcourir tes statics de markitup.

-- 
Cordialement,
David THENON - http://sveetch.biz

Le lundi 20 août 2012 21:19:15, Arnaud a écrit :
> Bonsoir,
> 
> [quote=FoxMaSk]ls -Rl /home/arnaud/site/static/markitup [/quote]
> 
> Voilà, tout est là :
> 
> [code]
> static/markitup:
> total 40K
> -rwxrwxrwx 1 arnaud arnaud 1,2K août  19 18:46 ajax_csrf.js*
> -rwxrwxrwx 1 arnaud arnaud  17K août  19 18:46 jquery.markitup.js*
> -rwxrwxrwx 1 arnaud arnaud  113 août  19 18:46 preview.css*
> drwxrwxrwx 6 arnaud arnaud 4,0K août  19 18:46 sets/
> drwxrwxrwx 4 arnaud arnaud 4,0K août  19 18:46 skins/
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 templates/
> 
> static/markitup/sets:
> total 16K
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 default/
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 markdown/
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 restructuredtext/
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 textile/
> 
> static/markitup/sets/default:
> total 12K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud 1,6K août  19 18:46 set.js*
> -rwxrwxrwx 1 arnaud arnaud  722 août  19 18:46 style.css*
> 
> static/markitup/sets/default/images:
> total 32K
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 bold.png*
> -rwxrwxrwx 1 arnaud arnaud 667 août  19 18:46 clean.png*
> -rwxrwxrwx 1 arnaud arnaud 516 août  19 18:46 image.png*
> -rwxrwxrwx 1 arnaud arnaud 223 août  19 18:46 italic.png*
> -rwxrwxrwx 1 arnaud arnaud 343 août  19 18:46 link.png*
> -rwxrwxrwx 1 arnaud arnaud 606 août  19 18:46 picture.png*
> -rwxrwxrwx 1 arnaud arnaud 537 août  19 18:46 preview.png*
> -rwxrwxrwx 1 arnaud arnaud 269 août  19 18:46 stroke.png*
> 
> static/markitup/sets/markdown:
> total 16K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud  319 août  19 18:46 readme.txt*
> -rwxrwxrwx 1 arnaud arnaud 2,5K août  19 18:46 set.js*
> -rwxrwxrwx 1 arnaud arnaud 1,3K août  19 18:46 style.css*
> 
> static/markitup/sets/markdown/images:
> total 60K
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 bold.png*
> -rwxrwxrwx 1 arnaud arnaud 859 août  19 18:46 code.png*
> -rwxrwxrwx 1 arnaud arnaud 276 août  19 18:46 h1.png*
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 h2.png*
> -rwxrwxrwx 1 arnaud arnaud 306 août  19 18:46 h3.png*
> -rwxrwxrwx 1 arnaud arnaud 293 août  19 18:46 h4.png*
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 h5.png*
> -rwxrwxrwx 1 arnaud arnaud 310 août  19 18:46 h6.png*
> -rwxrwxrwx 1 arnaud arnaud 223 août  19 18:46 italic.png*
> -rwxrwxrwx 1 arnaud arnaud 343 août  19 18:46 link.png*
> -rwxrwxrwx 1 arnaud arnaud 344 août  19 18:46 list-bullet.png*
> -rwxrwxrwx 1 arnaud arnaud 357 août  19 18:46 list-numeric.png*
> -rwxrwxrwx 1 arnaud arnaud 606 août  19 18:46 picture.png*
> -rwxrwxrwx 1 arnaud arnaud 537 août  19 18:46 preview.png*
> -rwxrwxrwx 1 arnaud arnaud 743 août  19 18:46 quotes.png*
> 
> static/markitup/sets/restructuredtext:
> total 12K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud 2,8K août  19 18:46 set.js*
> -rwxrwxrwx 1 arnaud arnaud 1,2K août  19 18:46 style.css*
> 
> static/markitup/sets/restructuredtext/images:
> total 64K
> -rwxrwxrwx 1 arnaud arnaud  304 août  19 18:46 bold.png*
> -rwxrwxrwx 1 arnaud arnaud 1,1K août  19 18:46 close.png*
> -rwxrwxrwx 1 arnaud arnaud  859 août  19 18:46 code.png*
> -rwxrwxrwx 1 arnaud arnaud  276 août  19 18:46 h1.png*
> -rwxrwxrwx 1 arnaud arnaud  304 août  19 18:46 h2.png*
> -rwxrwxrwx 1 arnaud arnaud  306 août  19 18:46 h3.png*
> -rwxrwxrwx 1 arnaud arnaud  293 août  19 18:46 h4.png*
> -rwxrwxrwx 1 arnaud arnaud  304 août  19 18:46 h5.png*
> -rwxrwxrwx 1 arnaud arnaud  310 août  19 18:46 h6.png*
> -rwxrwxrwx 1 arnaud arnaud  223 août  19 18:46 italic.png*
> -rwxrwxrwx 1 arnaud arnaud  343 août  19 18:46 link.png*
> -rwxrwxrwx 1 arnaud arnaud  344 août  19 18:46 list-bullet.png*
> -rwxrwxrwx 1 arnaud arnaud  357 août  19 18:46 list-numeric.png*
> -rwxrwxrwx 1 arnaud arnaud  606 août  19 18:46 picture.png*
> -rwxrwxrwx 1 arnaud arnaud  537 août  19 18:46 preview.png*
> -rwxrwxrwx 1 arnaud arnaud  743 août  19 18:46 quotes.png*
> 
> static/markitup/sets/textile:
> total 16K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud  333 août  19 18:46 readme.txt*
> -rwxrwxrwx 1 arnaud arnaud 2,2K août  19 18:46 set.js*
> -rwxrwxrwx 1 arnaud arnaud 1,5K août  19 18:46 style.css*
> 
> static/markitup/sets/textile/images:
> total 68K
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 bold.png*
> -rwxrwxrwx 1 arnaud arnaud 859 août  19 18:46 code.png*
> -rwxrwxrwx 1 arnaud arnaud 276 août  19 18:46 h1.png*
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 h2.png*
> -rwxrwxrwx 1 arnaud arnaud 306 août  19 18:46 h3.png*
> -rwxrwxrwx 1 arnaud arnaud 293 août  19 18:46 h4.png*
> -rwxrwxrwx 1 arnaud arnaud 304 août  19 18:46 h5.png*
> -rwxrwxrwx 1 arnaud arnaud 310 août  19 18:46 h6.png*
> -rwxrwxrwx 1 arnaud arnaud 223 août  19 18:46 italic.png*
> -rwxrwxrwx 1 arnaud arnaud 343 août  19 18:46 link.png*
> -rwxrwxrwx 1 arnaud arnaud 344 août  19 18:46 list-bullet.png*
> -rwxrwxrwx 1 arnaud arnaud 357 août  19 18:46 list-numeric.png*
> -rwxrwxrwx 1 arnaud arnaud 361 août  19 18:46 paragraph.png*
> -rwxrwxrwx 1 arnaud arnaud 606 août  19 18:46 picture.png*
> -rwxrwxrwx 1 arnaud arnaud 537 août  19 18:46 preview.png*
> -rwxrwxrwx 1 arnaud arnaud 743 août  19 18:46 quotes.png*
> -rwxrwxrwx 1 arnaud arnaud 269 août  19 18:46 stroke.png*
> 
> static/markitup/skins:
> total 8,0K
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 markitup/
> drwxrwxrwx 3 arnaud arnaud 4,0K août  19 18:46 simple/
> 
> static/markitup/skins/markitup:
> total 8,0K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud 3,3K août  19 18:46 style.css*
> 
> static/markitup/skins/markitup/images:
> total 100K
> -rwxrwxrwx 1 arnaud arnaud  28K août  19 18:46 bg-container.png*
> -rwxrwxrwx 1 arnaud arnaud 1,7K août  19 18:46 bg-editor-bbcode.png*
> -rwxrwxrwx 1 arnaud arnaud 1,7K août  19 18:46 bg-editor-dotclear.png*
> -rwxrwxrwx 1 arnaud arnaud 1,5K août  19 18:46 bg-editor-html.png*
> -rwxrwxrwx 1 arnaud arnaud 1,5K août  19 18:46 bg-editor-json.png*
> -rwxrwxrwx 1 arnaud arnaud 1,8K août  19 18:46 bg-editor-markdown.png*
> -rwxrwxrwx 1 arnaud arnaud 1,8K août  19 18:46 bg-editor.png*
> -rwxrwxrwx 1 arnaud arnaud 1,7K août  19 18:46 bg-editor-textile.png*
> -rwxrwxrwx 1 arnaud arnaud 1,5K août  19 18:46 bg-editor-wiki.png*
> -rwxrwxrwx 1 arnaud arnaud 1,5K août  19 18:46 bg-editor-xml.png*
> -rwxrwxrwx 1 arnaud arnaud  258 août  19 18:46 handle.png*
> -rwxrwxrwx 1 arnaud arnaud  27K août  19 18:46 menu.png*
> -rwxrwxrwx 1 arnaud arnaud  240 août  19 18:46 submenu.png*
> 
> static/markitup/skins/simple:
> total 8,0K
> drwxrwxrwx 2 arnaud arnaud 4,0K août  19 18:46 images/
> -rwxrwxrwx 1 arnaud arnaud 2,5K août  19 18:46 style.css*
> 
> static/markitup/skins/simple/images:
> total 36K
> -rwxrwxrwx 1 arnaud arnaud 258 août  19 18:46 handle.png*
> -rwxrwxrwx 1 arnaud arnaud 27K août  19 18:46 menu.png*
> -rwxrwxrwx 1 arnaud arnaud 240 août  19 18:46 submenu.png*
> 
> static/markitup/templates:
> total 8,0K
> -rwxrwxrwx 1 arnaud arnaud 113 août  19 18:46 preview.css*
> -rwxrwxrwx 1 arnaud arnaud 406 août  19 18:46 preview.html*
> [/code]
> 
> Comme annoncé, des droits foireux à 777, mais c'est juste pour la phase
> de développement.
> 
> [quote=Xavier Ordoquy]Donc, tu remplaces ton STATIC_ROOT par
> STATICFILES_DIRS et ça devrait marcher[/quote]
> 
> Merci pour les explications, c'est une nuance qui m'a échappée dans la
> doc. J'ai bien effectué le remplacement, puis utilisé la méthode
> collectstatic ( qui n'a récupéré que les fichiers pour admin ), et c'est
> toujours le même résultat : du 404 pour markitup et tout va bien pour
> django-admin.
> 
> La version de django utilisée est 1.4.1-1 sous debian sid, et le paquet
> django-markitup a été installé via easy_install.
> _______________________________________________
> django mailing list
> [email protected]
> http://lists.afpy.org/mailman/listinfo/django
_______________________________________________
django mailing list
[email protected]
http://lists.afpy.org/mailman/listinfo/django

Répondre à