Re: django templates

2013-07-17 Thread Tom Evans
On Wed, Jul 17, 2013 at 3:34 PM, Harjot Mann <harjotmann1...@gmail.com> wrote: > No, this is not admin problem. I am getting the reports templates but > these are not saved anywhere, valuse are coming from database. But I > want to take the print outs i.e the hard copy of all th

Re: django templates

2013-07-17 Thread Harjot Mann
ate" (composite of your other templates) for the user to print > (or you could have an action just to generate all the lab reports for the > selected jobs - its quite flexible). No, this is not admin problem. I am getting the reports templates but these are not saved anywhere, valuse ar

Re: django templates

2013-07-17 Thread Derek
One option is to use a Django admin action - the user selects which job/jobs are needed from the usual list - and your action can then generate the data, passing this into a single "master template" (composite of your other templates) for the user to print (or you could have an a

Re: django templates

2013-07-17 Thread Daniel Oźminkowski
Mann napisał: > > In my project the lab reports, reciepts, and bills are made from html > templates but thse are not saved anywhere but now I need to take the > print outs of all the reports which are made till now for example form > job_id 30 to 400. I want to make function for this

django templates

2013-07-16 Thread Harjot Mann
In my project the lab reports, reciepts, and bills are made from html templates but thse are not saved anywhere but now I need to take the print outs of all the reports which are made till now for example form job_id 30 to 400. I want to make function for this so that it can be done in a one

How can I view in the templates the files that I stored by “models.FilePathField”?

2013-06-26 Thread Federico Erbea
I can't understand how to pass to the template a relative path rather than an absolute. Could you help me please...??! here a class of my models.py : class Brano( models.Model ): titolo = models.CharField( max_length=39 ) testo = models.TextField( max_length=1000 ) locandina =

django templates

2013-06-25 Thread Harjot Mann
I have created a table in django templates but I want that the fields which are not filled from form should not be display in table not even the border and header of that field also. The headers are static while the data is coming from database. I used if and for loop for this but whenever I

How to locate django extension templates

2013-05-21 Thread Cody Scott
to add the path to treebeard’s templates in TEMPLATE_DIRS<http://docs.djangoproject.com/en/dev/ref/settings/#template-dirs>. Also you need to enabledjango.core.context_processors.request<http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-pro

Re: How can I divide a page into multiple parts using multiple html files and django templates?

2013-04-25 Thread Nikolas Stevenson-Molnar
kolas > Stevenson-Molnar wrote: > > The include would probably help you here: > https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#include > <https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#include> > > > _Nik > > On 4/25

Re: How can I divide a page into multiple parts using multiple html files and django templates?

2013-04-25 Thread bilgehan . balban
t practice is to mix multiple views into one page, but I have no experience with django so I don't know. Bahadir On Thursday, April 25, 2013 12:22:52 PM UTC-7, Nikolas Stevenson-Molnar wrote: > > The include would probably help you here: > https://docs.djangoproject.com/en/1.5/ref/template

Re: How can I divide a page into multiple parts using multiple html files and django templates?

2013-04-25 Thread Nikolas Stevenson-Molnar
The include would probably help you here: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#include _Nik On 4/25/2013 11:56 AM, bilgehan.bal...@gmail.com wrote: > Hi, > > I want to divide a page into parts, such as sidenav.html, topnav.html > and so on such that t

How can I divide a page into multiple parts using multiple html files and django templates?

2013-04-25 Thread bilgehan . balban
Hi, I want to divide a page into parts, such as sidenav.html, topnav.html and so on such that the base.html is not cluttered with details of the complex topnav or sidebar. Problem is Django template inheritence can only have one to one parent child relationship and I cannot have multiple html

Re: x|add:-1 in templates doesn't work as I expect.

2013-04-23 Thread Marcos Borunda
for others looking for an answer, put your value between double quotes: Previous | Next El jueves, 6 de diciembre de 2007 15:44:32 UTC-6, J. Clifford Dyer escribió: > > Hello. > > I'm trying to get a template to render previous and next links on a series > of pages, as follows. > > Previous |

Re: Handling duplicate js/css in forms media with included templates

2013-04-16 Thread Carsten Reimer
pt>') {% block script %}{% endblock %} In my actual template, I include multiple templates and they are independent and reusable: {% extends "base.html" %} {% block script %} ... {% endblock script %} {% block c

Re: Handling duplicate js/css in forms media with included templates

2013-04-15 Thread Nora Olsen
ody. I am following h5bp convention: > > > window.jQuery || document.write('<script src="{{ > STATIC_URL }}js/vendor/jquery-1.9.1.min.js"><\/script>') > > > > > {% block script %}{% endblock %} > > &g

Handling duplicate js/css in forms media with included templates

2013-04-15 Thread Nora Olsen
src="{{ STATIC_URL }}js/vendor/jquery-1.9.1.min.js"><\/script>') {% block script %}{% endblock %} In my actual template, I include multiple templates and they are independent and reusable: {% extends "base.html" %} {% block script %} ...

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
I have to search again to filter only the non ascii chars in the comments. Right now I have a list of all non ascii characters. But I am considering upgrading to 1.4 before that not only for the translations. If not, or if the problem still exists by then I will search for the exact template.

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Ramiro Morales
On Tue, Mar 26, 2013 at 9:23 AM, Bastian wrote: > If I understand well, your fix is used to allow non ascii characters in the > comments of a template. I found non ascii characters outside comments too, > won't this break also? Unfortunately we don't have information

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
If I understand well, your fix is used to allow non ascii characters in the comments of a template. I found non ascii characters outside comments too, won't this break also? On Tuesday, March 26, 2013 12:19:36 PM UTC+1, Ramiro Morales wrote: > > On Tue, Mar 26, 2013 at 8:04 AM, Bastian

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
Thanks Ramiro, I don't know the actual burden of upgrading a whole project from 1.3 to 1.4 but it does sound terrifying :) I might go the patch way. On Tuesday, March 26, 2013 12:19:36 PM UTC+1, Ramiro Morales wrote: > > On Tue, Mar 26, 2013 at 8:04 AM, Bastian > wrote:

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Ramiro Morales
On Tue, Mar 26, 2013 at 8:04 AM, Bastian wrote: > Hi, I am trying to create a .po file to start a translation. I use the > command './manage.py makemessages -l ru' to try to create the Russian > locale. The script seems to be working for a while and then crashes with:

makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
ssages will crash in such a way when encountering >a non ascii character in a template, whether marked for translation or not. So I have been looking for non ascii characters in the templates of this project and indeed there are quite a lot of them. Now my question is, if it really is a probl

Re: django templates and tex/latex

2013-03-16 Thread thanos
On Thu, Mar 14, 2013 at 9:58 AM, Bill Freeman wrote: > Note that you don't have to use the Django template engine to render > things. > > For one thing, if you found a less problematic templating engine, using it > as > well doesn't prevent you from using Django's template

Re: django templates and tex/latex

2013-03-14 Thread Bill Freeman
Note that you don't have to use the Django template engine to render things. For one thing, if you found a less problematic templating engine, using it as well doesn't prevent you from using Django's template engine for other pages. You could also roll your own by coming up with, for example, a

Re: django templates and tex/latex

2013-03-13 Thread Ken
Actually, that's exactly what I'm trying to do. I have database tables whose columns contain TeX fragments. I am trying to generate various file outputs from database searches - TeX, pdf, etc. I could construct the tex file on the fly with python strings as you suggest but that's rather

Re: django templates and tex/latex

2013-03-13 Thread Drew Ferguson
On Wed, 13 Mar 2013 07:01:45 -0700 (PDT) Ken wrote: > I would like to write a tex/latex file with django tags in it. Load it > with the template loader and render it with a context. The problem is > that my tex/latex file has quite a few '{%' in them. They are > conventional

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
gt; >> Thanks >> > > Nope. Well, of course, you can fork and change Django itself, but > there be many edge cases where > Damn: … but there may be many edge cases where simply changing the tokens where they are defined (django/templates/base.py) may not work correctly.

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
to do this without changing Django, you would need to replace all of TeX's curly braces - in fact, any of these strings '{%', '%}', '{{', '}}', '{', '}', '{#' and '#}' - with "{% templatetag 'openblock' %}". https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#templatetag

django templates and tex/latex

2013-03-13 Thread Ken
I would like to write a tex/latex file with django tags in it. Load it with the template loader and render it with a context. The problem is that my tex/latex file has quite a few '{%' in them. They are conventional in TeX for writing readable macros and are used to escape the newline. I

Re: django templates - iterate over several lists

2013-03-08 Thread Roberto López López
r prefer the first option. view functions are > supposed to gather and organize all the info and templates should have > as little behaviour as possible. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

Re: django templates - iterate over several lists

2013-03-08 Thread Javier Guerra Giraldez
e lazily, so there's _very_ little overhead. - add them in the template. the 'add' filter is supposed to work with lists too. needless to say, i'd far prefer the first option. view functions are supposed to gather and organize all the info and templates should have as little behaviour as possible.

django templates - iterate over several lists

2013-03-08 Thread Roberto López López
Hi, How can I iterate over several list objects available in my template? I'd like to avoid having to concatenate them in the view and pass that as another parameter. I mean something like this: {% for x in list1, list2, list3... listN %} {% if not forloop.first %}, {% endif %}write

Re: Templates: best way to access object attributes described in a external list.

2013-03-05 Thread Serge G. Spaolonzi
On Mon, Mar 4, 2013 at 12:01 PM, Bill Freeman wrote: > Are you saying that you need control over which of an item's attributes > are shown and which are not and/or the order in which attributes are shown, > or are you saying that the way python/django converts the attributes

Re: Templates: best way to access object attributes described in a external list.

2013-03-04 Thread Bill Freeman
ems %} >> {% for field in item_display_field %} >> {{ item | getattribute:field }} >> {% endfor %} >> >> {% endfor %} > > > 2) Faster but less DRY is to keep the view factory but specify different > templates according the class, I will ha

