Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:geany_and_django [2012/06/12 18:19] – add some hints about using Geany for Django enrico | howtos:geany_and_django [2014/02/02 10:49] (current) – Add an example for fne tuned styling enrico | ||
---|---|---|---|
Line 21: | Line 21: | ||
http:// | http:// | ||
- | <code ini> | + | <file ini ~/ |
[lexer_properties] | [lexer_properties] | ||
lexer.html.django=1 | lexer.html.django=1 | ||
- | </code> | + | </file> |
More information about this file, its format and the path, e.g. on Windows, | More information about this file, its format and the path, e.g. on Windows, | ||
can be found in detail in the [[http:// | can be found in detail in the [[http:// | ||
|Geany manual, section Configuration Files]]. | |Geany manual, section Configuration Files]]. | ||
+ | |||
+ | ==== Fine-tune styling ==== | ||
+ | |||
+ | You can adjust the styling to some extend using the following settings which should be placed in the [styling] section of filetypes.html: | ||
+ | |||
+ | * html_asp | ||
+ | * python_identifier | ||
+ | * python_default | ||
+ | |||
+ | |||
+ | Explanation: | ||
+ | |||
+ | <code html>{% load pages_tags i18n %}</ | ||
+ | |||
+ | '' | ||
+ | will be styled with // | ||
+ | // | ||
+ | |||
+ | Example: | ||
+ | |||
+ | <file ini ~/ | ||
+ | [styling] | ||
+ | # foreground; | ||
+ | html_asp=# | ||
+ | python_identifier=keyword_1, | ||
+ | python_default=default | ||
+ | </ | ||
+ | |||
+ | The example above makes '' | ||
+ | |||
+ | |||
+ | For more information about configuring styles, please check the manual [[http:// | ||
Line 78: | Line 110: | ||
|Geany manual, section Snippets]]. | |Geany manual, section Snippets]]. | ||
+ | ===== Tags ===== | ||
+ | Tags for django (version 1.4.1) can be found [[http:// | ||
+ | |||
+ | ===== Live Preview in Geany ===== | ||
+ | |||
+ | Using the great //Web helper// plugin (from the [[http:// | ||
+ | you can view and test your site directly in Geany without switching to an external browser. | ||
+ | |||
+ | Simply enable the //Web helper// plugin in Geany' | ||
+ | and enable the option " | ||
+ | |||
+ | Then you will get a new tab "Web preview" | ||
+ | to show up) and you can enter any weg page address, e.g. those of your currently edited Django project. | ||
+ | Below is a screenshot demonstrating the plugin: the opened web page on the left, the template code on the right | ||
+ | and in the terminal window at the bottom, Django' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | This way you can edit your Django and template code in Geany as usual and have it automatically shown | ||
+ | as web page in the //Web helper// plugin without the need of switching to an external browser, and | ||
+ | the Django debug server can also be ran in Geany, using the embedded terminal. | ||
+ | |||
+ | |||
+ | ===== Twig/ | ||
- | {{tag> | + | If you want to add detection/ |
+ | {{tag> |