[Eric] Eric4 and Django: project viewer and CSS/LESS

Detlev Offenbach detlev at die-offenbachs.de
Thu Oct 27 18:17:02 BST 2011


Hello,

see below for answers.

Detlev

Am 27.10.2011 um 17:45 schrieb Leonardo Giordani:

> Hi,
> 
> two questions about Django and Eric:
> 
> 
> 1. Project viewer has 4 tabs: Sources, Forms, Translations, Others.
> For a Django project I think it could be better to have Sources
> (*.py), Templates (*.html, *.js, ...), Migrations (South), Static
> (*.css, *.js, *.less, ...)
> 
> Obviously Static should be a configurable entry, since the use of a
> "static/" directory in the Django project directory is only customary
> but not mandatory.
> 
> Can a plugin override tab names and content? If yes, do you have some
> hints for the starting point? I would like to try it and eventually
> submit a patch.
> 

This cannot be changed by plug-ins. However, relation file type (i.e. extension) to tab can be changed on a per project type basis and can be amended on a per project basis (s. file type associations in the project menu).

> 
> 2. working with Django I have to edit CSS/LESS file too. They are
> however not loaded in the Forms tab (see first question).
> 
> CSS is already supported by the environment, LESS is not. How to add it?

I don't know LESS, so I don't know which lexer fits best. The association of file extensions to lexers can be changed via the config dialog. You can try the Pygments based lexers, if the QScintilla provided ones (Pygments are selected via the 'Alternatives' entry).

> 
> 
> Thanks
> 
> Leo
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric

Detlev Offenbach
detlev at die-offenbachs.de





More information about the Eric mailing list