Templates: best way to access object attributes described in a external list.

2013-03-03 Thread Serge G. Spaolonzi
: is a custom filter {% for item in items %} > {% for field in item_display_field %} > {{ item | getattribute:field }} > {% endfor %} > > {% endfor %} 2) Faster but less DRY is to keep the view factory but specify different templates according the class, I will

Re: comment templates

2013-02-21 Thread Pankaj Singh
> > so this means enabling the comment app will not render comments > anywhere and developer needs to manually choose to include it in page > templates Yes. Sincerely, Pankaj Singh http://about.me/psjinx On Thu, Feb 21, 2013 at 3:38 PM, yakoub abaya <yakoub.ab...@gmail.com>

Re: comment templates

2013-02-21 Thread yakoub abaya
thank you, so this means enabling the comment app will not render comments anywhere and developer needs to manually choose to include it in page templates On Thursday, February 21, 2013 11:54:34 AM UTC+2, psjinx wrote: > > Hey, > > From Django Docs ( > https://docs.djangoproject

Re: comment templates

2013-02-21 Thread Pankaj Singh
21, 2013 at 3:22 PM, yakoub abaya <yakoub.ab...@gmail.com>wrote: > can someone please explain where and how this template : > django/contrib/comments/templates/comments/list.html > gets rendered into the main page html template ? > > -- > You received this message because

comment templates

2013-02-21 Thread yakoub abaya
can someone please explain where and how this template : django/contrib/comments/templates/comments/list.html gets rendered into the main page html template ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Avnesh Shakya <avnesh.n...@gmail.com>wrote: > >> hi, i m adding my views.py file >> >> >> >> On Tue, Feb 19, 2013 at 5:44 PM, Pankaj Singh <ps.j...@gmail.com> wrote: >> >>> Hey, >>> >>> Every things worked for me when I used your

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
5:44 PM, Pankaj Singh <ps.j...@gmail.com> wrote: > >> Hey, >> >> Every things worked for me when I used your original templates and >> following urls.py. >> >> As you can notice, I have used generic view as I did not have original >> view func

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
hi, i m adding my views.py file On Tue, Feb 19, 2013 at 5:44 PM, Pankaj Singh <ps.j...@gmail.com> wrote: > Hey, > > Every things worked for me when I used your original templates and > following urls.py. > > As you can notice, I have used generic view as I did not have

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Hey, Every things worked for me when I used your original templates and following urls.py. As you can notice, I have used generic view as I did not have original view function. Please share views.py because it's hard to help help without that. FYI, you can test reverse match by using

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
ya i have done it but error has occured again.. On Tue, Feb 19, 2013 at 5:04 PM, Pankaj Singh <ps.j...@gmail.com> wrote: > Hey, > > I asked you to make changes in templates (i.e. home.html, about.html etc.) > and not urls.py. > > > Sincerely, > Pankaj Singh > ht

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Hey, I asked you to make changes in templates (i.e. home.html, about.html etc.) and not urls.py. Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 4:56 PM, Avnesh Shakya <avnesh.n...@gmail.com>wrote: > hi pankaj, i have got again error same.. >

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
url(r'^$','archive',name="archive"), ) then it's not generating error but that links are not opening. thanks On Tue, Feb 19, 2013 at 4:28 PM, Pankaj Singh <ps.j...@gmail.com> wrote: > Hey Avnesh, > > In your templates you have written following lines > > homeabout href=

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Hey Avnesh, In your templates you have written following lines homeaboutarchivecontact Change them to following, notice single quotes surrounding url pattern name homeaboutarchivecontact Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 4:06 PM, Avnesh Shakya

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
On Tue, Feb 19, 2013 at 3:47 PM, Avnesh Shakya wrote: > ya i have completed and i m just doing copy n paste from from tutorial but > there is no error but i m facing this error again n again... > https://www.udemy.com/full-django-tutorial/#lecture/63701/question/9902 > can

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
ya i have completed and i m just doing copy n paste from from tutorial but there is no error but i m facing this error again n again... https://www.udemy.com/full-django-tutorial/#lecture/63701/question/9902 can i add my page for help. i need your help plz.. On Tue, Feb 19, 2013 at 3:39 PM,

