Re: {% elif %} error

2011-12-27 Thread Nikhil Verma
Go to this link https://docs.djangoproject.com/en/dev/ref/templates/builtins/ {% if athlete_list %} Number of athletes: {{ athlete_list|length }} *{% elif athlete_in_locker_room_list %}* Athletes should be out of the locker room soon! {% else %} No athletes. {% endif %} press CLTR +

Re: {% elif %} error

2011-12-27 Thread Tsung-Hsien
Thank you all! I don't see the line "New in Django Development version." On Dec 27, 10:44 pm, Tsung-Hsien wrote: > Hi, > I want to use {% elif %} > my template: >                         {% if bookmark.hours %} >                                 {{ bookmark.hours }} hours ago >                  

Re: {% elif %} error

2011-12-27 Thread yati sagade
There's no {% elif %}. You'll have to do: {% if bookmark.hours %} {{bookmark.hours}} hours ago {% else %} {% if bookmark.days %} {{ bookmark.days }} days ago {% else %} {% if bookmark.months %} {{ bookmark.months }} months ago {% else %} {{ bookmark.years }} years

Re: {% elif %} error

2011-12-27 Thread Nikhil Verma
Hi It is available in dev/trunl version not this version. This is dev version docs https://docs.djangoproject.com/en/dev/ref/templates/builtins/ On Wed, Dec 28, 2011 at 12:20 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien > wrote: > >

Re: {% elif %} error

2011-12-27 Thread Donald Stufft
Or back port the elif tag (which may or may not be non trivial). On Wednesday, December 28, 2011 at 1:50 AM, Russell Keith-Magee wrote: > On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien (mailto:jasoniem9...@gmail.com)> wrote: > > Hi, > > I want to use {% elif %} > > my template: > >

Re: {% elif %} error

