I'm not sure about your case
http://jquery.malsup.com/form/
and event "success",
take a look on http://jquery.malsup.com/form/#ajaxSubmit.
> Does anyone know how to track if a download completed?
>
> On May 6, 9:52 pm, CrabbyPete wrote:
>> I have code that generates a file for download. I want t
On May 12, 5:36 am, ravi krishna wrote:
> Hi,
> Thanks for ur reply. I was asking about the ImageField. tried out the
> tutorials, but its not working out. Where
> all(views,models,urls.py,settings.py) should we make editings inorder to
> work. Please help me
If you really want someone to help yo
Specifically what do you want to do?
1. Write a form to upload and display an image?
2. Dynamically display/generate an image? eg:
http://effbot.org/zone/django-pil.htm
3. hyperlink an image from a templates folder or media folder? (with
either django test server or a production server)
On Tue,
hello all!
I have similar problem:
assume books-tabls, in manyToMany relation with tags-table through
bookTagMatch-table
I am looking for a way to do this through the admin filter:
subclass relatedFilter to interpret the url: /?bookTag=7&bookTag=3
and returns book tuples that are tagged under clas
Just as a side note, I made the user part of my Profile model a
OneToOneField. Makes it easier to reference, i.e. user.profile.FIELD
vs. user.get_profile().field
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
jararaca wrote:
>
>
> Thanks Russ, I don't have a stray settings-file but I've spotted the
> problem now: One of my files with custom SQL for the models contained
> the line USE xy; (with xy being my database, argh!). So everything
> before the execution of this line used my test database corr
Sorry for the confusing title. Here is a simple example to illustrate
my question:
class Item(models.Model):
name = models.CharField()
class Manager(models.Model):
item = models.ForeignKey(Item)
On a POST I have the PK of the Item I want to link to a new instance
of the Manager object.
Help:
Chapter 4: The Django Template System
http://www.djangobook.com/en/1.0/chapter04/
This example includes the contents of the template whose name is
contained in the variable template_name:
{% include template_name %}
All i'm trying to do is dynamically include an html template file:
This
On Wed, May 12, 2010 at 4:10 PM, Brian wrote:
> Help:
>
> Chapter 4: The Django Template System
> http://www.djangobook.com/en/1.0/chapter04/
>
> This example includes the contents of the template whose name is
> contained in the variable template_name:
> {% include template_name %}
>
>
> All i'm
On May 12, 4:04 pm, Nick Serra wrote:
> Sorry for the confusing title. Here is a simple example to illustrate
> my question:
>
> class Item(models.Model):
> name = models.CharField()
>
> class Manager(models.Model):
> item = models.ForeignKey(Item)
>
> On a POST I have the PK of the Item I
On May 11, 3:16 pm, HARRY POTTRER wrote:
> I have a project that I'm working on that works like this:
>
> the user enters some points on a map which are then stored in a
> database as a LineString object (via geodjango). Along with the
> geographic data, the user is given a survey to fill out con
Help:
Chapter 4: The Django Template System
http://www.djangobook.com/en/1.0/chapter04/
This example includes the contents of the template whose name is
contained in the variable template_name:
{% include template_name %}
All i'm trying to do is dynamically include a html template file
This wo
Tom, I'm sorry
I am using include and it's not working:
Dynamically content in include statement not working:
This works just fine:
{% include "FooterMessage.htm" %}
This will NOT work for me:
{% include "{{inpage.footer}}" %}
(I know that inpage.footer == "FooterMessage.htm")
On May 12, 11
Thanks for the response. I actually will already have the PK, and am
trying to avoid grabbing an instance of the actual item object.
On May 12, 11:26 am, Daniel Roseman wrote:
> On May 12, 4:04 pm, Nick Serra wrote:
>
>
>
>
>
> > Sorry for the confusing title. Here is a simple example to illustr
On Wed, May 12, 2010 at 4:31 PM, Brian wrote:
> Tom, I'm sorry
> I am using include and it's not working:
> Dynamically content in include statement not working:
>
> This works just fine:
> {% include "FooterMessage.htm" %}
>
>
> This will NOT work for me:
> {% include "{{inpage.footer}}" %}
>
> (
Hello, I need to extend the Django User model in this way: I have an
Entity model an I want to define a relationship one-2-one from User to
Entity (so a Django User can be an Entity, but an Entity can be
something else).
So what's the best way to extend the User model for this particular
case??
> something like that maybe works:
>
> class MyUser(models.Model):
> user = models.ForeignKey(User, unique=True)
> entity = models.ForeignKey(Entity, unique=True)
>
>
Sorry, this is my current proposal (but I really don't know if there
is some difference with the previous one):
c
Tom
Thank you, Thanks you, Thank you.
{% include inpage.footer %} works just fine. The {{}} is unnecessary
as I had it.
Sometime the brain is not working.
Thanks again.
On May 12, 11:36 am, Tom Evans wrote:
> On Wed, May 12, 2010 at 4:31 PM, Brian wrote:
> > Tom, I'm sorry
> > I am using incl
On May 12, 4:34 pm, Nick Serra wrote:
> Thanks for the response. I actually will already have the PK, and am
> trying to avoid grabbing an instance of the actual item object.
Yes, that's what I meant. You can assign the foreign key directly when
instantiating an object, without having to get the
Exactly what I was looking for, thanks!
On May 12, 11:50 am, Daniel Roseman wrote:
> On May 12, 4:34 pm, Nick Serra wrote:
>
> > Thanks for the response. I actually will already have the PK, and am
> > trying to avoid grabbing an instance of the actual item object.
>
> Yes, that's what I meant.
> Hi jararaca
> Can u brief me the solution.Even i am not able to access test
> database ,some how it fetch production database itself
Hear galloping, think horses not zebras.
are y'all running your test batch like this?
python manage.py test --settings=test_settings.py
does tes
I am using a custom template tag called calculate age to produce an
age in numbers based on a filter for a template tag.
Here is the tag:
def age(bday, d=None):
if d is None:
d = datetime.datetime.now()
return (d.year - bday.year) - int((d.month, d.day) < (bday.month,
bday.day))
Hi,
I think the simple
{% if entry.DOB %} {{ entry.DOB|age }}{% else %} N/A {% endif %}
should work. Or, the other way around:
{% if not entry.DOB %} ...
You could also try testing in your filter:
def age(bday, d=None):
if bday is None:
return None
and use the default_if_no
On Wed, May 12, 2010 at 1:06 PM, Nick wrote:
> I am using a custom template tag called calculate age to produce an
> age in numbers based on a filter for a template tag.
>
> Here is the tag:
>
> def age(bday, d=None):
>if d is None:
>d = datetime.datetime.now()
>return (d.year - b
Hello,
I'm trying to do something that seemed simple, but can't get to work:
displaying comments using Django (1.2 RC)'s Comment framework inside a
loop.
{% for entry in entries %}
{% get_comment_list for entry as comments %}
{% render_comment_form for entry %}
{% endfor %}
but
I have a variable amount of lines that need to be displayed in a
block:
header
{% if var1 %}{{ ... }}{% endif %}
{% if var2 %}{{ ... }}{% endif %}
{% if var3 %}{{ ... }}{% endif %}
footer
However, if some of the if-statements are not evaluated to be true
then the line breaks are stil
If you want to keep the newlines in your template, you can use
http://docs.djangoproject.com/en/1.1/ref/templates/builtins/#spaceless
Peter
On 5/12/10 2:02 PM, "Noah Watkins" wrote:
> I have a variable amount of lines that need to be displayed in a
> block:
>
>
> header
> {% if var1 %}{
Well, I am embarrassed to admin that this issue was 100% user error.
I recently set up a dev and production server and copied everything
from the old production server to the two new servers.
I was testing the search results page on dev, that's the page that
generates the links to the pages that
On Wed, May 12, 2010 at 1:52 PM, Yanik wrote:
> Hello,
>
> I'm trying to do something that seemed simple, but can't get to work:
> displaying comments using Django (1.2 RC)'s Comment framework inside a
> loop.
>
>
> {% for entry in entries %}
>{% get_comment_list for entry as comments %}
Hello,
Just wondering if there are alternatives to the feedjack RSS
aggregator that anyone has used. It doesn't have to be "Django-ized"
like feedjack is.
Just any Python library that you've had good luck with, parsing a lot
of different RSS feeds. I know there are examples of using Mark
Pilgrim
Peter
I don't believe "spaceless" will work because in the example I posted
there are no html tags within the block.
Consider the same example where var2 is evaluated to be false:
header
...
--NEWLINE--
...
footer
The newline remains, but is displayed on a webpage because it is in
the
Not the prettiest thing in the world, but there's always:
header
{% if var1 %}{{ ... }}
{% endif %}{% if var2 %}{{ ... }}
{% endif %}{% if var3 %}{{ ... }}
{% endif %}
footer
Regards
Scott
On May 12, 2:20 pm, Noah Watkins wrote:
> Peter
>
> I don't believe "spaceless" will work be
I just stumbled upon this alternative too. Thanks for the reply, and
really I don't think it's too ugly.
On May 12, 11:50 am, zinckiwi wrote:
> Not the prettiest thing in the world, but there's always:
>
>
> header
> {% if var1 %}{{ ... }}
> {% endif %}{% if var2 %}{{ ... }}
> {% endif %
Wow, I feel totally stupid... works like a charm now :)
On May 12, 2:14 pm, Karen Tracey wrote:
> On Wed, May 12, 2010 at 1:52 PM, Yanik wrote:
> > Hello,
>
> > I'm trying to do something that seemed simple, but can't get to work:
> > displaying comments using Django (1.2 RC)'s Comment framework
Right, sorry! Read your question too quickly.
Peter
On 5/12/10 2:20 PM, "Noah Watkins" wrote:
> Peter
>
> I don't believe "spaceless" will work because in the example I posted
> there are no html tags within the block.
> Consider the same example where var2 is evaluated to be false:
>
>
>
On Wed, 2010-05-05 at 08:08 +0800, Russell Keith-Magee wrote:
> On Wed, May 5, 2010 at 1:43 AM, J. Cliff Dyer wrote:
> > I'm having trouble working with multi-db using mysql replication. When
> > I run our test suite, I'm getting several hundred errors if I have more
> > than one database config
If you are trying to upload images as static images just as we do in
html with an img tag then you might want to look for how to serve
static documentation on the django book.
You would need to make changes in settings.py by defining media_url,
media_root, etc.
and then make sure your root is on PY
I'm working through the Coltrane weblog tutorial and trying to implement
semi-hard-coded breadcrumbs. It seems reverse doesn't like what I've done.
This is the template inheritance chain ...
1. Salient parts of underlying template ...
{% block breadcrumbs %}{{ block.super }}
› Mike's Blog
{%
On 13/05/2010 12:43pm, Mike Dewhirst wrote:
I'm working through the Coltrane weblog tutorial and trying to implement
semi-hard-coded breadcrumbs. It seems reverse doesn't like what I've done.
Totally fair. I don't like what I did either.
In 3. below I left out the = between href and the url ta
Hi,,This is my url.py file, when i run this it shows indendation error at
line 25. But i dont see an indendation error. Can somebody help me. I am
just a beginner with Django.
from django.conf.urls.defaults import *
from django.conf import settings
# Uncomment the next two lines to enable the a
40 matches
Mail list logo