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':
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
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
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,
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?
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
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
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.
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
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.
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
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
── 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
── 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
│ └── 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
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
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
>
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
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
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 +" %}"
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
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
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
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
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
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
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,
@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
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
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
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
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
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
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
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
> >
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
&
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
>
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
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$',
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
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
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 %}
在
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
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
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.
--
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
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
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 %}
]
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"
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
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
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...
> 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
>>
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
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}}
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
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
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.
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
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
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
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
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
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
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
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
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."
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
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
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
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.
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
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
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
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
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
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
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 %}
>
>
>
>
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
> 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"
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']
>
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
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
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:
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
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
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:
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
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
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
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
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
',
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
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
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
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
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
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
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]
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
301 - 400 of 585 matches
Mail list logo