Strange behavior when the method is POST:
code:
def view_method_start(request):
if has_error:
return HttpResponse("Something")
if request.method=='POST':
new_data = request.POST.copy()
new_data.update(request.FILES)
... process ...
return HttpRespo
Russell Keith-Magee wrote:
table1.objects.filter(table2_attribute_name.field='foo')
Did you mean
table1.objects.filter(table2_attribute_name__field='foo')
(i.e. '__' instead of '.')?
--~--~-~--~~~---~--~~
You received this message because you are subscri
I'm talking completely about the related objects accessors, and not
sending models to the templates is not a good solution for us :)
I want to setup some kind of blocking mechanism so that while rendering
a template the models will not do any SQL queries that have not already
been executed, or a
On 1/8/07 4:53 PM, Adrian Holovaty wrote:
Templates don't have the "ability to execute SQL" -- it just happens
that the Django database API executes SQL via attribute access in some
cases (e.g., in the case of related objects via a foreign key) and I
assume you're using that attribute access in
Make sure if you have django/core directory correctly installed.
Also note that some tools, including rsync, excludes files named CVS, RCS,
.svn, core and so on automatically.
temnoregg wrote:
trying to solve the for couple of hours with no success:
Mod_python error: "PythonHandler django.
On 1/9/07, leanmeandonothingmachine <[EMAIL PROTECTED]> wrote:
the sql I want is: select * from table1 INNER JOIN table2 where
table1.id = table2.table1_id AND table2.field = 'foo'
table1.objects.filter(table2_attribute_name.field='foo')
where table2_attribute_name is the name of the Foreign
I have 2 models, table1 and table2 table2 has a foreign key to table1.
How djagno do a inner join with an instance of table1?
the sql I want is: select * from table1 INNER JOIN table2 where
table1.id = table2.table1_id AND table2.field = 'foo'
but I want to use the table1 object: foo = table1.o
trying to solve the for couple of hours with no success:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line
287, in HandlerDispatch
log=debug)
File "/usr/lib/python2.5/site
On 1/8/07, gkelly <[EMAIL PROTECTED]> wrote:
Please have a look at the code at:
http://dpaste.com/4503/
I am having a problem with a widget's render method not being called
from a template. I'm not sure if this is the intended way to render a
widget when manually placing them in a template, ra
Please have a look at the code at:
http://dpaste.com/4503/
I am having a problem with a widget's render method not being called
from a template. I'm not sure if this is the intended way to render a
widget when manually placing them in a template, rather than using
something like {{ form.as_p }
On Mon, 2007-01-08 at 06:41 -0800, Hans.Rauch wrote:
I have a class like this
class dms_itemForm ( forms.Form ) :
title = forms.CharField(label='Überschrift')
If this form is rendered, I see "Überschrift" instead of
"�berschrift".
Any hints?
Use a Unicode string and use t
I posted a message on django-developers since I think that is a more
common place for discussions to changes in django itself and Russ McGee
responded there:
http://groups.google.com/group/django-developers/browse_thread/thread/4cbc121bba0c134e
Here is the tail end of that response. I suggest f
On 1/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
It is hell optimizing content when you don't know where some of the
queries are executing from, and if I was missing information, it'd be
much easier to see that, than it would be to see that I've got X query
executing in X template.
The
On 1/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'm petition this as a core change, if nothing else, I'm seeking advice
on how to go about it.
I do *not* like templates having the ability to execute SQL. If I don't
have the data once its past my view (as this is MVC, control doesnt
need
On 1/8/07, Hans.Rauch <[EMAIL PROTECTED]> wrote:
I have a class like this
class dms_itemForm ( forms.Form ) :
title = forms.CharField(label='Überschrift')
If this form is rendered, I see "Überschrift" instead of
"Überschrift".
If you want to display "Überschrift" instead o
We have a project that we need to ramp up for quickly, so we are are
for someone who can build a new public facing web application for us
over the next 3-6 months, and help deliver improvements and new
features on a potentially ongoing basis afterwards.
If you have a development shop, an existin
We are planning to develop a new public facing web application. We are
looking for a development team that can help us get up to speed quickly
to develop the application over a 3-6 month time frame, and then
deliver regular updates and feature additions.
We haven't made platform or technology d
I'm petitioning this as a core change, if nothing else, I'm seeking
advice
on how to go about it.
I do *not* like templates having the ability to execute SQL. If I don't
have the data once its past my view (as this is MVC, control doesnt
need to get the data, it just needs to control it), I don'
I have a class like this
class dms_itemForm ( forms.Form ) :
title = forms.CharField(label='Überschrift')
If this form is rendered, I see "Überschrift" instead of
"Überschrift".
Any hints?
Hans
--~--~-~--~~~---~--~~
You received this message
I'm petition this as a core change, if nothing else, I'm seeking advice
on how to go about it.
I do *not* like templates having the ability to execute SQL. If I don't
have the data once its past my view (as this is MVC, control doesnt
need to get the data, it just needs to control it), I don't w
Search Profiles - FREE! Intimate Dating. Start Chatting within seconds
- http://surl.in/HLMAT238206SVRAKSX
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to
Just to put some more info here. In the process of working on this, I
found that sqllite has some problems with decimals too (definitely on
windows, not sure of Linux). I had to apply the patch in ticket #2519
to get it working-
http://code.djangoproject.com/ticket/2519
Basically sqllite has p
We had a similiar issue with Postgres + Mod_Apache, so I don't think Twisted
& MySQL is related. What we found we had to do:
cursor = connection.cursor()
cursor.execute("UPDATE blah blah SQL blah")
transaction.commit_unless_managed()
I never spotted the transaction.commit_unless_ma
Ramdas S wrote:
One question, validators are supposed to get deprecated once the new forms
becomes the default.
How do we use the newforms validation to do this?
Hmm. I actually rather liked django.core.validators.
My guess is that it's not currently possible to predict how this will be
done
We used last_login, but I recall that we had to explicitly update the field
within our own login code for that to have relevant dates. We have a fairly
long persistent session, so we ended up including some additional time
stamps in our code (though another model) to keep track of the last time
so
Download Free ScreenSavers and Wallpapers! -
http://surl.in/HLSCR238206SVRAKSX
--~--~-~--~~~---~--~~
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.co
On 1/8/07, Rob Slotboom <[EMAIL PROTECTED]> wrote:
Given this save function in one of my models, I want to display an
error message in admin instead of a errorpage.
This code needs to be a custom validator attached to the field, rather
than being in the 'save' method; once you're at the point
Given this save function in one of my models, I want to display an
error message in admin instead of a errorpage.
def save(self):
try:
cur_id = int(self.id)
except:
cur_id = 0
p_list = self._recurse_for_parents(self)
cats = Category.objects.filter(folder__ex
I have the same problem. If you look at this page
http://portal.bildung.hessen.de/service/etc/gaestebuch/manage_addZecomGuestbookItemForm?gui=2
and move the cursor over "...?", the help is shown in popup-windows.
If the forms.Field could be extended with one more parameter "..,
help=None)", I
Gulopine wrote:
Yeah, I guess I see the biggest obstacle here is the simple fact that
the ManyToMany manager is generated each time it's referenced, rather
than persisting on the model. I can replace the add() method of the
generated manager to get it to work immediately, but the next time I
ret
James Bennett wrote:
However, in your specific case I wonder if it wouldn't be better to
just have a separate settings file
Another approach (simpler in my view) is to have a middleware like this:
class EmergencyMiddleware:
def process_request(request):
return render_to_resp
Yeah, I guess I see the biggest obstacle here is the simple fact that
the ManyToMany manager is generated each time it's referenced, rather
than persisting on the model. I can replace the add() method of the
generated manager to get it to work immediately, but the next time I
retrieve the manager
I did something like that, but it´s not very generic:
see http://groups.google.com/group/django-developers/browse_frm/
thread/dc0e4a9d6ad02ea3/
patrick
Am 08.01.2007 um 10:34 schrieb [EMAIL PROTECTED]:
I see quite a few posts on the elusive "order_with_respect_to" meta
attribute. I impleme
I see quite a few posts on the elusive "order_with_respect_to" meta
attribute. I implemented a drag-and-drop version of this for a PHP app
I was building, but I was wondering if anyone's made any effort to
create one for Django. The behavior I'm looking for is something
similar to what I made he
James Bennett wrote:
On 1/8/07, Robin Becker <[EMAIL PROTECTED]> wrote:
Is there any obvious way to get the dispatch mechanism to behave
differently
under specific circumstances?
Not too long ago, there was some new functionality checked in to trunk
which allows you to tell Django to use a
On 1/8/07, Robin Becker <[EMAIL PROTECTED]> wrote:
Is there any obvious way to get the dispatch mechanism to behave differently
under specific circumstances?
Not too long ago, there was some new functionality checked in to trunk
which allows you to tell Django to use a different URLConf on a
p
Is there any obvious way to get the dispatch mechanism to behave differently
under specific circumstances?
We have a site where the clients can enter live data, but when we want to
upgrade code/fix bugs etc we would like them to be locked out and a road up page
to be shown instead.
Assumin
Many thanks to both Russ Magee and Andrew Durdin - all is now clear. I
will, as you suggest, try to come up with a passage that could be added
to the tutorial to clarify the ideas.
Seeing as it was I that had the problem I might be best suited to write
such a passage drawing on the contents of th
Lets try that again.. this time without the accidental hit on the send button.
On 1/6/07, paulh <[EMAIL PROTECTED]> wrote:
The subject is a phrase cut from one of the Django tutorials. In this
tutorial the authors say that after successfully processing POST data
you should return an HttpRespon
On 1/6/07, paulh <[EMAIL PROTECTED]> wrote:
The subject is a phrase cut from one of the Django tutorials. In this
tutorial the authors say that after successfully processing POST data
you should return an HttpResponseRedirect and that this will prevent
the user using the back button and taking
Filipe Correia wrote:
Just for the record, I would also be very interested in this!
Yes, it would be *really* great to have this software available! :-)
Regards
-Stephan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
paulh wrote:
This thread seems to have drifted away from its original purpose. The
tutorial authors seemed to have an idea about preventing the reposting
of data by use of a suitable redirect. I stated that I had been unable
to achieve this effect and asked whether anyone else had been able to
a
This thread seems to have drifted away from its original purpose. The
tutorial authors seemed to have an idea about preventing the reposting
of data by use of a suitable redirect. I stated that I had been unable
to achieve this effect and asked whether anyone else had been able to
achieve it. The
One question, validators are supposed to get deprecated once the new forms
becomes the default.
How do we use the newforms validation to do this?
Ramdas
On 1/8/07, Brian Beck <[EMAIL PROTECTED]> wrote:
>
>
> Couple more things I discovered...
>
> This page documents a RequiredIfOtherFieldsNo
44 matches
Mail list logo