Hi there,
I have a question on the site concept.
While reading the source code, I found that there is the site related
statement in django.contrib.auth.views.login:
if Site._meta.installed:
current_site = Site.objects.get_current()
else:
current_site =
Thanks Karen,
The codec should be utf8 not the server's locale.
Now I'm using the urlquote to quote the non-ascii characters as it is
not too important.
Hoping ticket 5361 solving this problem soon. :)
On 6月11日, 上午1时19分, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> 2008/
Hi there
I met a problem when I use django to handle a file upload request
while that file's name is in Chinese. The chinese part of the filename
is truncated, e.g. I could only get ".txt" while the input filename is
"汉.txt"
I use the following clean function
def clean_file(self):
if
>
> > request.FILES['resume']['filename'] = request.POST['empid'] + "_" +
> > request.FILES['resume']['filename']
>
> > Best,
>
> > R
>
> > On Tue, Apr 22, 2008 at 5:52 PM, PENPEN <[EMAIL PROTECTED]> wrote:
>
> > > How do you mean of changing reques
alue from request.POST in the view, and changing
> request.FILES there itself.
>
> Best,
>
> R
>
> On Sun, Apr 20, 2008 at 6:45 PM, PENPEN <[EMAIL PROTECTED]> wrote:
>
> > I defined such a model:
>
> > class Thing(models.Model):
> > photo =
I defined such a model:
class Thing(models.Model):
photo = models.ImageField(
upload_to='images/', blank=True, null=True)
Here is the form for this model:
class ThingForm(ModelForm):
class Meta:
model = Thing
Now it could handle the image upload request and save images
1. About select_related():
It is said that it will automatically "follow" foreign-key
relationships, selecting that additional related-object data when it
executes its query. So it is not applicable for ManyToMany
relationship, isn't it?
And if select_related() is used, will the queryset method
lumns. In terms of performance
> it's probably the same or close to it as the comparison is done on the
> database side.
>
> On Mar 31, 12:14 am, PENPEN <[EMAIL PROTECTED]> wrote:
>
> > I checked the transaction module of django. I think it could work.
> > But why do you p
I checked the transaction module of django. I think it could work.
But why do you prefer this version column solution? Does it have
better performance?
On 3月31日, 上午9时54分, meppum <[EMAIL PROTECTED]> wrote:
> I found this thread helpful.
>
>
Hi Carl,
I didn't mention to the syncdb of manage.py.
I'm talking about the problem that may happen when trying to access
the db.
Take a poll for exmaple. It may happen that 2 users vote at the same
time. A vote action is made in the three steps:
1. read the old counter
2. add the counter by 1
Does Django provide any method to handle the synchronization problems
with DB? How does it keep the DB's consistency in the multi-thread
scenario?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
Maybe it's a silly question.
I want that the error text could be in many languages. Take a survey
system I'm working on for example, it could support a survey in
English or in Chinese. So if a survey is created in Chinese, I think
it is not good to display the error messages in English. :(
But by
12 matches
Mail list logo