Re: Filtering the filters in Django Admin

2011-02-19 Thread gladys
I dont think there's a trivial way to do this. You might end up hacking into the django code itself. -- Gladys http://bixly.com On Feb 20, 5:58 am, SimpleDimple wrote: > Here is my code for a school projecthttp://dpaste.com/434311/ > > The code works fine, on

Re: testing foo_set existence for each object in a queryset

2011-02-19 Thread Lior Sion
Dan, If I understand your question correctly, you are struggling with creating the filtering you wrote in your message on the queryset level (without going to the db for each object), right? Hard to say without actually seeing your code and testing, but would this be the same?

Re: testing foo_set existence for each object in a queryset

2011-02-19 Thread Shawn Milochik
Not only is it not a stupid question, but it's one of the best possible types of questions. Any time someone comes in and makes it obvious that they've thought about their problem and made an attempt to solve it themselves, they get my respect. The easiest answer to your question is to make a

testing foo_set existence for each object in a queryset

2011-02-19 Thread Dan
Hi, Long time lurker - first time poster - hopefully future answerer... Basically what I want to do can be done with: result = [w for w in MyModel.objects.all() if w.foo_set.filter(endtime__gt = datetime.datetime.now()).exists()] Is there anyway to do this using the queryset api? Hopefully

Re: South - when to start?

2011-02-19 Thread Shawn Milochik
On Sat, Feb 19, 2011 at 8:28 PM, Rainy wrote: > I was going to say the exact same thing. I can just add that anything > is fairly > easy with South - starting from the beginning, starting just before > 2nd > dev joins in, or even starting after other devs join. Wiping out

Re: South - when to start?

2011-02-19 Thread Rainy
On Feb 18, 10:59 am, ShawnMilo wrote: > Just to add my tiny bit to this: > > I say start with South right away. But when you're ready to deploy for the > first time, wipe it all and to another --initial. > > The reason is that South is awesome for letting you upgrade a

Re: urls.py and views.generic issue

2011-02-19 Thread jnns
Hi Antti, the url patterns in the tutorial are not correct. The regular expressions are not using character classes but merely plain characters. ^blog/ ^(?Pd{4})/$ should be ^blog/ ^(?P\d{4})/$ Mind the backslash in \d{4}. This way we're matching for a sequence of four digits and not for a

urls.py and views.generic issue

2011-02-19 Thread Antti
The problem: I can't seem to get most of my urls that I type in my browser to math a url in my urls.py file. I am currently doing Web Monkey's Blog Tutorial (http://www.webmonkey.com/2010/02/Get_Started_With_Django/) To date everything has worked but when I try to use the urls from the blog

Filtering the filters in Django Admin

2011-02-19 Thread SimpleDimple
Here is my code for a school project http://dpaste.com/434311/ The code works fine, on studentadmin list page, I get filter for classes which is good but as you can see my project is multi-tenant so in filter area I want to show only the classes for the school the current user is logged in

Using contenttypes without auth

2011-02-19 Thread xcephe  
If you use contenttypes without auth in INSTALLED_APPS (eg, being used) it seems the auth models still get installed. When you run syncdb with a state content type, it will prompt to delete the stale CT entry and the Permission model tries to clean up: File

Re: Messages framework is not showing messages in my templates

2011-02-19 Thread Gabriel Prat
Thanks Daniel, is just this, I forgget the context_processor on my return... thanks for all. G. On 18 Feb, 19:38, Daniel Roseman wrote: > On Friday, February 18, 2011 10:56:54 AM UTC, Gabriel Prat wrote: > > > Hi all, I'm trying to use messages framework, I've checked

Re: show a visual map of relationship between models

2011-02-19 Thread bedros
Perfect! that's excactly what I need. thanks a lot Bedros On Feb 19, 11:01 am, Thomas Rega wrote: > 2011/2/19 bedros <2bed...@gmail.com>: > > > Hi all, > > > Any one knows of a django app that shows the map of relationship > > between models in my django ORM; I remember

Re: show a visual map of relationship between models

2011-02-19 Thread Thomas Rega
2011/2/19 bedros <2bed...@gmail.com>: > Hi all, > > Any one knows of a django app that shows the map of relationship > between models in my django ORM; I remember seeing something like that > in the past, but I forgot where. http://code.djangoproject.com/wiki/DjangoGraphviz good luck, TR --

show a visual map of relationship between models

2011-02-19 Thread bedros
Hi all, Any one knows of a django app that shows the map of relationship between models in my django ORM; I remember seeing something like that in the past, but I forgot where. Thanks, Bedros -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Django administration - Allow full HTML for a TextField form

2011-02-19 Thread NewNumOrder
Thanks for the 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. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options,

Re: Constant signing out on production server - Django 1.2.5

2011-02-19 Thread Shawn Milochik
Okay, it sounds like your problem is different. Mine only happened in IE, and not to all users, and not the same IE version. Just to some specific users, 100% of the time. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Problem in new Django Project- cannot import tables.

2011-02-19 Thread Daniel Roseman
On Saturday, February 19, 2011 10:52:50 AM UTC, Rohini Dhavale wrote: > > As per the tutorials I am trying to create my own project. Followed > every step up to creating database; syncdb. But in interactive shell > when trying out ' from student_cce.models import abhivyakti ' command > where

Re: Django administration - Allow full HTML for a TextField form

2011-02-19 Thread Daniel Roseman
On Saturday, February 19, 2011 3:04:27 PM UTC, NewNumOrder wrote: > > I've tried enabling 'allow_tags' for a TextField, but the admin tools > still encode the text when inserting or updating rows. > > Is the following code correct? > some_field = models.TextField() > some_field.allow_tags =

Django administration - Allow full HTML for a TextField form

2011-02-19 Thread NewNumOrder
I've tried enabling 'allow_tags' for a TextField, but the admin tools still encode the text when inserting or updating rows. Is the following code correct? some_field = models.TextField() some_field.allow_tags = True I can't even edit the HTML with phpPgAdmin because it does the same thing, so

Django Aptana Run

2011-02-19 Thread Andreas Rudischhauser
Hello, i'm trying to get Django running in Aptana Studio. I've got PyDev installed and can create a new project. The point that's missing is the "run as". Does anybody know how to setup a run configuration. (Im running it on mac, if that's important to know). Or is there a better dev