Re: error in templates...

2013-02-19 Thread Thomas Weholt
It means you haven't added any url matching / in your urlconfig, but it's hard to give a good answer without a bit more information. Have you completed the django tutorial which explains how these things work? Thomas On Tue, Feb 19, 2013 at 11:04 AM, Avnesh Shakya wrote:

error in templates...

2013-02-19 Thread Avnesh Shakya
Hello, I'm stuck in teplagte page. error is occuring here after runserver..error.. NoReverseMatch at / Reverse for '' with arguments '()' and keyword arguments '{}' not found. I can't figure out why I'm getting the error, plz tell me, i have totally confused here. thanks avnesh

Re: Templates error on partial rendering

2013-02-18 Thread Pankaj Singh
Hey Andrea, Please have a look at http://stackoverflow.com/questions/4300442/show-undefined-variable-errors-in-templates Put this in your debug settings: class InvalidString(str): def __mod__(self, other): from django.template.base import TemplateSyntaxError raise

error in my templates

2013-02-18 Thread Avnesh Shakya
NoReverseMatch at / *Reverse for 'myapp_about' with arguments '()' and keyword arguments '{}' not found. i m adding here files, plz help me.. thanks in advance * -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Templates error on partial rendering

2013-02-18 Thread andrea crotti
I have a case where we use django templates, but it really makes no sense to render the templates if a value is not passed in the contentx, and it should just fail.. I don't find anywhere how to force that though, I understand the default of failing silently but there should be a way also

