Re: Google Drive with Django?

2012-05-10 Thread Elliot Bradbury
django-social-auth has some Google OAuth2 code. I'm not sure if it applies to Drive but it might be worth looking at. I was able to create an OpenID backend to a new service in about 2 minutes. https://github.com/omab/django-social-auth/blob/master/social_auth/backends/google.py#L69 On Thu, May 1

Re: Tutorial three '-pub_date'

2012-07-03 Thread Elliot Bradbury
'-' reverses the ordering of that field. So it will order the most recently published Polls first. On Tue, Jul 3, 2012 at 2:33 PM, Smaran Harihar wrote: > Hey Djangoers, > > I am on the tutorial > 3,

Re: TDD with Django/Splinter/plupload queue

2013-03-20 Thread Elliot Bradbury
PhantomJS is a headless webkit browser that can be programmed to perform automated webpage tasks (like maybe select a file for upload). The standard API is Javscript but I believe there is a Python port. Maybe that could help? http://phantomjs.org/ On Wed, Mar 20, 2013 at 3:34 PM, Bill Freeman w

Re: Problem with django 1.5.1

2013-05-09 Thread Elliot Bradbury
Hey kl4us, I think the problem is that you need to specify the URL name as a string, like: {% url 'post' slug=post.slug %} https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns Elliot On Thu, May 9, 2013 at 10:29 AM, kl4us wrote: > I have this code http://pastebin.com/x

Re: Creating a Node in Django ORM

2013-07-09 Thread Elliot Bradbury
Check out django-mptt for creating parent/child (tree) relationships between models. https://github.com/django-mptt/django-mptt On Tue, Jul 9, 2013 at 9:07 AM, Nafiul Islam wrote: > How would you create a node using Django's ORM. This is what I mean: > https://dpaste.de/JG52c/ > > Now, what I am

Re: How to read part of many-to-many field in the template

2014-06-15 Thread Elliot Bradbury
Hi Mohammad, Check out slice . It's a builtin template filter that can be used like this: {% for author in book.authors.all|slice:"3" %} {# HTML up in here #} {% endfor %} Good luck, Elliot On Sun, Jun 15, 2014 at 9:31 AM,