Re: How to reinstall Python Interpreters?

2011-02-19 Thread CrabbyPete
Why not just use virtualenv and then just easy_install I'm using it with python 2.5 and it works great. On Feb 18, 8:07 pm, lduros wrote: > Did you install dajaxice through apt-get? From the command line: sudo > apt-get install python-django-dajaxice > If not, you might

Re: Not able to use CSS in Django templates

2011-02-19 Thread Tom Evans
On Sat, Feb 19, 2011 at 2:58 PM, The_Legend wrote: > I tried a lot, found another post with same some, but without luck :( > > till now --- > > project name --- library--- c:\library\ > > C:\library>dir > > Directory of C:\library > > 02/19/2011  07:29 PM              

Re: Permission hooks in class-based views

2011-02-19 Thread fordprefect
> > The intention for 1.3 was to get a class-based view framework in place > that could serve as a replacement for the existing function-based > generic views. Since the function-based generics don't have > permissions, neither does the initial iteration of class-based views. That's fair

Not able to use CSS in Django templates

2011-02-19 Thread The_Legend
I tried a lot, found another post with same some, but without luck :( till now --- project name --- library--- c:\library\ C:\library>dir Directory of C:\library 02/19/2011 07:29 PM mainapp 02/19/2011 11:26 AM 557 manage.py 02/19/2011 08:16 PM media

Problem in new Django Project- cannot import tables.

2011-02-19 Thread Rohini Dhavale
As per the tutorials I am trying to create my own project. Followed every step up to creating database; syncdb. But in interactive shell when trying out ' from student_cce.models import abhivyakti ' command where student_cce is name of my project model and abhivyakti is name of my databse table

django-taggit how to get tags based on foreign key

2011-02-19 Thread easylancer
I have a model [http://pastie.org/1582079] which I am trying to get tags based on the Worksheet foreign key, so tags per worksheet. I am unable to find any examples of ways how to do this? I was able to accomplish this easily with django-tagging by doing

Re: Just going to point this out ...

2011-02-19 Thread dave b
It would be interesting to perhaps extend something like django-lint to pick up on what could be mistakes in templates. -- 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

TinyMCE + Filebrowser (can't make integration)

2011-02-19 Thread gerram
Help me anyone. I installed separately: 1) grappelli, filebrowser, tinymce. Filebrowser works good, tinymce works good but if I try to get widget of filebrowser from tinymce form (insert image) then I get standart upload interface from tinymce. I want to get my filebrowser interface. In my app

Re: Broken link emails

2011-02-19 Thread pjrhar...@gmail.com
I realised the second question is answered here: http://docs.webfaction.com/software/django/troubleshooting.html#accessing-remote-addr which is a middleware that was removed a while back. The first bit of my question still stands though! -- You received this message because you are subscribed

Re: Constant signing out on production server - Django 1.2.5

2011-02-19 Thread Velian
Shawn I'm glad I'm not alone, but this seems to be a different issue. The client gets the same issue in ANY browser, which makes the problem either more mind-boggling or much easier to solve if the problem is me and I'm missing something major :) Velian On Feb 18, 10:17 pm, Shawn Milochik

Re: Permission hooks in class-based views

2011-02-19 Thread Russell Keith-Magee
On Sat, Feb 19, 2011 at 6:28 PM, fordprefect wrote: > Hi, looking at the new class-based views for 1.3, there doesn't appear > to be an easy way to add row-level permission hooks to the views (as > one can do in ModelAdmin). It seems a strange omission as this should > be

Permission hooks in class-based views

2011-02-19 Thread fordprefect
Hi, looking at the new class-based views for 1.3, there doesn't appear to be an easy way to add row-level permission hooks to the views (as one can do in ModelAdmin). It seems a strange omission as this should be quite straightforward and is an extremely common use-case. For example, if I have a