Re: Bootstrap does not format my templates..

2013-02-15 Thread Ryan Nowakowski
On Thu, Feb 14, 2013 at 06:41:24PM -0800, galva...@hotmail.com wrote: > Hi Guys > > I am learning Django and trying to use Bootstrap, I already download > bootstrap and put it under 'D:\django14\projects\nomina\nom_mex\static', I > have Django 1.4 and use the developer server "runserver".

Bootstrap does not format my templates..

2013-02-14 Thread galvanjg
...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. {% extends "D:/django14/projects/nomina/nom_mex/templates/nom_mex/base.h

Re: 2 projects, 2 apps, bad templates ...

2013-01-25 Thread Micky Hulse
On Thu, Jan 24, 2013 at 7:38 PM, Tomas Neme wrote: > just to clarify: > Whoa, that really helps clarify the setup!!! Very helpful! Thank you Tomas!!! Until we can convert to virtual envs, your suggested solution(s) and fixes should make me sleep easier at night. Have an

Re: 2 projects, 2 apps, bad templates ...

2013-01-25 Thread Micky Hulse
ultiple projects, so we've never run into this problem before. > Now for the templates. If you're making a reusable app and providing > templates with it, you should do your best to make the templates > reusable as well. The standard procedure is to have them under an > directory like this: &g

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
just to clarify: somewhere else, not a subdir of any of your projects/ | ---FOOAPP/ | ---templates/ | ---fooapp/ | --mytemplate.html projectA/ | --settings.py | --urls.py | --templates

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
m under any single project's directory, but rather somewhere outside them, because otherwise you'll end up with modules that can be reached from two different paths (FOOAPP and ProjectA.FOOAPP) and that's bad. Doing that will probably end you up with the templates problem in BOTH projects, but at

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Micky Hulse
Hi Tomas! Thank you for your reply, I really appreciate it. :) On Thu, Jan 24, 2013 at 6:12 PM, Tomas Neme wrote: > Use virtualenvs. That's basic for any serious python development > you'll want to do. Totally agree. Setting up virtualenv's are our long term goal. >

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
eeded it > on DjangoProjectB; I installed FOOAPP using PIP from GitHub: > > $ sudo pip install -e git+https://github.com/user/FOOAPP.git#egg=FOOAPP > > ... which put it in a "src" folder at the root level of the > DjangoProjectB project directory. > > 3. Dja

