Re: Does Django Template Support Nested Tags?

2012-05-11 Thread Wally Yu
ck some answers > here<http://stackoverflow.com/questions/4063515/django-template-question-a...> > . > > I would restructure the data being passed to the template to something like > this: > > module_tests = { >     'module1': ['TC1','TC2','TC3'], >     'module2':

Re: Does Django Template Support Nested Tags?

2012-05-10 Thread azizmb.in
AFAIK, django templates dont support what you are trying to do. You could check some answers here<http://stackoverflow.com/questions/4063515/django-template-question-accessing-a-list> . I would restructure the data being passed to the template to something like this: module

Does Django Template Support Nested Tags?

2012-05-10 Thread Wally Yu
Hi all, I'm wondering if Django template supports nested tags? Here is my situation: My Template: {% for module in modules %} Automation Test Result for Test Suite: {{ module}} {% for TC

Re: URL resolution in a Django template

2012-04-28 Thread Karen Tracey
On Sat, Apr 28, 2012 at 3:04 PM, LJ wrote: > In other words, if I have two methods with the same name, but each in > a different directory, how would Django know which method to call? By "method" here I think you are meaning "url pattern" (specifically,

URL resolution in a Django template

2012-04-28 Thread LJ
I am using ajax to update a list of participants in my html page, based on the student id selected. I am trying to figure out how Django knows what path to look to find my method. Does it just go through all of the urls.py files until it finds a method that matches the url request?

is doing text manipulations in django-template fater than doing same in views

2012-03-29 Thread vijay shanker
i have to do basic text manipulations at times .. which is a better way.. to do so in template or return a result only after doing so from views ?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: find django template developers

2012-03-21 Thread Carlos Daniel Ruvalcaba Valenzuela
There is also djangopeople.me where you can directly find people and it is free. I'm not affiliated to them in any way but I have had jobs before from people cold calling me after finding me in djangopeople. Regards, Carlos Ruvalcaba -- You received this message because you are subscribed to

Re: find django template developers

2012-03-21 Thread Sithembewena Lloyd Dube
Hi Brian, What kind of work do you want done? PM me if you like. On Tue, Mar 20, 2012 at 6:23 PM, brian <brian.down...@yakkadesign.com>wrote: > What are the resources to find django template developers? > > I've posted my project to: > https://www.elance.com > http://www.

find django template developers

2012-03-20 Thread brian
What are the resources to find django template developers? I've posted my project to: https://www.elance.com http://www.getacoder.com https://www.odesk.com https://www.freelancer.com I've read on the forums about http://djangogigs.com/ but they seem over priced and doesn't seem to have a lot

Re: Replicate admin format in django template

2012-01-12 Thread Thorsten Sanders
You need to convert the new lines to html code there are 2 templatetags for doing so: https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#linebreaks On 12.01.2012 09:54, Nikhil Verma wrote: Hi I have a column which is a TextField. When we look at django admin it appears as a box.

Replicate admin format in django template

2012-01-12 Thread Nikhil Verma
Hi I have a column which is a TextField. When we look at django admin it appears as a box. models.py add_detail = models.TextField() Let say you write the following text in that add_detail textbox in django admin :- Mission Impossible 4 Actor : Tom cruise I am displaying this add_detail in

Re: Parse a javascript file having django template variables

2011-11-25 Thread IanKRolfe
Or you can render the js file as if it was a template. Put the javascript in a template directory. In the main HTML, change the tag to something like

Re: Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
── css │ │ │ └── STO.css │ │ └── js │ │ └── renderMaps.js │ ├── tests.py │ └── views.py ├── manage.py ├── settings.py ├── templates │ └── jsonopenlayers │ └── index.html └── urls.py Static files are found, but I have the problem that inside renderMaps.js I have some Django template tag to be interpreted. How

Re: Parse a javascript file having django template variables

2011-11-25 Thread Tom Evans
── css > │ │ │ └── STO.css > │ │ └── js > │ │ └── renderMaps.js > │ ├── tests.py > │ └── views.py > ├── manage.py > ├── settings.py > ├── templates > │ └── jsonopenlayers > │ └── index.html > └── urls.py > > Static files are found, but I have the problem that i

Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
│ └── jsonopenlayers │ └── index.html └── urls.py Static files are found, but I have the problem that inside renderMaps.js I have some Django template tag to be interpreted. How can I tell Django to parse also that, in addition to my index.html? Thanks in advance. -- Alessandro Candini MEEO S.r.l

Re: Get the current url in django template

2011-11-10 Thread Sultan Imanhodjaev
Hello, Once I used request.META["PATH_INFO"] On Nov 10, 2011 10:54 PM, "Andres Reyes" wrote: > To use the request object in a template you need > django.core.context_processors.request in your TEMPLATE_CONTEXT_PROCESSORS > > > 2011/11/10 Martin Pajuste

Re: Get the current url in django template

2011-11-10 Thread Andres Reyes
To use the request object in a template you need django.core.context_processors.request in your TEMPLATE_CONTEXT_PROCESSORS 2011/11/10 Martin Pajuste > If you need something like " > http://example.com/music/bands/the_beatles/?print=true; try >

Re: Get the current url in django template

2011-11-10 Thread Martin Pajuste
If you need something like "http://example.com/music/bands/the_beatles/?print=true; try {{request.build_absolute_uri}} https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.build_absolute_uri -- You received this message because you are subscribed to the Google

Get the current url in django template

2011-11-09 Thread Asif Jamadar
I want to display the current url in django template. I tried {{request.get_full_path}} but this is not working with me. Any solution? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Problems with jquery and accessing django template system

2011-11-02 Thread Kevin Miller
n a jquery >> section. It seem like the django template system is not getting the >> variable. For example: >> >> $.each(event,function(index,value){ >>                        var url = "{% url fiesta.views.detail "+ >> event[index].pk +"  %}"

Re: Problems with jquery and accessing django template system

2011-11-02 Thread Tom Evans
n Wed, Nov 2, 2011 at 5:13 PM, Kevin Miller <kevinvani...@gmail.com> wrote: > I have a url that I need to attach to link that is in a jquery > section. It seem like the django template system is not getting the > variable. For example: > > $.each(event

Problems with jquery and accessing django template system

2011-11-02 Thread Kevin Miller
I have a url that I need to attach to link that is in a jquery section. It seem like the django template system is not getting the variable. For example: $.each(event,function(index,value){ var url = "{% url fiesta.views.detail "+ event

Re: How to display {{}} in django template!

2011-10-27 Thread Yok Keen Hui
Dear all: > >How can I display {{}} or {%%} In django template without error! > > > > > > thanks > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send

Re: How to display {{}} in django template!

2011-10-27 Thread Matías Aguirre
https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#templatetag Excerpts from 沈澄's message of 2011-10-28 00:42:23 -0200: > Dear all: >How can I display {{}} or {%%} In django template without error! > > > thanks > -- You received this m

How to display {{}} in django template!

2011-10-27 Thread 沈澄
Dear all: How can I display {{}} or {%%} In django template without error! thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this g

Re: Django template IndexError

2011-09-21 Thread Martin Tiršel
It seems, that Django handles methods and variables indexes differently. So I solved it this way: e = IndexError() e.silent_variable_failure = True raise e Martin On Wed, 21 Sep 2011 23:36:58 +0200, Martin Tiršel wrote: Hello, I have this situation: class

Django template IndexError

2011-09-21 Thread Martin Tiršel
Hello, I have this situation: class SomeClass(object): ... def __getitem__(self, key): ... raise IndexError() and now: context['somevar'] = {'one': 1, } context['anothervar'] = SomeClass() in template: {{ somevar.one }} - prints 1 {{ somevar.two }} - prints nothing,

Re: Port of Django Template Language to PHP

2011-09-16 Thread Rune Kaagaard
@Kenneth Heh, no understood what you meant, but guess I could have separated my answer better. Sorry about that! cheers Rune Kaagaard On Aug 22, 9:10 am, kenneth gonsalves wrote: > On Sun, 2011-08-21 at 16:22 +0200, Rune Kaagaard wrote: > > @Kenneth+@Masklinn: You are

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
Thanks, Reinout. I wound up creating a custom "getter" filter so I could do {{ MYDICT| get:myform.somefiled.value }} - which I'm surprised isn't a built-in, actually. But I think your suggestion is a good alternative. Tony On Aug 23, 1:40 pm, Reinout van Rees wrote: > On

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Reinout van Rees
On 23-08-11 21:16, Tony Schmidt wrote: I thought this should be the proper syntax in my template: {{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am

why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
I thought this should be the proper syntax in my template: {{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am I missing something? -- You received

Re: Port of Django Template Language to PHP

2011-08-22 Thread kenneth gonsalves
On Sun, 2011-08-21 at 16:22 +0200, Rune Kaagaard wrote: > @Kenneth+@Masklinn: You are right, there are a lot of template > languages already, but this particular wheel is - unlike twig - not a > compiled language but implemented in pure PHP as an Iterator, allowing > it to blend in as an extension

Re: Port of Django Template Language to PHP

2011-08-21 Thread Yaşar Arabacı
t; > On Sun, Aug 21, 2011 at 4:09 AM, kenneth gonsalves > <law...@thenilgiris.com> wrote: > > On Sat, 2011-08-20 at 21:28 +0200, Masklinn wrote: > >> > Those of you moonlighting in PHP, might be interested in a pure PHP > >> > port of the Django Template L

Re: Port of Django Template Language to PHP

2011-08-21 Thread Rune Kaagaard
pure PHP >> > port of the Django Template Language that I've just released. It's >> > called Chano and has doc pages at http://chano.readthedocs.org and a >> > github account at https://github.com/runekaagaard/php-chano . >> This sounds like a huge duplication of effort

Re: Port of Django Template Language to PHP

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 21:28 +0200, Masklinn wrote: > > Those of you moonlighting in PHP, might be interested in a pure PHP > > port of the Django Template Language that I've just released. It's > > called Chano and has doc pages at http://chano.readthedocs.org and a > >

Re: Port of Django Template Language to PHP

2011-08-20 Thread Masklinn
On 2011-08-20, at 20:30 , Rune Kaagaard wrote: > Dear Django Users > > Those of you moonlighting in PHP, might be interested in a pure PHP > port of the Django Template Language that I've just released. It's > called Chano and has doc pages at http://chano.readthedocs.org and a &

Re: Port of Django Template Language to PHP

2011-08-20 Thread Yaşar Arabacı
Wow, this is definitely going into my blog :) Keep up the good work! 2011/8/20 Rune Kaagaard <rumi...@gmail.com> > Dear Django Users > > Those of you moonlighting in PHP, might be interested in a pure PHP > port of the Django Template Language that I've just released. It's >

Port of Django Template Language to PHP

2011-08-20 Thread Rune Kaagaard
Dear Django Users Those of you moonlighting in PHP, might be interested in a pure PHP port of the Django Template Language that I've just released. It's called Chano and has doc pages at http://chano.readthedocs.org and a github account at https://github.com/runekaagaard/php-chano . Thanks

Re: how to use "{% url *** %}" in django template file?

2011-08-11 Thread Kelly Nicholes
You need to set the name parameter. name="card_create_card". Once you do that, reference it in the {% url %}. On Aug 7, 6:34 pm, muhdazwa wrote: > You can add name to the url in the urlpatterns: > > urlpatterns = patterns('', >    url(r'card/create$',

Re: how to use "{% url *** %}" in django template file?

2011-08-07 Thread muhdazwa
You can add name to the url in the urlpatterns: urlpatterns = patterns('', url(r'card/create$', 'card.views.create_card', name='card_create_card'), ) and call it in the template: {% url card_create_card %} On Aug 7, 1:05 pm, Jimmy wrote: > Hi, > > I got the error

Re: how to use "{% url *** %}" in django template file?

2011-08-07 Thread Subhranath Chunder
On Sun, Aug 7, 2011 at 10:35 AM, Jimmy wrote: > Hi, > > I got the error "Caught ImportError while rendering: No module named > urls" when using: > > {% url 'card.views.create_card' %} in the template file > For django 1.2 and earlier versions you should use the syntax

Re: how to use "{% url *** %}" in django template file?

2011-08-07 Thread Amao Zhao
hi, jimmy you should pass the name of your func with url in template. such as your example, in your urls.py, you update the url: url(r'card/create$', 'card.views.create_card', name = 'create_card'), and then you can use the url in your template like this : {% url create_card %} 在

how to use "{% url *** %}" in django template file?

2011-08-06 Thread Jimmy
Hi, I got the error "Caught ImportError while rendering: No module named urls" when using: {% url 'card.views.create_card' %} in the template file in the urls.py the route to the url is: urlpatterns = patterns('', url(r'card/create$', 'card.views.create_card'), ) The Django version I use

Re: How to load CSS: Django Template, CSS and image

2011-06-16 Thread Tim Shaffer
Shouldn't you really be putting your js/css in your static directory? Check out the docs for managing static files: https://docs.djangoproject.com/en/1.3/howto/static-files/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

How to load CSS: Django Template, CSS and image

2011-06-16 Thread yesnik
In this lesson I’ll show you how to make Django load your template containing CSS and image. 1. Let’s create a project ‘girl’: django-admin.py startproject girl 2. In ‘girl’ directory we create 2 new directories: - templates - media 3. Put index.html in ‘templates’ directory. --

Re: django template extends and include problem.

2011-06-13 Thread yohanes . adhi
rom: Korobase <boyee...@gmail.com> Sender: django-users@googlegroups.com Date: Mon, 13 Jun 2011 10:26:14 To: <django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Subject: django template extends and include problem. test case as below: 1.base.html {% block t1

django template extends and include problem.

2011-06-12 Thread Korobase
test case as below: 1.base.html {% block t1 %} t {% endblock %} 2.temp.html {% block t2 %} zzz {% endblock %} 3.index.html {% extends "base.html" %} {% block t1 %} kk {% include "temp.html" %} {% endblock %} 4.other.html {% extends

Re: Google motion chart problem in django template

2011-05-17 Thread Tarkeshwar Thakur
Sorry my syntax was incorrect. Change your list construction to be: *ml.append([str(m[selected_mode]),year, month, day, m['total']])* then in template [ {% for mode, year, month, day, total in ml %} '["{{ mode}}", "new Date({{ year }}, {{ month }}, {{ date }})", {{ total }}],' {% endfor %} ]

Re: Google motion chart problem in django template

2011-05-17 Thread sushanth Reddy
Hi Tarkeshwar, Thank you for the response,But here i am directly passing list to the template, Can you please help me how to extract that list into that date format. Thanks in advance sushanth -- You received this message because you are subscribed to the Google Groups "Django users"

Re: django template strange behavior

2011-04-14 Thread Jason Culverhouse
You can use the template language to test against what you think are constants, the parser is actually testing 2 "literals". The parser tests for 2 literals with names 'None' and 'False'. When parser tries to resolve these in the context a VariableDoesNotExist exception is thrown and both

django template strange behavior

2011-04-14 Thread carrier24sg
Hi guys, {% if None == False %} abc {% endif %} Strangely my template displayed abc. Any explanation? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Sam Walters
Hey Block tags dont work like that. {%if choice1 == 2 %} {% include "sometemplate.html" %} {%endif%} instead of: {%if choice1 == 2 %} {%block two%} > The temperature in {{city}} is {{temperature}} > > {%endblock two%} {% endif %} I hope that was what you were thinking...

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Russell Keith-Magee
> On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: >> Hey Mr. Django! I am trying to have different information display in >> the same block depending on a variable "choice" which is simply an >> int. The way I was planning on doing so was going to be something like >>

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Calvin Spealman
Just put the condition inside the block. On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: > Hey Mr. Django! I am trying to have different information display in > the same block depending on a variable "choice" which is simply an > int. The way I was planning on doing so

Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Ethan Yandow
Hey Mr. Django! I am trying to have different information display in the same block depending on a variable "choice" which is simply an int. The way I was planning on doing so was going to be something like the bellow code: {% extends "index.html"%} {%block head%} Welcome to Piss && ink {{user}}

Re: Script to find all non-i18n parts of a django template

2011-03-06 Thread Venkatraman S
On Mon, Mar 7, 2011 at 3:30 AM, Rory McCann <r...@technomancy.org> wrote: > Link to page: > http://www.technomancy.org/python/django-template-i18n-lint/ > Good stuff. I was planning to write one, but would rather use this ;) IF we make this stuff 'really' good (i mean, han

Script to find all non-i18n parts of a django template

2011-03-06 Thread Rory McCann
all the non-i18n bits of text that you have left to do. Link to page: http://www.technomancy.org/python/django-template-i18n-lint/ It's a bit rigid at the moment, and works for our code base. It uses regular expressions to 'parse' the HTML & Django templates, so it's not 100% perfect, there m

Re: How to format django template code nicely with notepad++?

2011-02-23 Thread Bill Freeman
On Wed, Feb 23, 2011 at 11:58 AM, Tom Evans wrote: ... > > Aargh, we're mortal enemies - I guess Eight Megs And Constantly > Swapping is no longer an insult I can use :) The last time I used a machine with fewer than 8Mb of RAM, emacs was nowhere near that big.

Re: How to format django template code nicely with notepad++?

2011-02-23 Thread Tom Evans
On Wed, Feb 23, 2011 at 4:15 PM, Bill Freeman wrote: > All good points. > > I would caution, however, that not every *nix production environment > has vim.  (Less and less true, but I still see them.) > > They will, however, have vi.  (And the ones that have vim typically have

Re: How to format django template code nicely with notepad++?

2011-02-23 Thread Bill Freeman
On Wed, Feb 23, 2011 at 4:51 AM, Tom Evans wrote: ... > It takes about a month to get up to speed with vim, about a year to > become proficient and about three years to be fully comfortable. The > longer you use vim, the faster you get using it, and the more > productive

Re: How to format django template code nicely with notepad++?

2011-02-23 Thread Tom Evans
On Tue, Feb 22, 2011 at 9:42 PM, wrote: > The ssh thing, I agree. It works like magic. I'm however compelled to > believe that the time you'd spend learning VI is enough to get you already > developing django powered apps. My case study. > It takes about a month to get up

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread delegbede
iic...@gmail.com> Sender: django-users@googlegroups.com Date: Tue, 22 Feb 2011 11:20:21 To: <django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Cc: mongoose<darrenma1...@gmail.com> Subject: Re: How to format django template code nicely with notepad++? Learning

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Daniel Roseman
On Tuesday, February 22, 2011 8:31:43 PM UTC, mongoose wrote: > > want to get vim working with omnicomplete then perhaps i'll get into > it more. > > I've added this to my vimrc file > > filetype plugin on > set ofu=syntaxcomplete#Complete > > when i try > :python print 'hello' > i get this

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Brice Leroy
om> > Reply-To: django-users@googlegroups.com > Subject: How to format django template code nicely with notepad++? > > hi all, > > I'm using notepad++ a lot and really missing a code formatter (vim > would be = to format). > Anyone know of anyway to format my html nicel

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread delegbede
06:55:21 To: Django users<django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Subject: How to format django template code nicely with notepad++? hi all, I'm using notepad++ a lot and really missing a code formatter (vim would be = to format). Anyone know of anyway to fo

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
what happens if you type: python at the Cygwin shell prompt? And what does it say if you type: which python On Tue, Feb 22, 2011 at 3:31 PM, mongoose wrote: > want to get vim working with omnicomplete then perhaps i'll get into > it more. > > I've added this to my

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
want to get vim working with omnicomplete then perhaps i'll get into it more. I've added this to my vimrc file filetype plugin on set ofu=syntaxcomplete#Complete when i try :python print 'hello' i get this error "Could not load library python26.dll The python library could not be loaded."

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
Except beware of using vi/vim to edit .py files since they are normally configured to use tabs for indentation and to assume that a tab means 4 columns, whereas python (correct in the view of a really old timer) takes them to mean 8 columns. It is possible to configure at least vim to never

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Brice Leroy
Learning VI is good for you and it makes you fast. Learning curve is steep, I agree, but the result is quite amazing. One other big advantage, you can easily work on any server through SSH. 2011/2/22 mongoose > I used vim for a while but the learning curve really is

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
I used vim for a while but the learning curve really is steep. so steep that i'm more effecient with the old style editors. perhaps i'll just do what i do in notepad++ then format it in vim. i'll keep looking around for a nice formatter though. On Feb 22, 5:20 pm, Bill Freeman

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
You *could* use Tidy, then post process with a sed script to convert the '%20's to spaces. There may be comparable Windows tool, but if you want sed, you can install Cygwin. But if you install Cygwin, you could edit with vim. Since you're editing templates, you probably have python installed.

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
And, certainly, replacing the %20 stuff is easy in python, should you be happy with Tidy plus a post processing step. There are probably even suitable functions in the http or urllib libraries that will catch more than the %20s. You could even have the python tool run Tidy for you, so that it

How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
hi all, I'm using notepad++ a lot and really missing a code formatter (vim would be = to format). Anyone know of anyway to format my html nicely? I've tried HTML Tidy but it keeps adding a 20% where I have a space for example "{{%20MEDIA_URL%20}}css/styles.css". -- You received this message

RE: Django Template CSS Load Path

2011-01-30 Thread Chris Matthews
ct: Re: Django Template CSS Load Path I still cannot get the css page to load. On Jan 19, 4:02 pm, Matías Iturburu <maturb...@gmail.com> wrote: > On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho < > > eduardocer...@gmail.com> wrote: > > You can use MEDIA_URL conf t

Re: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
Interestingly, I added TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', 'django.core.context_processors.media', ) to my settings.py and got this error. Put 'django.contrib.auth.context_processors.auth' in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use

Re: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
I still cannot get the css page to load. On Jan 19, 4:02 pm, Matías Iturburu wrote: > On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho < > > eduardocer...@gmail.com> wrote: > > You can use MEDIA_URL conf to get the root path to your media files. > > > > /> > My

Re: Django Template CSS Load Path

2011-01-19 Thread Matías Iturburu
On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho < eduardocer...@gmail.com> wrote: > You can use MEDIA_URL conf to get the root path to your media files. > > /> > > the above code is correct, just make sure that you are using the media context processor or returning a RequestContext, not

Re: Django Template CSS Load Path

2011-01-19 Thread Eduardo Cereto Carvalho
You can use MEDIA_URL conf to get the root path to your media files. On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus wrote: > I am trying to load a css file in my base.html template > > > > >{% block title %}Test{% endblock %} > > > >

Django Template CSS Load Path

2011-01-19 Thread octopusgrabbus
I am trying to load a css file in my base.html template {% block title %}Test{% endblock %} What kind of path is supposed to go in the href? Is it relative to the document root? Does anyone have an example of loading a css file including the Apache

Re: python list in django template

2010-12-21 Thread Harbhag Singh Sohal
> Please read http://www.djangobook.com/ for the basics; understanding how the > models, views and templates work. Thanks, I found the answer there. -- Harbhag Singh Sohal http://harbhag.wordpress.com -- You received this message because you are subscribed to the Google Groups "Django users"

Re: python list in django template

2010-12-21 Thread Venkatraman S
On Tue, Dec 21, 2010 at 8:25 PM, Harbhag Singh Sohal < harbhag.so...@gmail.com> wrote: > I am new to python and django. I want to know about how can I display > items of python list in browser using django template. > Suppose I have list days = ['sunday','monday','tuesday'] >

python list in django template

2010-12-21 Thread Harbhag Singh Sohal
I am new to python and django. I want to know about how can I display items of python list in browser using django template. Suppose I have list days = ['sunday','monday','tuesday'] Which variable I need to define in views.py Please tell me part of code I need to write in django template. Thanks

Re: can't add via admin, get django template error

2010-12-09 Thread JeffH
I had defined a custom admin class for that model. I commented it out and went with the default admin class, and got the same error trying to create a new record. So didn't think it was the admin. Then I looked at the date fields on that model. Turned out that specifying a default date as a

Re: can't add via admin, get django template error

2010-12-08 Thread Wayne Smith
On Wed, Dec 8, 2010 at 10:49 AM, JeffH wrote: > So I'm working along, everything's humming fine. Then I try to add a > record via the admin, and get the following: > > TemplateSyntaxError at /admin/expert/expertresponse/add/ > Caught AttributeError while rendering:

Re: Django template tags.

2010-12-08 Thread Nuño Iglesias
El Wed, 8 Dec 2010 20:00:42 +0100 Łukasz Rekucki escribió: > 2010/12/8 Nuño Iglesias : > > > > What i'm trying to do is this: > >   {{ mystring | upper }} > > to convert "mystring" into upper-case. > > AFAIR, there should be no spaces before or

Re: Django template tags.

2010-12-08 Thread Łukasz Rekucki
2010/12/8 Nuño Iglesias : > > What i'm trying to do is this: >   {{ mystring | upper }} > to convert "mystring" into upper-case. AFAIR, there should be no spaces before or after "|": {{ variable|upper }} -- Łukasz Rekucki -- You received this message because you

Django template tags.

2010-12-08 Thread Nuño Iglesias
Hi, i think it's the first time i write to this list, so Hello to everybody...¡¡ Well, now my problem. I'm trying to use "template filters" in one of my templates. What i'm trying to do is this: {{ mystring | upper }} to convert "mystring" into upper-case. but Django is complaining:

can't add via admin, get django template error

2010-12-08 Thread JeffH
So I'm working along, everything's humming fine. Then I try to add a record via the admin, and get the following: TemplateSyntaxError at /admin/expert/expertresponse/add/ Caught AttributeError while rendering: 'unicode' object has no attribute 'date' [snip] Template error In template

Re: Total in a django template

2010-11-08 Thread Gath
an use a > > forloop.counter (index to 1) or a forloop.counter0 (index at 0) from within > > the template {% for loop %} > > > Michael > > > Hi, > > In a django template I have a for loop that display (item, fine). I > > would like to compute the total f

Re: Total in a django template

2010-11-08 Thread Knut Ivar Nesheim
loop %} > > > Michael > > Hi, > In a django template I have a for loop that display (item, fine). I > would like to compute the total fine value at the end of the for loop. > Is it possible to compute the total in the template? How can I do it > > -- > You received

Re: Total in a django template

2010-11-06 Thread Michael Sprayberry
Hello,     I am not sure if this is what you are looking for but you can use a forloop.counter (index to 1) or a forloop.counter0 (index at 0) from within the template {% for loop %}     Michael Hi, In a django template I have a for loop that display (item, fine). I would like to compute

Total in a django template

2010-11-06 Thread Akn
Hi, In a django template I have a for loop that display (item, fine). I would like to compute the total fine value at the end of the for loop. Is it possible to compute the total in the template? How can I do it -- You received this message because you are subscribed to the Google Groups

Re: How to display image in django template

2010-10-27 Thread girish shabadimath
', in template, access the image as On Mon, Oct 25, 2010 at 4:12 PM, Kenneth Gonsalves <law...@au-kbc.org>wrote: > On Mon, 2010-10-25 at 03:34 -0700, d wrote: > > I have been searching for solutions whole day. > > How would I display image file in django template. I have alrea

Re: How to display image in django template

2010-10-25 Thread Kenneth Gonsalves
On Mon, 2010-10-25 at 03:34 -0700, d wrote: > I have been searching for solutions whole day. > How would I display image file in django template. I have already set > MEDIA_ROOT and MEDIA_URL. assume a model: Mymodel(models.Model): photo = models.ImageField("somename",upload

Re: How to display image in django template

2010-10-25 Thread Venkatraman S
On Mon, Oct 25, 2010 at 4:04 PM, d <ryan.z.willi...@gmail.com> wrote: > I have been searching for solutions whole day. > How would I display image file in django template. I have already set > MEDIA_ROOT and MEDIA_URL. > You mean image as in static image or from Image mode

How to display image in django template

2010-10-25 Thread d
Hi all I have been searching for solutions whole day. How would I display image file in django template. I have already set MEDIA_ROOT and MEDIA_URL. Can some one show a step by step instruction as it will help a lot of other people. Thanks! -- You received this message because you

django template “file name too long”

2010-10-21 Thread dereko
I'm very new to Python and Django so maybe someone can point me in the right direction. I have the following url.py line url(r'^$', direct_to_template, {'template':'index.html', 'extra_context':{'featured_actors': lambda: User.objects

Re: Problems displaying image objects in a Django template using a custom template tag? (coding included)

2010-10-21 Thread tricks...@googlemail.com
Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this

Re: Problems displaying image objects in a Django template using a custom template tag? (coding included)

2010-10-20 Thread werefr0g
Hello, I think you should use something like alt="{{ object.title }}" /> in your template: you want to output images' url in your template, not the "object" itself. You'll find explanations in [1] and [2]. Regards [1]

Problems displaying image objects in a Django template using a custom template tag? (coding included)

2010-10-20 Thread tricks...@googlemail.com
I have the following code that fails to display object images. But displays normal images fine. My Model class News(models.Model): title--- image = models.ImageField(upload_to='images') body Template tag coding from django import template register = template.Library() from

<    1   2   3   4   5   6   >