If anyone has a clue, let me know!
greetings,
- bram
My logging setup:
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': '%(asctime
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
a version string everywhere.
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 underlying database type (i.e.1301)
I implemented __unicode__ and __str__ on my object, but no luck either!
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:/
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
def queryset(self, request, queryset):
if self.value() == 'T':
return queryset.filter( field_which_is_foreign_key=None)
if self.value() == 'F':
return queryset.exclude( field_which_is_foreign_key =None)
But that's not very gener
)
The angle bracket thing is new to me: how exactly does this help? You
do mean regular < and > right?
So
<http://www.google.com>
Should be better than
http://www.google.com
?
- Bram
--
You received this message because you are subscribed to the Google Groups
"Django u
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 bee
email apps cut off the URL, or add newlines into it (perhaps the
dashes!).
We were actually having the same type of problems with (our own)
activation links. Cutting them back to only a fewer (random)
characters solved all the problems there.
cheers,
- Bram
--
http://www.samp
m and we would prefer not to have to restart the webserver if
they happen =)))
Has anyone else seen this happen?
- bram
--
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
--
> 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@googleg
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
Von: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] Im Auftrag von Bram Deprettere
Gesendet: Montag, 18. Juli 2011 09:36
An: django-users@googlegroups.com
Betreff: Re: AW: admin_media_prefix in page source is wrong
I mean I used ln -ls to make a link to
../../lib
Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: 00431 534521573
Fax: +43 (1) 534 52 - 146
-Ursprüngliche Nachricht-
Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im
Auftrag von Bram Deprettere
Gesendet: Montag, 18. Juli 2011 09:36
An: django-users@googlegroup
egroups.com] Im
Auftrag von Bram Deprettere
Gesendet: Freitag, 15. Juli 2011 09:11
An: django-users@googlegroups.com
Betreff: admin_media_prefix in page source is wrong
I'm having the following situation;
django project named inventory
Made a folder static for media-files. Inside static-folder I made
I'm having the following situation;
django project named inventory
Made a folder static for media-files. Inside static-folder I made a link
to ../../lib/python2.7/site-packages/django/contrib/admin/static/admin
for the admin-media files.
When I go to http://inventory/admin, the static/admin fi
unit tests run setUp before the
fixtures are loaded...
is that correct?
- bram
--
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
unning set_trace. Are there
other/better ways to raise the original exception instead of the
TransactionError?
Bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
though the
ModelForm was found valid.
Does someone have some tips or a snipped which does the above things
(object creation/editing with one or more formsets)?
Bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&quo
um analyze every time after the
updates. Right now I'm thinking of creating some separate code for it and
actually store the results in memcached instead of the database.
Can anyone give any advice on how to do this, in particular (or not!) with
django?
thanks a lot for any hints!
-
Hi,
I was wondering whether there's an easy way to convert XS XML model
definitions to Django models.
Congrats on the new release!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Hi,
I was wondering if there was a automagical way to convert a XML-XS
file to a Django-model file.
And congrats with the beta of course!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
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
to override the
"nfa" list-views for objects derived from this class.
Of course I'm betting someone has already done the work for me :)
Hence this email!
Anyone?
- Bram
--
http://www.freesound.org
http://www.smartelectronix.com
http://www.musicdsp.org
--~--~-~--~---
gether with {% cache %}?
{% cache 500 sound_page user.is_authenticated %}
I see little difference between using per-app permissions in templates
and using per-object permissions, so having some way to do it would be
awesome.
- bram
--
http://www.freesound.org
http://www.smartelectron
se one can do all of this in the view, but as far as I know,
you would have to immediately switch to the low-level cache API in
order to do what I just described - nor would you be able to use
generic views out of the box.
cheerio,
- Bram
--~--~-~--~~~---~--~~
You
could strip your models down to a reasonably simple testcase that
> displays the error it would be helpful.
Sorry for not replying this earlier.
Splitting my admin settings into admin.py modules, and updating to the
latest trunk fixed this problem.
- Bram
--~--~-~--~~~--
rk/Versions/2.5/lib/python2.5/site-packages/django/db/models/options.py"
in get_all_related_m2m_objects_with_model
377. cache = self._fill_related_many_to_many_cache()
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models
rsion that just uses hours/minutes isn't such a
big deal with the DurationField sourcecode at hand.
Bram
Marty Alchin wrote:
> Wow, a conversation about DurationField and I totally missed it. For
> what it's worth, that patch needs a bit more work before even I want
> it included i
that I just render two
fields of the widget, I could copy the widget and modify this in code,
but that doesn't seem nice to me. So, here's my question: how could I
render specific widgets of a MultiWidget in my template?
Bram
--~--~-~--~~~---~--~~
Yo
Thanks, it works. I'm using this in the __init__ of my form, because I'm
subclassing ModelForm.
Bram
Richard Dahl wrote:
> You could do something like this:
>
> f = forms.form_for_model(modelname)
> f.base_fields['fieldname'].queryset = (query_based_on_variabl
Hi all,
I'm using a ModelForm with a ModelChoiceField. I need to set the
queryset of this field using a variable that's passed to the form
constructor. I couldn't declare the field in the class itself, because
I don't have access to the variable at the class level. How cou
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 all
Dj Gilcrease wrote:
> On Thu, Feb 21, 2008 at 6:23 AM, Bram - Smartelectronix
> <[EMAIL PROTECTED]> wrote:
>> Basically plugins can register with the host app and say "I want to be
>> plugged in here or there" (the hook). The host app in various places has
&
app and say "I want to be
plugged in here or there" (the hook). The host app in various places has
calls which "apply" whatever is hooked into that location.
If anyone has any ideas or pointers as to how this could be done, please
let me know.
- bram
--~--~-~-
> Is this usage not supported or is this a bug?
afaik this isn't supported (I'm assuming start_date is a date field)
you could use
http://www.djangoproject.com/documentation/db-api/#extra-select-none-where-none-params-none-tables-none
- bram
--~--~-~--~~---
is dangerous when you have multiple sites (if
> Site A and Site B both want to add a field of the same name, whose
> field "wins"?).
That's true, but in 99.9% of the cases you would be involved in both the
code for siteA and siteB.
- bram
--~--~-~--~~
a good idea to use django for a website which has relatively heavy
demands in bandwidth and a big heap of users (500K and rising about
1K+/day).
I love django, and I had a great time using it for splice, but... these
4 issues still give me headaches :)
- bram
--~--~-~--~~-
t_or_create(content_type=ctype,
object_id=object.id, user=user)
add_fav = staticmethod(add_fav)
And calling add_fav( ) I once in a while get IntegrityError: duplicate
key violates unique constraint "splice_daofavorite_user_id_key" which
confuses me quite a bit as I'm using get_o
a string as input, and not with a datetime.date() as
input.
I.e. using MyClass(instance=model_instance) it will not pick up the date
as the DateField obviously gives you a datetime and not a string.
Does anyone know of a way of fixing either? :)
cheerio!
- bram
Jan Rademaker wrote:
>
> See http://www.djangoproject.com/documentation/templates/#force-escape
Thank you...
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
look
like, the second shows the user the code he can copy-paste. Now with
autoembed this no longer works as "escape" doesn't exist anymore as a
filter.
Any ideas welcome :)
cheers,
- bram
--~--~-~--~~~---~--~~
You received this message because y
s set to False,
and in the 500 we're using the request. Does rendering of the 500
normally use the context-processors?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
on works just fine!
Any hints would be great I'm hitting a wall here :)
cheers,
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
t': request}
And, I'm obviously using context_instance=RequestContext(request) where
needed.
As said, the weird thing is that it SPORADICLY fails, not all the time.
I.e. it only fails once every X views. Could this possibly have
something to do with the anonymous user caching?
ey [request] in [{}]"
Does anyone have any idea what this could mean? The strange part is that
the same page will sometimes trigger the error and sometimes... not!
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Should I be checking the count() of
available rows and then do a "while True:" to get the "next id to be
rendered"? That sounds to me like I'll get into ugly deadlock situations :-S
I also need to be able to signal: "all is ok, all songs have been
rendered, take a
there are any new events that happened.
This scales really badly, and would definitely need some kind of fix, so
I'm very interested in any solutions you guys might come up with.
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Jonathan Buchanan wrote:
> class Flag(models.Model):
> objects = FlagManager()
>
> Usage::
>
> songs = Flag.objects.get_by_model_and_flag_type(Song, 'illegal')
Thanks a lot Jonathan...
I guess I should adding custom managers to all my classes containing
y is out of range for month
it ain't a particularly useful unit test in my case ;-)))
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
irthday.day)
except ValueError:
birthday = datetime(now.year, self.birthday.month, self.birthday.day-1)
But that seems such a hack :-))
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&qu
ent_type=ctype).order_by('-created')
songs = [item.content_object for item in flagged ]
But the problem is: I can't do extra things to this list like order_by()
or an extra filter() or exclude().
How can I get the same result, but still have a
ntastic, and I
> bet it was damn difficult, which is the whole reason why I really
> never went ahead with the idea. I guess that's why who's envy now it
> is me ;)
Thanks a lot :-) I *was* a lot of work :-)
- bram
--~--~-~--~~~---~--~~
You re
logged in users easily?
I'm guessing that I would need to add @vary_on_cookie before for each
and every view?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
he process.
Does anyone have an idea why this could be?? No other models in our
application show this behaviour (then again, no other model has this
many connections to the rest of the models)
Editing the model via manage.py shell works just fine.
- bram
--~--~-~--~~
http://www.splicemusic.com/
( summary: upload sounds, load them into a flash audio sequencer with
effects and synthesizers + standard community features)
thanks a lot to all the people who have helped me getting this thing up
and running! :-)
cheerio,
- bram
Any
Allow from All
Alias /media /opt/splice/pysplice/media
# for some things we need media served by apache!
SetHandler None
Satisfy Any
Allow from All
I'm becoming pretty desperate for a fix as we'
rors of 80%, it's just to have some idea ;-)
In the near future we will move postgres to another machine.
thanks a lot,
- bram
Proud to be releasing another django site this week, fingers X'd. :-)
--~--~-~--~~~---~--~~
You received this mes
of comments, number of favorites, etc...). Using stored
procedures there are updated once in a while, depending on how quick
it's needed.
I could be wrong of course, but perhaps you don't need an always
up-to-date count of over 2mil entries...?
- bram
--~--~-~--~~
?
If there's a lot of models and a lot of generic relations, this becomes
a bit of a pain... Add one more generic => change all delete's!
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
MartinWinkler wrote:
>
> Bram - Smartelectronix schrieb:
>
>> in clean( ) we would like to set a field value. In particular: if there
>> are errors in a signup form, we'd like to delete the passwords to user
>> gave before as to not send unencrypted password
Hi all,
in clean( ) we would like to set a field value. In particular: if there
are errors in a signup form, we'd like to delete the passwords to user
gave before as to not send unencrypted passwords back...
How can we do this?
Thanks!
-
Xin Xic wrote:
> Well, I want out a form for a human verification with an image and an
> input field. But I don't know how is the best practice for make this.
> How do you do it?
Try: http://smileychris.tactful.co.nz/ramblings/recaptcha/
de
, but! Why
reinvent the wheel :-)
cheerio,
- 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
)
is pretty bad.
Should I be looking at extra( ) or is there a smarter way to go about this?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
SmileyChris wrote:
>
> I did this yesterday:
> http://smileychris.tactful.co.nz/ramblings/recaptcha/
HOT Damn!!
Will try ASAP and report back.
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
aptcha = ReCaptchaField()
something_else = ...
which would get automatic Captcha checking.
An additional problem is that for the ReCaptchaField.clean() I need the
ip of the person who did the post. How can I pass this without making
the captcha a dynami
l.my_decimal_field ] )
doesn't work, although it did work before on the float field. Casting it
to float works again:
simplejson.dump( [ float(mymodel.my_decimal_field) ] )
I'm not sure if it's worth ticketing this...
- bram
--~--~-~--~~~---~--~~
Y
("0.0") is not JSON serializable
- 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 unsubscribe fro
things simpler. In all my models I have:
class Meta:
app_label = 'myapp'
Now I have one problem: my initial SQL isn't executed anymore.
any ideas?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribe
c = Context({'profile_content_type': ContentType.objects.get.})
t = Template(json )
return t.render(c)
-
I know that this kind of goes against what fixtures should be, but it
would be pretty flexible...
- bram
--~--~-~--~~
hi everyone,
how do I -in fixtures- explain a variable needs to come from another table?
I don't want to write "content_type: 15" as elsewhere!
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
erences (I think) etc etc. Using string
references for models ( models.ForeignKey('Something') ) works for
ForeignKeys, but does not work for ManyToManyFields.
I know we can split up into different applications, but we have done
that already, but our models.py is still t
omat wrote:
> Add a middleware class like this:
oh, duh!!
thanks a lot :-)
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
n...
Am I correct in assuming this is NOT possible w/out editing the django code?
- 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
kind of information in the database.
If anyone has *any* hints (as vague as u like) on how to do this, help
would be greatly appreciated.
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
r.email
# insert the field at the start of the fields
new_fields = self.fields.items()
new_fields.insert(0, ('from', from_field))
self.fields = SortedDictFromList(new_fields)
- bram
--~--~-~--~~~---~--~~
You received this m
ike to see this as:
From:
To:
Message:
Is there any way to explicitly order fields?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
ev??)?
If anyone has breakage with the newforms: it's now
form.cleaned_data
and
form.do_clean_*
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
y
but doing the query like this doesn't always work!
In my opinion there's only one easy solution which doesn't create
ridiculous overhead and that is to be able to add fields to the User
model without having to hack the actual code of the User model. Does
anyone agree with this?
James Bennett wrote:
> On 5/11/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>> there should be a clear way to trigger exceptions when non-existing
>> variables are added to the templates.
>
> Again, the reasoning is that it's be
com/ticket/2583
In all these places it might not be immediately apparent there's an
actual missing variable until you view the source. This is no good.
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
ning into another type of problem?
thanks!
- 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 unsubsc
out of date!
- bram, interested in buying :-)
--~--~-~--~~~---~--~~
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
ite a while to figure that out. I can't see anything unusual in your
> config though...
Oh, wow, thanks Dirk, that does the trick.
I had a DocumentRoot defined OUTSIDE of the vhost...
My apache is longer than what I copy-pasted.
Perhaps I should really switch back to usin
o!
We're going to try switching off EVERYTHING in the apache config and add
it back bit by bit to see what the hell is provoking this weird error.
I'll report back later!
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Malcolm Tredinnick wrote:
> On Thu, 2007-04-05 at 14:36 +0200, Bram - Smartelectronix wrote:
>> Hello everyone,
>>
>>
>> mod_python 3.3.1
>> apache 2.0.52
>> python 2.5
>> django trunk, updated 5 minutes ago
>>
>> I go to http:/example.
teful!
cheerio,
- 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 unsubscribe from this group, send email to [
Bram - Smartelectronix wrote:
> 2. in the profile I'm generating some data, for example, the user's
> avatar filename will use self.user.username to create the avatars path,
> which will do yet another query (select ... from auth_user)!
Replying -partly- to my own message, t
s
being fired, which is quite... excessive!
- 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
ce is a big issue.
Any hints, help or ideas offered would be superb.
- 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@googl
a count
> of all their children?
class A(models.model):
...
def get_num_children(self)
return A.objects.filter(parent=self).count()
?
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
d + 1
tmp, i1.field = i1.field, tmp
i1.save()
i1.field, i2.field = i2.field, tmp
i2.save()
i1.save()
ugly, but gets the job done...
- bram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&quo
Bram - Smartelectronix wrote:
> Rubic wrote:
>> Bram,
>>
>> Try removing (commenting out) the transaction decorator
>> and transaction.commit(), then re-run your code. The
>> ProgrammingError exception may be hiding the real
>> exception. At least that&
Rubic wrote:
> Bram,
>
> Try removing (commenting out) the transaction decorator
> and transaction.commit(), then re-run your code. The
> ProgrammingError exception may be hiding the real
> exception. At least that's been my experience.
Nope..., I'm really getti
get this sql into Django ORM:
>
> select created_at
> , amount
> , ...
> from sales
> where product_id = 1
> order
> by created_at desc
> limit 1
latest = Sale.objects.filter(product_id=1).order_by("-created_at")[0]
- bram
--~--~-
if second_item:
item.order, second_item.order = second_item.order, item.order
item.save()
second_item.save()
transaction.commit()
this seems like a textbook example of something where you need to start
a transaction, and I'
James Bennett wrote:
> On 3/7/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>> this is pretty much exactly what i had been looking for lately...
>
> It's also worth pointing out that Django includes a "striptags"
> template filter which strips
Bram - Smartelectronix wrote:
> Sam wrote:
>> I have translated Cal Henderson's lib_filter.php to python.
>>
>> If you need to filter your users HTML input, you might like it.
>>
>> http://amisphere.com/contrib/python-html-filter/
> one thing: perhaps i
perhaps it would be wise to create some unit tests for the
filter to see if it's actually doing what it's supposed to do?
thanks a lot for sharing this "some html is ok"!
- bram
--~--~-~--~~~---~--~~
You received this message because you are
1 - 100 of 145 matches
Mail list logo