2 projects, 2 apps, bad templates ...

2013-01-24 Thread Micky Hulse
ot; folder at the root level of the DjangoProjectB project directory. 3. DjangoProjectB's FOOAPP now works great. 4. DjangoProjectA's FOOAPP templates all broke. >From what we could tell, FOOAPP from DjangoProjectA was looking at the template folder from DjangoProjectB. We fixed the problem

Re: Templates not found

2012-12-18 Thread Sithembewena Lloyd Dube
ut >>> >> importing track.view.home >>> >> >>> >> 2012/12/11 Sithembewena Lloyd Dube <zeb...@gmail.com>: >>> >>> >> > >>> >> > >>> >> > On Tue, Dec 11, 2012 at 4:36 AM, Sithe

Templates caching context when it shouldn't

2012-12-18 Thread John Tipton
I've got the following function that I include in my views to set context variables: http://dpaste.org/FIZnG/. Occasionally my templates start caching these variables, no matter what model my views are based on. I do not have any caching enabled as far as I know, and the console prints

Re: Templates not found

2012-12-12 Thread donarb
gt;> importing track.view.home >> >> >> >> 2012/12/11 Sithembewena Lloyd Dube <zeb...@gmail.com >: >> >> > >> >> > >> >> > On Tue, Dec 11, 2012 at 4:36 AM, Sithembewena Lloyd Dube >> >> > <zeb...@gmai

