DJANGO timezone.now is diffefent to datetime.now after we set the timezone config in setting.py

2018-01-18 Thread Lau Louis
Hi I am confused about the timezone setting. I have my OS timezone set to 'Asia/Shanghai', and my MYSQL/Mariadb is also using 'Asia/Shanghai' timezone. So i tried to configure the timezone in DJANGO settings.py LANGUAGE_CODE = 'en-us' TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = T

I need ur help.

2015-06-05 Thread Wandy Lau
I am new to django. I want to write some templates for my app. And write it. But It is seems not loaded. The structure of the template is below: mysite/templates/admin is for overriding the admin mysite/myapp/templates/myapp/* is for my app. So far it works well. But it just loads the template

Re: makemessages failing to extract all strings from Javascript

2010-12-07 Thread Lau
I'm still struggling with the javascript translation problem, so it seems like I'm forced to pull it out of the project I'm working on. If anybody has any input I'm still interested. -Lau On Nov 24, 3:39 am, Lau wrote: > I'm having some trouble with makemessa

makemessages failing to extract all strings from Javascript

2010-11-23 Thread Lau
imes it just breaks out of the whole file with no further processing. So I'm not entirely sure what the makemessages command is supposed to be doing ("converting" the javascript to python and running xgettext on it as if it were perl?). Any clarification on this would be great, thanks

when my url contains utf-8 characters such as chinese, it's occurs an UnicodeEncodeError

2009-11-23 Thread VespertineR Lau
when my url contains utf-8 characters such as chinese, it's occurs an UnicodeEncodeError: UnicodeEncodeError at /upload/snap/屏幕快照_2009-11-19_下午09.54.12.png 'ascii' codec can't encode characters in position 39-42: ordinal not in range(128) Request Method: GET Request URL: http://192.16

Recommendation of wiki plugin

2009-05-04 Thread Ben Lau
Hi, I am building a website that will hold on google app engine. The website need a wiki module, but there have few django wiki module available. Could somebody recommend a one for use? That is my requirements: - Able to upload file - No anonymous editing - History tracking. Able to check who

Re: Implement file upload in admin interface

2008-11-30 Thread Ben Lau
hi, It is mush easier then my approach. Thanks a lot! On Fri, Nov 28, 2008 at 9:28 PM, redbaron <[EMAIL PROTECTED]> wrote: > > > My current solution is. > > 1. Define new model Batches: > > class Batches(models.Model): > batchfile = model.FileField(upload_to="noop") > > 2. In admin.py define ne

Re: Implement file upload in admin interface

2008-11-28 Thread Ben Lau
Hi redbaron, My approach is to subclass ModelAdmin to implement a import command . It should need to override the __call__() and create a import_view() function to handle the import form. Example: class XXXAdmin(admin.ModelAdmin): def __call__(self, request, url):

Implement file upload in admin interface

2008-11-27 Thread Ben Lau
Hi all, I would like to implement a data upload feature in admin interface for my application. A form with file upload field will be show for a data model. The file should be a XML file which is generated by another program and contain more than one record of data. Anybody implemented simila