newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-18 Thread Bram de Jong
Hello all, just updated to latest newforms-admin (r7947) and This is the admin for one of my (rather large) models: class Sound(SocialModel): # SocialModel is a model that defines some GenericRelation user = models.ForeignKey(User) # snip license = models.ForeignKey(License)

Re: newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-25 Thread Bram de Jong
On Fri, Jul 18, 2008 at 5:45 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > > Determining which part of the fieldsets definition generates the error would > be helpful. You might be able to determine it by looking at the local vars > in the debug page. Alternatively you could experiment with remo

Re: per object permissions, caching and templates?

2008-07-25 Thread Bram de Jong
Hello, On Fri, Jul 25, 2008 at 4:55 PM, Hanne Moa <[EMAIL PROTECTED]> wrote: > > AFAIK is_authenticated doesn't enter into it at all. I think I might not have explained very well... Newforms-admin ( i.e. "admin" now :) ) has per-object permissions. These are more programmatic than per-row perm

per object permissions, caching and templates?

2008-07-25 Thread Bram de Jong
hello all, For freesound.org I really need per-object permissions and caching. I would also love to use the {% cache %} template tag as much as possible because it's so easy and transparent! Now, say for example I have a sound, and a user can either edit it or not, or vote for it or not. can ed

user defined ordering + admin?

2008-08-20 Thread Bram de Jong
Hello All, Has anyone done any work on letting the user define a custom sort order for objects in "nfa"? I.e. for example extending a base-class that has a single "order" integer field and up() and down() functions. Once that is done, I guess it would be relatively easy to override the "nfa" lis

request: auth_user User model, not enough characters in email

2008-08-28 Thread Bram de Jong
hello all, it's obviously a very small hack in the django source code, but it would be nice if the email-field would have a few more characters. I have a few pesky users who actually use my site and have a vry long email address. - bram -- http://www.freesound.org http://www.smartelectroni

keeping counts of verbs (downloads, comments, ...)

2008-09-17 Thread Bram de Jong
hello all, I have objects in the db which are being commented/favorited/downloaded many, many times. I'd like to keep counts of those verbs, in various time spans (#downloads today, this month, all time). Having done this for another site, I have found that this isn't the easiest thing in the wo

Re: Custom ID field with random string

2008-03-31 Thread Bram de Jong
why not use slugs then? http://www.example.com/projects/username/my-cool-project/ sounds a lot nice than http://www.example.com/projects/0sdf0s463sdg0/ - bram On Mon, Mar 31, 2008 at 11:21 AM, Julien <[EMAIL PROTECTED]> wrote: > > One reason is because I believe string allows to store bigge

field-null or not-null filter?

