> On Jun 29, 4:01 pm, Stephen Cheng <stephenchengm...@gmail.com> wrote:
>
> > Yes, I check thecookievalue in view or in middleware class.
>
> > Just give example, eg, I want the browser to remember online user's
> > city, so next time when they typewww.mydomain.com, it
ies are sent only when the request reaches
> the server.
>
> -- Raja
>
> On Jun 29, 9:21 am, Stephen Cheng <stephenchengm...@gmail.com> wrote:
>
> > Hi
>
> > I am facing a problem in DEV server that I really have no idea how to
> > resolve, which
I suppose that all the fields' value in the form defined in model can
be captured and remained when/after you do form validation. My problem
is that :
1. When the form is not valid, the filename of image field is gone
once you click submit or
2. If I intend to do something else once all fields
No bother, I have found the solution. Simply use the ContextProcessor.
On May 7, 10:27 pm, Stephen Cheng <stephenchengm...@gmail.com> wrote:
> I have got a case like this: I have a drop down list of value of 8
> cities which requires a db query every time when every page loads. T
I have thought this for quite a while and no idea so far. I like the
forms/pages auto generated by Admin engine, but I also want to
incorporate some of the forms/pages into my site with following
expectations:
1. I can use my own template.
2. use my own template and also use the context
I have got a case like this: I have a drop down list of value of 8
cities which requires a db query every time when every page loads. The
problem is when the url is diverted to django-registration module,
then I don't know how to properly pass the citylist as a context value
to
I am wondering how to get distinct values for a ForeignKey field
For example:
class ModelA(models.Model):
.
city=models.ForeignKey(City)
I understand that I can pass the list to template than probably use
regroup and get the group values, but is there a
Sorry about the silly question. This is resolved. All are documented:
http://docs.djangoproject.com/en/dev/ref/forms/validation/#using-validation-in-practice
Thanks for your help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
price))+len(self.clean_title())> 10:
raise forms.ValidationError("The length of title plus
price should
be less than 10 characters")
return price
class Meta:
model=Card
On Oct 9, 10:26 pm, Malcolm Tredinnick <[EMAIL PROTECTE
I defined a field title in model the max length is 30
title=models.CharField("Title",max_length=30)
while after I key in none - english characters, eg, Chinese and submit
the form, it [database] can only take 10 Chinese characters,otherwise
raise an exception.
I also use an validation rule in
Hi django friends
I got a problem with varible reference in template. the case is like
this:
I pass a map to a template, I am trying to get map[key], in the case
the key= modelA.id, then I have to use map.modelA.id, then it won't
work.
How can I conquer this? Can I assign modelA.id to another
the process,
it's just working fine now :)
Hope this help some others.
On Jun 2, 12:32 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Sun, Jun 1, 2008 at 2:41 AM, Stephen Cheng <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Hi Guys
>
> > Thi
I got exception in admin page when I input chinese character into one
field and try to save to db. I am not sure which lib I should install
to make it work or any configure I should enable.
Any advice?
UnicodeEncodeError at /admin/books/author/add/
'ascii' codec can't encode characters in
Hi Guys
This is a very strange problem and I haven't resolved it. Dev Web
server just crash with a python.core dump and no exception log at all.
Problem occurs when you go around the Admin page, either refresh page,
add record, delete record. Now I can reproduce it by keeping refresh
the admin
14 matches
Mail list logo