Re: Templates not found

2012-12-12 Thread Sergiy Khohlov
gt;> importing track.view.home >> >> >> >> 2012/12/11 Sithembewena Lloyd Dube <zebr...@gmail.com>: >> >> > >> >> > >> >> > On Tue, Dec 11, 2012 at 4:36 AM, Sithembewena Lloyd Dube >> >> > <ze

Re: Templates not found

2012-12-11 Thread Sergiy Khohlov
> > >> > On Tue, Dec 11, 2012 at 4:36 AM, Sithembewena Lloyd Dube >> > <zebr...@gmail.com> >> > wrote: >> >> >> >> Hi all, >> >> >> >> I have a Django project running Django 1.4.1. (just upgraded). My >> >

Re: Templates not found

2012-12-11 Thread Sergiy Khohlov
gt;> >> I have a Django project running Django 1.4.1. (just upgraded). My >> TEMPLATE_DIRS entry is: >> >> '/home/mymachine/Code/myproject/templates', >> >> >> and that is exactly where the index template of the new project is even >> when i use Fir

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-14 Thread Juan Pablo Tamayo
Thank you all. I have fix my issue icons sorteddict from the Python collections. Juan Pablo Tamayo H Sent from my Android phone On Nov 14, 2012 11:38 AM, "Bill Freeman" wrote: > > > On Tue, Nov 13, 2012 at 11:40 PM, Juan Pablo Tamayo wrote: > >> Let me

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-14 Thread Bill Freeman
On Tue, Nov 13, 2012 at 11:40 PM, Juan Pablo Tamayo wrote: > Let me explain, I have a nested dictionary like: > > agenda = {'3': {'2012-11-11': , '2012-11-14': , ...}, > '7': {'2012-11-9': , }, > '2': {'2012-10-28': }, > } > > And I want to access it by specifying the

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-13 Thread Lachlan Musicman
I used the SortedDict datastructure :) https://docs.djangoproject.com/en/dev/ref/utils or /path/django-docs/ref/utils.html#django.utils.datastructures.SortedDict On Wed, Nov 14, 2012 at 4:40 PM, Juan Pablo Tamayo wrote: > Let me explain, I have a nested dictionary like: > >

Whats the point of having dicts in templates if one cannot access them by key?

2012-11-13 Thread Juan Pablo Tamayo
Let me explain, I have a nested dictionary like: agenda = {'3': {'2012-11-11': , '2012-11-14': , ...}, '7': {'2012-11-9': , }, '2': {'2012-10-28': }, } And I want to access it by specifying the two keys. I've red that i must access the dict like (where attribute is an attribute of : {%

c9.io and django admin - the quest for missing templates

2012-10-09 Thread Matteo Suppo
the django.contrib.admin app to the settings file. I investigated and discovered that while in my computer the templates for the admin were in the same directory as the python files venv/lib/python2.7/site-packages/django/contrib/admin/templates/ on c9.io they were in /data/share/django/contrib/admin

markup doesn't render mardown text in the templates

2012-09-22 Thread Giorgos Tsiapaliokas
Hello, I am new to django and I am writing a simple blog application. For my app I am using markdown in order to write the texts. The issue is that the markdown plugin doesn't render my text files. I have attached my views.py and my template file Regards, Giorgos -- You received this message

Re: Extending templates

2012-09-19 Thread Tom Evans
On Tue, Sep 18, 2012 at 12:12 PM, Satinderpal Singh wrote: >> With template 'inheritance', when you extend another template, what >> happens is that the named blocks in the parent template are replaced >> with the equivalently named blocks in the derived template. >>

Re: Extending templates

