Hi Matthew,
> I have what is basically this layout:
>
> {% ifnotequal activeusers|length 0 %}
> {{ activeusers|length }} Friends Online
> {% else %}
> Friends
> {% endifnotequal %}
Try this:
{% if activeusers %}
{{ activeusers|length }} Friends Online
{% else %}
Friends
{% endif
Hi Archatas,
On Apr 16, 4:07 pm, "Aidas Bendoraitis [aka Archatas]"
wrote:
> > 8. Using parameters
> > /products/?sort=popularity
> > /products/?filter=featured
> > /products/?page=5
> > /products/add/
> > /products/myproduct/
> > /products/myanotherproduct/
> In th
Hi Aidas,
> 7. Using the controlling words before the type of list:
> /by-popularity/products/
> /featured/products/
> /page5/products/
> /add/products/
> /products/myproduct/
> /products/myanotherproduct/
8. Using parameters
/products/?sort=popularity
/products
Hi Harish,
On Apr 16, 12:27 pm, Harish wrote:
> Is it possble to install two seperate django versions (0.97 and
> 1.0.x) in one python site-package file.
> If yes how and if no why?
You can put django into your project directory, e.g.
/myproject
/__init__.py
/manage.py
/urls.py
/
Hi Ramya,
> I have 2 options
> a. Build the object as well as pass the set the variables for titles /
> headings in view and have a single template for all views.
> Down fall.. view has details related to rendering..
> b. Have many templates with each template having specific information
> for ev
Hi Ramyak,
> a. Can template tags take arguments (not a string)
> {% formatDateTime_5 value %}
> where value is a variable
> time data did not match format: data=value fmt=%Y-%m-%dT%H:%M:%S+
Yes.
>
> b. Can template tags take objects as arguments.. tat is if the above
> is possible..
Yes.
Dear Nanda,
Please visit the link below:
http://www.zoia.org/blog/2007/07/29/django-file-upload/
I hope that it helps you.
Best regards,
Marcin Mierzejewski
On May 21, 1:40 pm, nandu <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I am having a problem with where to start when
Hi,
You have to add path to directory where you have template files.
settings.py file TEMPLATE_DIR parameter.
Regards,
Marcin
On Feb 7, 4:16 pm, Schmoopie <[EMAIL PROTECTED]> wrote:
> I'm slaying the configuration bugs, slowly but surely, with your help.
>
> The latest one is a TemplateDoesNot
Hi
You have to add ADMIN_MEDIA_PREFIX to your settings.py file, e.g.:
ADMIN_MEDIA_PREFIX = '/media/admin'
Regrads,
Marcin
On Feb 7, 6:35 pm, mangamonk <[EMAIL PROTECTED]> wrote:
> I'm trying to make a change to my templates here..
>
> /django_trunk/mysite/templates/admin/base_site.html
>
> But
Hi,
What is 'divs' in your example?
And what do you want to do it?
If you want to display a list "name1", "name2", "name3" you can do it
in this way:
view.py
divs = ('name1', 'name2', 'name3')
template.html
{% for div in divs %}
{{ div }}
{% endfor %}
Regards,
Marcin
On Feb 6, 5:23 pm, [
Hi Kenneth,
I have very similar situation in my projects (some our projects, we
develop 4 version in the same time - client specific versions).
We do it in this way (we are using SVN):
/trunk/ <- latest version
/branches/product-1.0
/branches/product-1.1
/branches/product-1.2
/tags/product-1.0.0
ambiguity
>
> On Dec 13, 2007 5:45 PM, Marcin Mierzejewski <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > It should work.
>
> > On Dec 13, 9:32 am, "Young Gyu Park" <[EMAIL PROTECTED]> wrote:
> > > Ye. It works.
>
> > > But when
It should work.
On Dec 13, 9:32 am, "Young Gyu Park" <[EMAIL PROTECTED]> wrote:
> Ye. It works.
>
> But when I work with generic view such as update insert, how can I work with
> this code?
>
> On Dec 13, 2007 5:04 PM, Marcin Mierzejewski <[EMAIL PROTECT
Hi,
Try this:
class Entry(models.Model):
...
tags = models.ManyToManyField( Tag )
class Tags(self):
return self.tags.all()
class Tag(models.Model):
...
And now, Entry.Targs() returns all Tags related to the blog entry.
Regards,
Marcin
On Dec 13, 8:54 am, "Young Gyu Park" <[EMAIL
Hi Rufman,
You can use third part software like http://recaptcha.net/ or you can
use this idea to write something similar.
Regards,
Marcin
On Nov 20, 4:15 pm, Rufman <[EMAIL PROTECTED]> wrote:
> Hey Guys
>
> Is there some way to stop (reduce) the spam I get through a form? I
> was thinking of
Hi,
You can use django.views.static.serve.
In my application I have the following link in my urls.py
(r'^css/(?P.*)$', 'django.views.static.serve', {'document_root':
'%s/templates/css' % APPLICATION_ROOT }),
(r'^javascript/(?P.*)$', 'django.views.static.serve',
{'document_root': '%s/templates/ja
Hi,
Yes, you can:
http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic-path-with-django/
http://code.djangoproject.com/wiki/CustomUploadAndFilters
Regards,
Marcin
On Nov 8, 2:08 pm, cschand <[EMAIL PROTECTED]> wrote:
> Hi all,
> Can we make dynamic ImageFields? upload file t
Hi,
>From Django Book:
"syncdb command is a simple sync of your models to your database.
It looks at all of the models in each app in your INSTALLED_APPS
setting".
But you can uses --settings option for manage.py.
./manage.py syncdb --settings=mysettings
where mysettings.py contains only your
Hi Manakel,
On Nov 6, 11:53 am, Manakel <[EMAIL PROTECTED]> wrote:
> This web application had a Authorization model at the Field level.
> []
> TASK has a progress status field and a due date field
> realisator user can only change the status field
> owner can change both the status field
Hi,
> I get the add flat page in admin, but after adding a flat page,when i
> try to 'view on site', it gives me a 404 error.Can you tell me why
> isn't FlatpageFallbackMiddleware working?And yes, I did add the
> trailing slashes as url. (eg: /about/). Please advice. Thank you.
Did you add dja
20 matches
Mail list logo