Intertwined problems with Django Time fields force hacks to edit/display time

2019-01-22 Thread Duke Dougal
I hope this is etiquette but I'm going to refer to the StackOverflow post 
for this problem because there's so much related information and because 
the formatting make it practical to understand.

https://stackoverflow.com/questions/54317070/intertwined-problems-with-django-time-fields-force-hacks-to-edit-display-time

In essence, the problem is that Django seems to change the data type of the 
time field which results in the seconds being dropped, which cascades onto 
a second problem which is that the template time filter tag returns None 
when its input does not have seconds.

Any help valued.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/db0550b9-c223-4808-bfdc-da50285da933%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ulr internationalization

2013-09-23 Thread Duke
Hi guys,

How I can to use "Url internationalization" on my project that running with the 
Django version 1.3 ?,
I want to use only this feature without update the version, thought inherit the 
locale midleware and edit this but any suggestion?

Thanks.

Sean N.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Get 500 error with Ajax on firebug

2011-12-21 Thread Mike Duke Hall
Tsung,  what was the problem in your views.py?
I am working on this same problem.  Here is my views.py
-
 
@login_required
def bookmark_save_page(request):
ajax = 'ajax' in request.GET
if request.method == 'POST':
form = BookmarkSaveForm(request.POST)
if form.is_valid():
bookmark = _bookmark_save(form)
if ajax:
variables = RequestContext (request,{
'bookmarks':[bookmark],
'show_edit': True,
'show_tags': True
})
return render_to_response('bookmark_list.html',variables)
else:
return HttpResponseRedirect('/user/%s' % 
request.user.username)
else:
if ajax:
return HttpResponse(u'failure')
elif 'url' in request.GET:
url = request.GET['url']
title = ''
tags = ''
try:
link = Link.objects.get(url=url)
bookmark = Bookmark.objects.get(link=link,user=request.user)
title = bookmark.title
tags = ' '.join(tag.name for tag in bookmark.tag_set.all())
except (Link.DoesNotExist, Bookmark.DoesNotExist):
pass
form = BookmarkSaveForm({
'url':url,
'title':title,
'tags':tags
})
else:
form = BookmarkSaveForm()
variables = RequestContext (request,{
'form':form
})
if ajax:
return render_to_response('bookmark_save_form.html',variables)
else:
return render_to_response('bookmark_save.html',variables)
-
 

Help from anyone is appreciated, I've been stuck on this too long.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/4ba7eDfberEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Template and Static content

2008-04-22 Thread Duke

Can i use Template directory or its subdirectory to store the static
content(JPG, CSS, JS GIF).
Pls comment on this topic
Thank
Duke
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Looping....

2008-04-15 Thread Duke

They are looping over a list
I am looking for

for (i = 0; i < 10; i++) {
 printf("Hello,  World!);
}
link for looping statement

Thank
Duke
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Images and Stylesheets

2008-04-15 Thread Duke


This is  strange its work for me

U config the URL as i suggested and referce the image as below in the
tab

This should definitly work it even work for javascript.
Thank
Duke

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Looping....

2008-04-15 Thread Duke

Can u give some example  since for iteration over a array or a
dictionary

Thanks
Duke

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Images and Stylesheets

2008-04-15 Thread Duke


change the URL config as

from django.conf.urls.defaults import *
import os
ROOT_PATH = os.path.dirname(__file__)

urlpatterns = patterns('',
# Example:
 (r'^hellodojo/', 'hello.views.hellodojo'),
 (r'^site_media/(?P.*)$', 'django.views.static.serve',
{'document_root': ROOT_PATH + '/site_media/'}),

the site_media is the floder contain the image and CSS file
site_media should be in the floder that hold the project.
i had this problem three days a go now i have solved by config the URL

Thanks
Duke
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Looping....

2008-04-15 Thread Duke

How to use Loop counter iteration (ie) looping 10 time in Django
Template language (html)

bye
Sathish



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to use dojo toolkit in django?

2008-04-14 Thread Duke

How to use dojo toolkit in django project?
Where to store the dojo toolkit in the project and how to use them in
the html page?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to display a image in the template?

2008-04-13 Thread Duke

Hi
Can any tell me how to display a image in the hrml in Django



 Hello, Image





this html is not displaying the image


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---