2011-12-27 Thread Russell Keith-Magee
On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien wrote: > Hi, > I want to use {% elif %} > my template: >                        {% if bookmark.hours %} >                                {{ bookmark.hours }} hours ago >                        {% elif bookmark.days %} >                                {{

{% elif %} error

2011-12-27 Thread Tsung-Hsien
Hi, I want to use {% elif %} my template: {% if bookmark.hours %} {{ bookmark.hours }} hours ago {% elif bookmark.days %} {{ bookmark.days }} days ago {% elif book

Re: All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-27 Thread Russell Keith-Magee
On Wed, Dec 28, 2011 at 10:01 AM, Daniel Kaplun wrote: > How do I get all models with FKs, M2Ms, or 121s pointing to a given > model? Looking at your pastebin, you've already discovered the _meta object -- you just needed to dig around a little more in there. The methods/attributes you're looking

Re: Split File Storage

2011-12-27 Thread Brian Schott
Sounds like you already have a django-centric solution in mind, but what you want might be found in a distributed filesystem solution like Gluster (http://www.gluster.org/) or a distributed object store like Swift (http://swift.openstack.org/) accessed via django-storages. Or put them on Cloud

All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-27 Thread Daniel Kaplun
How do I get all models with FKs, M2Ms, or 121s pointing to a given model? I am using djcelery. I have a BakedModel with a FK to TaskMeta, which is the model that stores task status (I only care whether it is complete). I want to generate a query set that will return all instances of a given model

Split File Storage

2011-12-27 Thread Cameron
Greetings all- I have a django site which is referencing about 1TB of static files at the moment and growing fast. I am running out of affordable upgrade options and need to scale the file storage out to multiple machines once it hits 3TB. I have a pretty good idea about what needs to be done f

Re: preventing data from getting saved to the backend database?

2011-12-27 Thread Reinout van Rees
On 28-12-11 00:01, Jim wrote: I'm a newbie reading documentation, and this question may well be answered by something I havent read yet, but anyway... My understanding so far is that django incorporates a back-end database (in my case built in sql3 on windows) to which all model related data fro

preventing data from getting saved to the backend database?

2011-12-27 Thread Jim
I'm a newbie reading documentation, and this question may well be answered by something I havent read yet, but anyway... My understanding so far is that django incorporates a back-end database (in my case built in sql3 on windows) to which all model related data from forms gets posted. I'm trying

Re: runserver namespace problem?

2011-12-27 Thread rahul jain
Having the same problem "Received unregistered task of type blah" . Can someone help ? On Sun, Nov 13, 2011 at 5:26 PM, Ken wrote: > Does anybody have any idea? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group,

project help

2011-12-27 Thread Jesramz
Hello All, I would like to create a job search project a lot like monster or indeed. Does anyone have any resources such as other projects or repositories similar to what I'm looking for that can push me in the right direction? Or any advice whatsoever would also be appreciated. I am planning on

Re: how to use asyncore socket in django views.py

2011-12-27 Thread Joseph Slone
Depending on your needs, Celery could be over-kill. You could create a command that works under manage.py and use it in a cron job. On Tue, Dec 27, 2011 at 5:41 AM, Vovk Donets wrote: > To accepts socket connetction you need always listen some port. Othewise > you will be trying hit a bulls eye

Re: I can't start new project

2011-12-27 Thread yati sagade
AT, and they say hackers belong only to Linux :P Good job! On Tue, Dec 27, 2011 at 8:37 PM, Andre Terra wrote: > It's not just %, it's %* (notice the asterisk). > > I just tried changing the value back and forth here and it worked as > expected. > > > Cheers, > AT > > > On Tue, Dec 27, 2011 at 1

Re: Django CMS and django-admin-tools are together?

2011-12-27 Thread Jonas Obrist
"but I read that django-admin-tools is one of django-cms apps." that is incorrect. The initial design and idea started on our blog [1] but it was never implemented by us, so someone else did and thus django-admin-tools was created. [1] https://www.django-cms.org/en/blog/2009/10/29/dashboard-pro

Re: Django CMS

2011-12-27 Thread Andre Terra
*Before this thread turns into **another "My favorite X is Y", everyone please think twice before posting.* OP (probably) asked "Which CMS will let me upload and embed videos?", so unless anyone has something to add in that regard, there's no need to state your personal preference. If, instead, h

Re: Django CMS

2011-12-27 Thread Ezequiel Bertti
the best one for me is FEINCMS : http://feinheit.ch/media/labs/feincms/ have great tools for another aplication and is very easy to configure and use. On Tue, Dec 27, 2011 at 12:52, Jonas Obrist wrote: > Hi there, if you're asking about django CMS (https://django-cms.org), you > should use the

Re: render_to_response pointing to multiple templates

2011-12-27 Thread laras126
I am new to Django as well - but in answer to your second question, you'll need to create a views.py within the app and register the url in urls.py in the root. Then you can pull in variables from your app into the template. For example, if you have a Places class which includes a name and address,

Re: I can't start new project

2011-12-27 Thread Andre Terra
It's not just %, it's %* (notice the asterisk). I just tried changing the value back and forth here and it worked as expected. Cheers, AT On Tue, Dec 27, 2011 at 12:44 PM, Varrant wrote: > In registry % was missing, but nothing changed. > > "One time solution work's nice :D > > I'll lookfor v

Re: Django CMS

2011-12-27 Thread Jonas Obrist
Hi there, if you're asking about django CMS (https://django-cms.org), you should use the proper mailing list to ask questions: https://groups.google.com/forum/#!forum/django-cms Also, I do not fully understand your questions. Could you maybe try to explain a bit better what you're trying to ach

Re: I can't start new project

2011-12-27 Thread Varrant
In registry % was missing, but nothing changed. "One time solution work's nice :D I'll lookfor virtualenv Thanks for help :) -- 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. T

Re: I can't start new project

2011-12-27 Thread Varrant
Windows 7 64 -- 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 group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit th

Re: I can't start new project

2011-12-27 Thread Andre Terra
My bet is that you're using Windows. Open the Registry Editor (hit Winkey+R, "regedit" (no quotes), hit enter) --- Go to *HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command* and check that it looks somewhat like '"PYDIR\\python.exe" "%1" %*' If you're missing the final * %**, it won't

Re: I can't start new project

2011-12-27 Thread Hassan
What is your Operating System ? -- 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 group, send email to django-users+unsubscr...@googlegroups.com. For mor

I can't start new project

2011-12-27 Thread Varrant
Hello, I have installed python 2.7 and Django 1.3.1, but when I type: "django-admin.py startproject project" I receive only something like 'help' for that command How can i fix it? I already tried reinstalling Python and Django... -- You received this message because you are subscribed to th

Re: Django CMS and django-admin-tools are together?

2011-12-27 Thread Denis Darii
I have a project in which I use django-cms and django-admin-tools together in production and I hadn't had any problems using it until now. On Tue, Dec 27, 2011 at 9:27 AM, Maxim Boyarskiy wrote: > Hi Guys, > > One question here: Is it possible and justified to use django-admin- > tools over djang

Django CMS and django-admin-tools are together?

2011-12-27 Thread Maxim Boyarskiy
Hi Guys, One question here: Is it possible and justified to use django-admin- tools over django-cms? I have no experience with Django-CMS and django- admin-tools, but I read that django-admin-tools is one of django-cms apps. I mean, I have to implement user filled resource and I look at cms, but I

Re: how to use asyncore socket in django views.py

2011-12-27 Thread Vovk Donets
To accepts socket connetction you need always listen some port. Othewise you will be trying hit a bulls eye when sending data to this port (if you would listen port only when view was called) View is a function it's not a webserver that runs and listen to port. You need to decouple working with soc

Re: Trying to create django app to view alarms

2011-12-27 Thread Jim
On Dec 23, 2:29 pm, Python_Junkie wrote: > I think that building the python code that performs your logic is a > great way to start, and not getting bogged down with django is a great > way to get started. > > There are several (relatively straight forward) pieces of django that > you will need

Re: how to use asyncore socket in django views.py

2011-12-27 Thread Kay
Hello~ I need to run the python django project and meanwhile accept the socket connection from somewhere to receive data. But I dont know is this can be done,so any tips if this is possible? thanks~ kay On 12月27日, 下午4時34分, Vovk Donets wrote: > For what you need this? > Maybe you should consi

Django CMS

2011-12-27 Thread Hassan
Dear ALL, i want to ask something , Can i use like one feature on Django CMS i need to using the video upload and playing it , is that possible , how can i do somthing like this . Thanks Best Regards , Hassan Alnatour, -- You received this message because you are subscribed to the Google Grou

Re: how to use asyncore socket in django views.py

2011-12-27 Thread Vovk Donets
For what you need this? Maybe you should consider using Celery for doing background jobs. 2011/12/23 Kay > if I have easy asyncore socket code as follow: > > > -- > > import socket > impor