2012-06-14 Thread Bram de Jong
Hey guys, I was wondering if there is a way of making a field null vs not-null filter without coding it yourself? I tried: list_filter = (('field_which_is_foreign_key', BooleanFieldListFilter),) In the end I wrote this little one: class MyFieldFilter(SimpleListFilter): title = _(' field_w

list_display showing latest creation date of set?

2012-06-14 Thread Bram de Jong
Hi all, I have: class A(models.Model) created = -- http://www.samplesumo.com http://www.freesound.org http://www.smartelectronix.com http://www.musicdsp.org office: +32 (0) 9 335 59 25 mobile: +32 (0) 484 154 730 -- You received this message because you are subscribed to the Google Groups

Re: list_display showing latest creation date of set?

2012-06-14 Thread Bram de Jong
please ignore this email! - bram On Thu, Jun 14, 2012 at 1:07 PM, Bram de Jong wrote: > Hi all, > > I have: > > class A(models.Model) >    created = > > -- > http://www.samplesumo.com > http://www.freesound.org > http://www.smartelectronix.com > http:/

custom db field as filter in admin

2012-06-22 Thread Bram de Jong
Hello all, I have a custom DB field: a version string like "1.0.5rc3" which is actually stored as an int in the db. After fidling around a bit I managed to make the field so that everything you would think should work works. It looks like a version string everywhere, I can input it as a version s

Re: custom db field as filter in admin

2012-06-22 Thread Bram de Jong
On Fri, Jun 22, 2012 at 12:27 PM, Melvyn Sopacua wrote: > On 22-6-2012 12:09, Bram de Jong wrote: > >> However, when I turn this field into a filter in the admin, instead of >> seeing the filter-versions as my string (i.e. "1.0.5rc3") I see it as >> the unde

unicode decode errors in loggging on server

2012-10-05 Thread Bram de Jong
Hello all, My login setup on my server does not enable console logging, only to-file logging (see at the end of this message for the logger setup). However, just now I got a unicode decode error in my logging: File "/home/xyz/site/xyz/views.py", line 520, in xx_yy_zz logger.error(u"Succes

ann: freesound and django

2011-09-16 Thread Bram de Jong
hello everyone, just a small message to say that htp://www.freesound.org now runs on django :) all the code is gpl and can be found here: http://www.assembla.com/code/freesound For those interested, our stack is: nginx, postgres, solr, ... bram -- http://www.samplesumo.com http://www.freesou

Re: ann: freesound and django

2011-09-16 Thread Bram de Jong
> http://www.assembla.com/code/freesound My appologies: https://www.assembla.com/code/freesound/git/nodes - bram -- 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 unsubscri

crashes on long queries

2011-10-04 Thread Bram de Jong
Hello all, On Freesound.org we run a stack of nginx / django via flup / supervisorcontrol (for keeping the workers up) + postgres on another machine We have noticed that if we run long queries (for example deleting an object with many, many cascades) everything crashes. More specifically, our wo

(fundamental) problem with password reset in 1.x: URL's become too long

2011-11-14 Thread Bram de Jong
Hello all, on freesound.org we are using the built-in password reset view to send users password reset emails... and there is a bit of a fundamental problem with the password reset emails, or more in detail the password reset URLS: they are way too long. In our app we get URLs like this: http:/

Re: (fundamental) problem with password reset in 1.x: URL's become too long

2011-11-15 Thread Bram de Jong
Hmm, We have 2 milion users and this isn;t really a good solution for us... Does anyone else have an alternative password-reset app which doesn't use as many characters as the default one? - bram On Mon, Nov 14, 2011 at 4:57 PM, creecode wrote: > Hello Bram, > > It's been awhile since I've ha

Re: (fundamental) problem with password reset in 1.x: URL's become too long

2011-11-17 Thread Bram de Jong
On Wed, Nov 16, 2011 at 2:39 PM, Andre Terra wrote: > Since url shorteners have already been suggested, how about the possibility > of writing a shorter url pattern in urls.py. Would something like > http://www.freesound.org/r/1-123-a12345678ed12345d123/ be good enough for > you? Sure, we could d

testing: running something after the fixtures have been loaded

2011-02-08 Thread Bram de Jong
Hi, we want to write some testing code, but our site uses Solr for indexing. The test cases we are running are testing -among other things- the searching. problem is: we need to run some additional code to index the stuf the fixtures just inserted into the DB. as far as I read it the django uni

hello & question (sorting related cmodels)

2006-06-13 Thread Bram de Jong - MTG
Hello everyone, A (long) question: I have two models, linked by a single key. LinkClass ("search engines", ...) and Link ("http://www.google.com";, "http://www.yahoo.com";) Now, in Python I can do: for link_class in LinkClass.objects.all(): print link_class.name for link in link_c

newbie: object from maniputor versus set_foo.add( )

2006-06-13 Thread Bram de Jong - MTG
hi, More newbie questions. I have something similar to: class BlogPost: [...] class Comment: [...] blog_post = models.ForeignKey(BlogPost) Now, when POSTing a comment, I have to set the 'blog' of the comment to the right blog item. Right now I do: def post_comment(

new here and where/how/what to cache...

2006-02-01 Thread Bram de Jong - MTG
Hi, (new here, hello all) My latest website ( http://freesound.iua.upf.edu ) is becoming more popular then it was ever meant to be, so I'm looking at rewriting it in django and rethinking the model space from the bottom up... Now, I have some questions about caching. Here goes: 1. how d