Hi Rob,
did you see the blog article
http://blog.uxebu.com/2008/07/26/ajax-with-dojango/
and the examples in
http://code.google.com/p/dojango/source/browse/trunk/dojango/views.py
tbh I don't really understand what you are using the JSON serializer for.
Could you may be explain, if the links abov
Hi Rob,
aehm, maybe what you were looking for was this:
@json_response
def send_toxids_list(request):
ret = Toxid.objects.all()
return to_dojo_data(ret, identifier='docno')
the json_response decorator takes care of extrcting only the
fields form the model, you dont have to do this
by ha
ram,
>
> You bet I've read your blogs! Wouldn't have gotten where I got to
> without them!
>
> Clearly I had missed the to_dojo_data(), that's exactly what I was
> looking for.
>
> This works super.
>
> Thanks a lot,
> Rob
>
> On Nov 1, 2008, at
Hi,
I remembered seeing this topic mentioned here,
and now there is a solution to it. http://code.google.com/p/dojango/
A quick summary of the main features of dojango:
* a reusable django app that provides dojo
* easy dojo setup inside django
* build an optimized dojo
* some he
Did you try dojango? http://code.google.com/p/dojango/
Dojango is a reusable django application that helps you to use the
client-side framework dojo within your django project.
* It provides capabilites to easily switch between several dojo
versions and sources (e.g. aol, google, local)
* Deliver
Hi devs in Munich,
we are a team of a couple django users and would be interested in
meeting up with other django/python/webX.X devs from around Munich (Germany).
So lets meet next thursday 14th June 2007, at 20:00
lets say there: http://tinyurl.com/36l4yf
Max Emanuel Brauerei, Adalbertstr. 33
T
I will reserve a table under my name "Kriesing" just ask for it and
you will find us.
cu there
Wolfram
On 6/5/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> Hi devs in Munich,
>
> we are a team of a couple django users and would be interested in
> meeting up wit
just to remind munich based django devs, see you tomorrow hoepfully
all the best
wolfram
-- Forwarded message --
From: Wolfram Kriesing <[EMAIL PROTECTED]>
Date: Jun 5, 2007 5:06 PM
Subject: Django meetup in Munich
To: django-users@googlegroups.com
Hi devs in Munich,
i found out that the admin site provides docs, which is pretty cool,
but the problem when clicking on a view-function that has a decorator
(no matter if it is login_required or transaction.*) I always get an
error page
below the link it says:
View function: django.contrib.auth.decorators._ch
after some investigation and help from the list i took this approach
and have to say it works great:
from django.utils import translation
@property
def name(self):
if translation.get_language()=="en":
return self.name_en
else:
return self.name_de
and i forgot, this allows you to access the property "name" of the
object anywhere seemlessly, in the template, in the code, etc. this is
pretty neat imho :-)
wolfram
On 7/25/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> after some investigation and help from the list i
we are doing the following pretty successfully:
inside settings.py
--
import local_config
DEBUG = local_config.DEBUG
TEMPLATE_DEBUG = local_config.DEBUG
LOG_LEVEL = local_config.LOG_LEVEL
DATABASE_ENGINE = local_config.DATABASE_ENGINE
DATABASE_NAME = local_config.DATABAS
the mentioned "local_config.py.default" is ONLY a template for
copying, its never really used.
wolfram
On 7/25/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> we are doing the following pretty successfully:
> inside settings.py
> --
>
>
That's a valuable info. To me it seemed some Django-standard and those
things are supposed to be well thought through, therefore we also
broke our heads over it a couple times ...
Thanks for the info.
Wolfram
On 7/25/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 7/24/07, Sebastian Macias
The Python UG is meeting in Munich (Germany) next tuesday, lets join them!
I hope to see some Django ppl!
"""
Das vierte Usertreffen in München findet am Dienstag, den 21.08.2007
statt. Zeitpunkt wäre 18:00 und der Ort ist Zoozie'z in der
Wittelbacherstraße 15. WLAN ist vorhanden, und das Pro
What about an extension to the Queryset like this:
User.objects.filter(username__istartswith="a").update(is_active=True)
it would trigger something like this:
UPDATE auth_user SET is_active=1 WHERE username LIKE "a%"
This syntax (if it existed) would solve the following problems
the cur
I have the standard setup, base.html and mytpl.html.
I have written a tag, that stores data into the context (inside the
render() method), now I try to read out this data in the base.html,
but they are not there.
Is the scope a different one?
Or is the execution order not mytpl.html and then base.
I have written a simple template filter, which resolves a little bit
of special syntax we allow to use inside a text, for example:
this is derived from item#123, and user#John has already contributed to it
we will convert "item#123" and "user#John" into links that point to
the given items a
I have a bi-language (english and german) site. I try to hide the
multi language part as best as I can from the programmer, by
encapsulating it as best as I can in the model.
An example:
class Tag(models.Model):
name_en = models.SlugField()
name_de = models.SlugField()
@property
def
just quickly skimming over, did you mean?
Author.objects.filter( Q(name='Jiri Barton') |
Q(article__title__icontains='revealed'))
On 5/15/07, Jiri Barton <[EMAIL PROTECTED]> wrote:
>
> Hi, why does not the following work?
>
> My simple model:
>
> class Author(models.Model):
> name = models.C
osnippets.org/snippets/51/
>
> Regards,
> Aidas Bendoraitis aka Archatas
>
>
>
> On 5/15/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> >
> > I have a bi-language (english and german) site. I try to hide the
> > multi language part as best as I can from
M, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
>
> Hi Wolfram,
>
>
> On Fri, 2007-11-23 at 14:05 +0100, Wolfram Kriesing wrote:
> > I got an alike problem, I ran through the docs, mailing lists, etc.
> > but no solution.
> >
> > I got:
> >
>
On Nov 23, 2007 2:41 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
>
>
> On Fri, 2007-11-23 at 14:30 +0100, Wolfram Kriesing wrote:
> > :-) yep we also discussed that here
> > still it seems "wrong" that it needs to be done with such a hacky way around
if len(args):
args[0] = copied
else:
kwargs['data'] = copied
forms.Form.__init__(self, *args, **kwargs)
wolfram
On Nov 23, 2007 2:05 PM, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I got an alike problem, I ran through t
ow-minded on my use case.
So I step back from splitting it up into clean() and validate().
Making available all the cleaned_data inside each clean_()
method is just what is needed!
thx for all the input and help!
Wolfram
>
> On Nov 23, 2007 8:59 AM, Wolfram Kriesing <[EMAIL PROTECT
ate data consistency with other
> fields
> ie i set the status to "assigned" only if there is a "resolution
> group" defined (business Form Level logic)
>
> But i had no time to test right now
>
> On Nov 23, 2:05 pm, "Wolfram Kriesing" <[EMAIL
I got an alike problem, I ran through the docs, mailing lists, etc.
but no solution.
I got:
class LinkForm(forms.Form):
TYPE_CHOICES = (
('user', _('User link')),
('url', _('Web link')),
)
type = forms.ChoiceField(choices=TYPE_CHOICES)
user = forms.IntegerField(re
What I am doing currently is:
class myForm(forms.Form):
url = forms.URLField( max_length=Link._meta.get_field('url').maxlength )
is this really the django-way to pass the maxlength into the form,
when i build the form by hand?
looks pretty dirty
--
cu
Wolfram
--~--~-~--~-
:-) yep we also discussed that here
still it seems "wrong" that it needs to be done with such a hacky way around
wolfram
On Nov 23, 2007 2:28 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
>
> Hi Wolfram,
>
>
> On Fri, 2007-11-23 at 14:05 +0100, Wolfram Kri
_after_ every
single field had been cleaned
4) call Field.validate() - use the cleaned data to validate the fields
5) call Form.validate_()
6) call Form.validate()
looks cleaner in my eyes. opinions please!
wolfram
On Nov 23, 2007 2:45 PM, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
>
On Nov 23, 2007 3:28 PM, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 11/23/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> > looks cleaner in my eyes. opinions please!
>
> In my opinion, you're asking for a lot of custom behavior from a
> default field
really good idea.
I will add constants to the model-classes and refer to them via the
model.FIELD_MAX_LENGTH
thx
Wolfram
On Nov 23, 2007 11:59 PM, leotr <[EMAIL PROTECTED]> wrote:
>
> Yes, not only it's dirty but it's ineffective as well!
>
> Declare a constant somewhere and use it in bot
Please whitelist me so i can add tickets!
I needed to deactivate the cascading delete, since my db does it
itself and in one case I just wanted to handle it manually.
Example usage:
{{{
class PicThumbnail(models.Model):
id = models.IntegerField(primary_key=True, db_column='pic_id')
s
Is this patch something useful then?
On 11/2/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 11/2/06, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> > I needed to deactivate the cascading delete, since my db does it
> > itself and in one case I just wanted t
>From the frontend I trigger via AJAX a view that again starts a thread
that does some import work, that might take quite a while. This
enables the user to keep going and have the import run without
interrupting him/her. Every once in a while an asynch call checks on
the state of the import.
And
I think I found out that the connection is the same for both threads,
I think that causes the problem. I will try some more but I am not
sure if I am on the right path at all :-)
On 11/30/06, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> From the frontend I trigger via AJAX a view t
next incoming
request closes it ...
but i will also find that out :)
On 12/1/06, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I think I found out that the connection is the same for both threads,
> I think that causes the problem. I will try some more but I am not
> sure if I am on
Btw I found the problem ...
details are here
http://wolfram.kriesing.de/blog/index.php/2006/multithreading-with-mysqldb-and-weakrefs
On 12/2/06, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> django/db/__init__.py contains
> dispatcher.connect(connection.close, signal=signals.requ
I realize very often, that I have to decide between using the object
(s) i.e.
Pic.objects.get(id=1)
or the dict that values() returns me, see
Pic.objects.get(id=1).values()
I have to decide either/or because sometimes I have some additional
data,
I want to add to the dict, before pas
> What is the best way to create a queryset for this without doing tons
> of if statements, like:
>
> if request.GET['first_id']
> if request.GET['second_id']
> if request.GET['third_id']
> queryset =
> Resource.objects.filter(first__id__exact=request.GET['first_id'],
> sec
>> I realize very often, that I have to decide between using the object
>> (s) i.e.
>> Pic.objects.get(id=1)
>> or the dict that values() returns me, see
>> Pic.objects.get(id=1).values()
>>
>> I have to decide either/or because sometimes I have some additional
>> data,
>> I want to add
anyone experiencing that too?
I had the following problems with the default json encoder that is
suggested to use:
* cant handle Decimal
* ignores properties that are not fields, it only encodes the fields
(but i often add more properties to the object for passing to the
template)
* has problems
I know I had read it here a while ago, but I cant find it.
So what was the ORM way of doing a
UPDATE table SET col=col+1
?
--
thx
Wolfram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
so there is no one query solution, ok. thx
On 1/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> object = Model.objects.get(pk=x)
> object.col += 1
> object.save()
>
> On Jan 26, 11:54 am, "Wolfram Kriesing" <[EMAIL PROTECTED]>
> wrote:
>
I successfully used inspectdb to create my initial models from a MySQL
DB, I had to tweak it a bit but in general I was quite happy. Tweaking
was esp. necessary for the auto-increment fields, which were generated
as IntegerField() but should have been AutoField(). But that was just a
side note.
D
I am using mysql5 and views, how can i create the django models with
n:m relationships?
I got a "viewA" (my db-view) that represents just a portion of
"tableA", and "tableA" has a ManyToMany relation to "tableB", if i
define the model for the view and use ManyToManyField(tableB) i cant
query it,
46 matches
Mail list logo