Hi there!
Is there a way of customizing handler404 for a different apps of the
project? That is - I have one app for a client part and one more for a
admin part and certainly they should have different designs at all.
--~--~-~--~~~---~--~~
You received this message
On Apr 27, 10:41 pm, Malcolm Tredinnick
wrote:
> > Reading the part "Performance considerations" got me in the right
> > direction but didn't help me very well, because if you do it like
> > that, it will still do a subselect.
>
> That's a documentation bug. There should be a list() call wrapped
On Apr 26, 6:58 pm, Will Hardy wrote:
> I would allow the multiple submissions, but make a note of any IP
> addresses to let you exclude the data in the analysis stage. From
> memory the following "meta" variables might be relevant:
> HTTP_CLIENT_IP, REMOTE_ADDR, HTTP_X_FORWARDED_FOR comma sep
On Tue, Apr 28, 2009 at 12:31 PM, James Bennett wrote:
>
> On Mon, Apr 27, 2009 at 10:49 PM, Tamas Szabo wrote:
>> I'm new to Python so I might not understand how keyword arguments work, BUT
>> you do assume that authenticate will always be called with keyword
>> arguments which isn't true.
>
>
On Mon, Apr 27, 2009 at 9:12 PM, Renato Untalan wrote:
>
> Hey guys,
>
> In my current project, I'm making a soap call to a remote server,
> which will return to me a Django template.
> Once I have the Django template, I insert it into my Context object,
> and when it renders, it renders the temp
In one of my forms I've declared a MultipleHiddenInput(), like this:
self.fields['tiles'].widget = forms.MultipleHiddenInput()
In my model, tiles is a manyToMany field. When I get the POST from
this form, I find that the has_changed() function returns true for the
form due to this 'tile
On Mon, Apr 27, 2009 at 10:49 PM, Tamas Szabo wrote:
> I'm new to Python so I might not understand how keyword arguments work, BUT
> you do assume that authenticate will always be called with keyword
> arguments which isn't true.
If you look at how django.contrib.auth.authenticate is implemented
Hi Carl,
On Mon, Apr 27, 2009 at 10:14 PM, Carl Meyer wrote:
>
> Hi Tamas,
>
> On Apr 23, 3:25 am, Tamas Szabo wrote:
>> For example if I have a Token based authenticator
>> (authenticate(token)) that is configured to be after my User/Password
>> based authenticator (authenticate(user, password
I've tested with `django.db.connection` and `pysqlite2` in python and
the sqlite3 prompt, all work as expected. Only using `extra()` with
both `select` and `select_params` doesn't work.
I've opened up a ticket [1] for this. After discussion with Alex
Gaynor on IRC, it looks like the problem is th
Hey guys,
In my current project, I'm making a soap call to a remote server,
which will return to me a Django template.
Once I have the Django template, I insert it into my Context object,
and when it renders, it renders the template in plain text, and does
not show any of the HTML tags.
My conte
Reading back through I might still not have explained simply enough.
I have a VehicleSearch Model with a m2m to Vehicle and a FK to User. I
want to be able to notify the user that has the VehicleSearch object
when a vehicle inside of the m2m has been added or updated.
I'm looking for the best wa
> In your save method, if self has a value for 'id' we know it already
> exists in the database. We can therefore use that id to get another
> instance with that ID, fresh from the database. This will have the
> *old* values. We can therefore iterate through the attributes of both
> the new and ol
It depends if you are running under the dev server or not. If you are then
yes, you need to add that path to your urls to serve as static files. I fyou
are running under apache then you should be letting apache handle serving
static files. Have a look at the documentation on apache deployment to se
It turned out to be a problem with how I was formating my wordpress urls.
Sorry for the post, thanks for the help! I'm sure LocationMatch will be
helpful soon :)
On Mon, Apr 27, 2009 at 12:38 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Mon, 2009-04-27 at 12:25 -0700, keegan3d
On Mon, 2009-04-27 at 13:11 -0700, julianb wrote:
[...]
> In my code, I just used a queryset as parameter for __in and in
> previous Django versions it would evaluate to a list of numbers
> whereas now it does a subselect. I don't think that's very backwards
> compatible.
It's fully backwards com
Hi,
On Apr 27, 5:12 pm, Lakshman Prasad wrote:
> I managed to successfully use the second app (appengine-patch). Thanks.
>
> > but there has not been any visible activity
> > on 1)app-engine Django since about August 08
>
> Altho' there hasn't been a release, there has been continuous (weekly)
>
On Apr 24, 6:05 pm, Karen Tracey wrote:
> I'd start by using a couple of Python shells (one using 1.0.2 and one using
> 1.1 beta) and connection.queries to see if you can see the difference in SQL
> generated for whatever model queries your view is using:
>
> http://docs.djangoproject.com/en/dev/
On Monday 27 April 2009 21:17:44 Malcolm Tredinnick wrote:
> On Mon, 2009-04-27 at 21:11 +0200, Emmanuel Surleau wrote:
> > On Monday 27 April 2009 20:12:13 karl wrote:
> > > > Apologies in advance, I'm sure this query pops up regularly.
> > > >
> > > > I'd like to replace the default User class w
Hi,
I am writing some tests for an application I am developing, in my test
case's setUp I do
self.dummy1 = User.objects.create_user('dummy1', 'n...@example.com',
self.c = Client()
self.c.login(username='dummy', password='dummy')
In one of the tests I POST some data and then check that the
respon
On Mon, 2009-04-27 at 12:25 -0700, keegan3d wrote:
> I'm having trouble getting django to ignore my blog urls.
>
> I run wordpress from /blog, and django from /. /blog is working, but
> if I try to navigate to anything deeper django takes over.
>
> http://inscopeapps.com/blog/ - works
> http://i
I'm having trouble getting django to ignore my blog urls.
I run wordpress from /blog, and django from /. /blog is working, but
if I try to navigate to anything deeper django takes over.
http://inscopeapps.com/blog/ - works
http://inscopeapps.com/blog/wp-django/ - does not work
I set this in the
On Mon, 2009-04-27 at 21:11 +0200, Emmanuel Surleau wrote:
> On Monday 27 April 2009 20:12:13 karl wrote:
> > > Apologies in advance, I'm sure this query pops up regularly.
> > >
> > > I'd like to replace the default User class which comes with Django's
> > > authentication system (for my applicat
Treebeard is another option.
http://code.google.com/p/django-treebeard/
I'm sure between mptt or treebeard, you'll find something suitable.
R.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
On Monday 27 April 2009 20:12:13 karl wrote:
> > Apologies in advance, I'm sure this query pops up regularly.
> >
> > I'd like to replace the default User class which comes with Django's
> > authentication system (for my application, users login via
> > email/password, not login/password, so it's
I am receiving this error when requesting a pdf file that was uploaded
in admin using FileField
Page not found (404)
Request Method: GET
Request URL:http://127.0.0.1:8000/site_media/pdf/Alg_.pdf
The settings file:
MEDIA_URL = 'http://127.0.0.1:8000/site_media/'
the models file:
in
I have a model with a ForeignKey to another model. Is it possible to
filter the HTML select list for the foreign object from a view?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
Hi,
i've been using django-db-log for logging exceptions when
Debug=False, and I'd like to add the ability to log the local
variables as well. Here is what I tried:
def process_exception(self, request, exception):
local_vars = repr(exception.tb_frame.f_locals.items())
however, tb_frame
> Apologies in advance, I'm sure this query pops up regularly.
>
> I'd like to replace the default User class which comes with Django's
> authentication system (for my application, users login via email/password, not
> login/password, so it's not only a matter of adding fields).
>
> Is there an e
On Mon, Apr 27, 2009 at 11:27 AM, Alex Gaynor wrote:
> The issues if the method, it's nonsensical and doesn't correspond to
> anything(you are instantiating models.Model with save as the first
> argument), in Python the correct way to call the parent class's method is:
>
> super(MyClass, self).s
With my ubuntu I can’t type @
So I can’t do :
export PYTHONPATH=/path/to/your/django/checkout
to the directory I was using which was
pubu...@pubuntu:~/djsite/mysite$
so I thought I’d use /usr/share/bob because it has no @
but that doesn’t work either:
+ svn co http://code.djangoproject.com/svn/d
On Mon, Apr 27, 2009 at 1:24 PM, Adam Olsen wrote:
>
> I've got two models, something like this:
>
> class Category(models.Model):
>name = models.CharField(max_length=60)
>
> class Product(models.Model):
>sku = models.CharField(max_length=20)
>categories = models.ManyToManyField(Categ
I've got two models, something like this:
class Category(models.Model):
name = models.CharField(max_length=60)
class Product(models.Model):
sku = models.CharField(max_length=20)
categories = models.ManyToManyField(Category)
I want to overload the save method to automatically add cer
On Mon, Apr 27, 2009 at 10:40 AM, bconnors wrote:
> [snip stuff related to removing old Django level]
> I found that my site/packages is in /usr/lib/python2.5/site-packages
> and in that directory I did
> pubu...@pubuntu:~/djsite/mysite$ cat dj
> svn co http://code.djangoproject.com/svn/django/tr
Thanks Malcom...
Simply adding values() to the query with author and title to the
search worked perfectly in limiting the SQL DISTINCT criteria to the
relevant fields,
Using...
results = Titles.objects.values('author','title').filter(qset).order_by
().distinct()
Django provides this elegant an
On Mon, 2009-04-27 at 08:09 +0200, Emmanuel Surleau wrote:
> Hello,
>
> Apologies in advance, I'm sure this query pops up regularly.
>
> I'd like to replace the default User class which comes with Django's
> authentication system (for my application, users login via email/password,
> not
> lo
On Mon, 2009-04-27 at 08:51 -0700, NoviceSortOf wrote:
>
> Thanks for the as_sql() function as can now can
> see the SQL detail. Which reveals a problem in
> getting DISTINCT to draw from a fields or fields that can in fact
> return the unique result of the query. Perhaps it is my usage
> of the
Thanks for the as_sql() function as can now can
see the SQL detail. Which reveals a problem in
getting DISTINCT to draw from a fields or fields that can in fact
return the unique result of the query. Perhaps it is my usage
of the function so I'm listing an examble
below.
To further simplify my e
Hey Jorge,
> The relation disappears when (existing a relation) y use this modelForm
> without including any info for the friends field (I don't what to edit this
> information at this point). At this moment, django erases the relation
> within A an B because wasn't explicit declared and the form
I managed to successfully use the second app (appengine-patch). Thanks.
> but there has not been any visible activity
> on 1)app-engine Django since about August 08
Altho' there hasn't been a release, there has been continuous (weekly)
activity even in the earlier helper project.
http://code.goog
I did :
apt-get remove python-django
then
pubu...@pubuntu:~/djsite/mysite$ sh -x lk1
pubu...@pubuntu:~/djsite/mysite$ dpkg -l python-django
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/
T-pend
|/ Err?=(none)/Hold/Reinst-required/X
Ok, I'm going to use string (like: items_{{ data.id }})
Thanks.
regards.
On 26 Kwi, 21:31, Malcolm Tredinnick wrote:
> On Sun, 2009-04-26 at 10:20 -0700, eli wrote:
> > Hi,
>
> > I have problem:
> > In my template, I have some inputs with multiple name like:
> > > value="{{ data.name }}" />
>
Hello Rubens,I have similar problems months ago.
In my application there is a ManyToMany relation within two classes (A and
B) let's name the relation as "friends".
The application works fine but in unpredictable situations rows from the
auxiliary table that makes the relation disappears randomly.
Hi Tamas,
On Apr 23, 3:25 am, Tamas Szabo wrote:
> For example if I have a Token based authenticator
> (authenticate(token)) that is configured to be after my User/Password
> based authenticator (authenticate(user, password)) in settings.py the
> current code will call the user/password based au
Modified Preorder Tree Traversal (mptt)
http://code.google.com/p/django-mptt/
On Mon, Apr 27, 2009 at 9:52 AM, joker wrote:
>
> how can i use unlimited category?
>
> like
>
> category1
>subcategory1-1
> subcategory1-1-1
> subcategory1-1-2
> subcategory1-1-3
>
how can i use unlimited category?
like
category1
subcategory1-1
subcategory1-1-1
subcategory1-1-2
subcategory1-1-3
subcategory1-1-3-1
subcategory1-1-3-2
subcategory1-2
category2
subcategory2-1
subcategory2-2
--~--~--
Russ,
Thanks fo the reply!
> The only thought I have is that you appear to be using a pre-existing
> table to manage the m2m relationship, rather than the default produced
> Django table. This shouldn't pose a problem, but it does lead me to
> wonder if there is some other process that could be
Hi Malcolm,
>> class BidirectionalField(models.ManyToManyField):
>> def __init__(self, *args, **kwargs):
>> super(BidirectionalField, self).__init__(*args, **kwargs)
>> self.creates_table = False
> BY the way, this has been discussed in the past and is really the wrong
> way
On Apr 27, 10:08 am, JK Laiho wrote:
> Something I don't know how to do in an elegant fashion:
>
> Given a model instance that already exists in the database and is
> about to be updated (i.e. some columns of the DB row are changed), is
> there a way for the instance's save() method to see what f
Thanks for your feedback Malcolm. I will try to test without Django
tomorrow.
Since my original post I have noticed that inserting my params
directly into the `select` argument with the string formatting
operator works, but passing them in with the `select_params` argument
causes a failure as des
On Sun, Apr 26, 2009 at 11:26 PM, Malcolm Tredinnick
wrote:
>
> On Sun, 2009-04-26 at 19:41 -0700, Chris wrote:
>> On Apr 26, 7:40 pm, Alex Gaynor wrote:
>> > On Sun, Apr 26, 2009 at 7:39 PM, Chris wrote:
>> >
>> > > I've noticed a Redirect/Get is issued automatically after every Post
>> > > ma
Something I don't know how to do in an elegant fashion:
Given a model instance that already exists in the database and is
about to be updated (i.e. some columns of the DB row are changed), is
there a way for the instance's save() method to see what fields have
been changed?
I'm writing an app wh
Hi.
I haven't used Django with mysql, but judging from your error
it sounds like you haven't created the database in mysql. Django
probably cannot create a db like it can when you use sqlite, as it's
only a file anwyays. So you need to use your mysql tool
phpmyadmin or whatever you use and create
Hi guys,
I'm working on the tutorial on www.djangobook.com.
I've created a database using "manage.py starapp books" then i
modified the "models.py" file to include classes where each class
represents a column in the database. then i modified the "settings.py"
file to include the following:
DATAB
Hello,
I'm trying to populate an ImageField with the content of an image from
it's url. I'm trying with the following code :
---
# image_uri is the URL of my image
# new_photo.photo is the ImageField field of my new_photo instance
current_file = File(urllib.urlopen(image_uri))
current_fi
Hello,
Apologies in advance, I'm sure this query pops up regularly.
I'd like to replace the default User class which comes with Django's
authentication system (for my application, users login via email/password, not
login/password, so it's not only a matter of adding fields).
Is there an easy
Hi all
Is there any analog of SQL trim() function in SELECT query?
I need to remove spaces in strings.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
56 matches
Mail list logo