Hi
Your date settings seem to only affect dates when they are being rendered.
When a date is input and later pushed into the database - a date
like 02/03/2013 is ambiguous as the database cannot determine whether you
mean 2nd Mar or 3rd Feb; dates like 02/26/2013 are not ambiguous. So
you get wha
All
1.My application consist of two part.Part I - Settings page //just like
settings selection in iphone or mobile phone
Part II - Event
creation page
So,in settings page ,in my app a page called datetime_format.html is for
selecting date
form example:
class NewsForm(ModelForm):
class Meta:
model = News
exclude = ('id', 'Url', 'resume', 'Time_Stamp')
widgets = {
'Tag': CheckboxSelectMultiple(attrs={'class': 'tag'}),
'Category': CheckboxSelectMultiple(
I'm not shore if what i did its fine or not but works, otherwise i see you
put some twist to the problem... nevertheless what i do its:
In Settings set properly the time_zone and use_l10n=true... then in my
model use something like ...models.DateTimeField('Creation Date',
default=datetime.now())...
views.py
def calender(request):
""
settingsform = SettingsForm(instance=settings)
if request.method == 'POST':
reportform = ReportDateTimeForm(request.POST, instance=report)
if reportform.is_valid():
report = reportform.save(commit=False)
re
5 matches
Mail list logo