2012-09-18 Thread Satinderpal Singh
On Tue, Sep 18, 2012 at 3:45 PM, Tom Evans wrote: > On Mon, Sep 17, 2012 at 8:14 AM, Satinderpal Singh > wrote: >> I want to extend a template file into the other file. I get fine >> results when done simply but whenever I use the template

Re: Extending templates

2012-09-18 Thread Satinderpal Singh
> With template 'inheritance', when you extend another template, what > happens is that the named blocks in the parent template are replaced > with the equivalently named blocks in the derived template. > > This means that in the derived template, everything outside of a named > block is ignored.

Re: Extending templates

2012-09-18 Thread Tom Evans
On Mon, Sep 17, 2012 at 8:14 AM, Satinderpal Singh wrote: > I want to extend a template file into the other file. I get fine > results when done simply but whenever I use the template containing > 'for' tag into the other, it does not show any results. > My code for

Re: Extending templates

2012-09-18 Thread Tom Evans
On Mon, Sep 17, 2012 at 5:58 PM, Satinderpal Singh wrote: > On Mon, Sep 17, 2012 at 7:31 PM, jondykeman wrote: >> Can you put the code of the template you are extending this one with? > Here is the file that is extending: > > {% extends

Re: Extending templates

2012-09-17 Thread Satinderpal Singh
On Tue, Sep 18, 2012 at 9:45 AM, jondykeman wrote: > So the header for loop is the one that is not working? Yes, you are right. > Is organisation being fed to the view properly? Yes, it fed properly, as i checked it by making a template for the organisation view, it

Re: Extending templates

2012-09-17 Thread jondykeman
So the header for loop is the one that is not working? Is organisation being fed to the view properly? If you put in {{ organisation }} in the section that is rendering properly is it showing up as you expect? JD On Monday, September 17, 2012 10:59:16 AM UTC-6, Satinder Goraya wrote: > > On

Re: Extending templates

2012-09-17 Thread Satinderpal Singh
On Mon, Sep 17, 2012 at 7:31 PM, jondykeman wrote: > Can you put the code of the template you are extending this one with? Here is the file that is extending: {% extends "report/report_header.html" %} {% load i18n %} {% block content %} Date of

Re: Extending templates

2012-09-17 Thread jondykeman
Can you put the code of the template you are extending this one with? What I would guess from what you said is that you might be using {% block head %} {% endblock %} in the other template that extends this one. In that case you would override that for loop. If you want to add to the head and

Extending templates

2012-09-17 Thread Satinderpal Singh
I want to extend a template file into the other file. I get fine results when done simply but whenever I use the template containing 'for' tag into the other, it does not show any results. My code for template which is to be extended is here : #template file to be extended into the other {%

Re: Use STATIC_URL in templates

2012-09-12 Thread Chao Chen
cheros = [] > for direc in directorios: > url_ficheros = url+direc > lista_ficheros.extend(os.listdir(url_ficheros)) > > r = random.choice(lista_ficheros) > > > > And it do exactly what I want, get a pic at random from a few folders. > > Ok, I have a few templat

Use STATIC_URL in templates

2012-09-12 Thread Axel Aguilar
. Ok, I have a few templates, and all of them inherit from base.html, and in base.html I want to add this random pics... I think the script goes in the view.py, but I don't know how it can be since no view goes directly (and at same time all indirectly) they end in base.html... I tried to put

Re: Django + FAPWS doesnt show the templates/view correct

2012-09-04 Thread keeran
Finally, I understood the solution is from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns += staticfiles_urlpatterns() Thanks, keeran On Friday, August 17, 2012 3:13:00 PM UTC+5:30, keeran wrote: > On the Django development server, django app works fine. But

Re: coding urls in templates

2012-08-31 Thread Michael Thon
urls and then call the url template tag in the templates with the > url name as follows, this way you will not break any urls in your template if > you simply move your app to a new location. > > Example: > > #zetawrite account urls > > urlpatterns += patterns('zetawrite.vie

Re: coding urls in templates

2012-08-31 Thread Amyth Arora
Hey Mike, I think i understand what you are trying to achieve now. You can basically name your urls and then call the url template tag in the templates with the url name as follows, this way you will not break any urls in your template if you simply move your app to a new location. Example

Re: coding urls in templates

2012-08-31 Thread Michael Thon
e. Thanks. > > On Fri, Aug 31, 2012 at 11:00 AM, Mike <mike.t...@gmail.com> wrote: > Quick question: I changed my urls.py so I can run my project in a > subdirectory and I broke all the urls in my templates. Should I be using {% > url path.to.some_view v1 v2 %} in all my te

Re: coding urls in templates

2012-08-30 Thread Amyth Arora
could you post the directory structure and your urls.py file. Thanks. On Fri, Aug 31, 2012 at 11:00 AM, Mike <mike.t...@gmail.com> wrote: > Quick question: I changed my urls.py so I can run my project in a > subdirectory and I broke all the urls in my templates. Should I be us

coding urls in templates

2012-08-30 Thread Mike
Quick question: I changed my urls.py so I can run my project in a subdirectory and I broke all the urls in my templates. Should I be using {% url path.to.some_view v1 v2 %} in all my templates instead of hard coding the path? -- You received this message because you are subscribed

Re: django makemessages doesn't recognize trans in templates

2012-08-24 Thread Jojo
thank you guys! very helpful! Il giorno lunedì 20 agosto 2012 12:43:20 UTC-5, Nick Apostolakis ha scritto: > > > > On Mon, Aug 20, 2012 at 8:18 PM, Jojo > wrote: > >> what is the meaning of the fuzzy mark? >> >> > fuzzy is some kind of auto translated field. > it may be

Re: Django + FAPWS doesnt show the templates/view correct

2012-08-22 Thread keeran
I did following changes now., I still see the same observation - I suspect the img folder contents are not taken by webserver for some reason related to template tags not properly linked. any suggestion welcome (otherwise I think i need to go with apache + wsgi) Am referring this link: *

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Nick Apostolakis
On Mon, Aug 20, 2012 at 8:18 PM, Jojo wrote: > what is the meaning of the fuzzy mark? > > fuzzy is some kind of auto translated field. it may be correct or not. when you are sure that the translation is correct, you remove the fuzzy annotation and then the translation

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Jojo
what is the meaning of the fuzzy mark? Il giorno venerdì 17 agosto 2012 23:11:25 UTC+2, Tomas Neme ha scritto: > > > For example for this link > > > > {% trans "contacts" > %} > > > > I have the msgstr="Contactos". I expect to see "Contactos" in the > browser, > > but I still see

Re: Django + FAPWS doesnt show the templates/view correct

2012-08-18 Thread Amyth Arora
Your Static Dir is not defined in the Server (Nginx) configuration. So as Melvin said you'll need to create an alias for your static dir in your server configuration file. On Sat, Aug 18, 2012 at 7:40 PM, Melvyn Sopacua wrote: > On 17-8-2012 11:43, keeran wrote: >> >> >>

Re: Django + FAPWS doesnt show the templates/view correct

2012-08-18 Thread Melvyn Sopacua
On 17-8-2012 11:43, keeran wrote: > > > On the Django development server, django app works fine. But once I setup > the production test run, I get only the text contents, where template views > are not shown as intended. What am I going wrong? > > I have django 1.5 latest. > > Nginx -

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Tomas Neme
> For example for this link > > {% trans "contacts" %} > > I have the msgstr="Contactos". I expect to see "Contactos" in the browser, > but I still see "contacts". Any suggestion? 1) case-sensitive. Are you sure you haven't translated "Contacts" instead of "contacts"? 2) fuzzy-mark. I've noticed

<    1   2   3   4   5   6   7   8   9   10   >