ValueError: Need 2 values to unpack in for loop; got 3 (actually num_loopvars = 2 and len_item = 3)

2017-07-17 Thread Ogi Vranesic
Hi I have used some templates in older django versions. But now in django 1.11 using the same templates, the error: ValueError: Need 2 values to unpack in for loop; got 3. will be raised on line 207 in module django.template.defaulttags by the method render of class ForNode Actually is by me l

Re: ValueError: Need 2 values to unpack in for loop; got 3 (actually num_loopvars = 2 and len_item = 3)

2017-07-17 Thread Michal Petrucha
On Mon, Jul 17, 2017 at 03:46:30PM +0200, Ogi Vranesic wrote: > Hi > > I have used some templates in older django versions. > But now in django 1.11 using the same templates, the error: > > ValueError: Need 2 values to unpack in for loop; got 3. > > will be raised on line 207 in module django.te

Re: Use one correspondig database user for each application user

2017-07-17 Thread guettli
Am Donnerstag, 13. Juli 2017 10:32:26 UTC+2 schrieb Antonis Christofides: > > BTW, > > another idea for "connecting" to PostgreSQL as different users would be to > actually have Django connect to PostgreSQL as a superuser and then > (probably in some early middleware) execute SET SESSION AUTHOR

ValueError: Need 2 values to unpack in for loop; got 3 (actually num_loopvars = 2 and len_item = 3)

2017-07-17 Thread Ogi Vranesic
Michal, Thanks very much for your reply. I guessed, that is something like in your example. And I find it in template. So the conclusion is that there is no more allowed in django template engine to use *for* loop with less elements to unpack, and I think that is also consistent and more pytho

I am new in this world of Python.

2017-07-17 Thread Adil Balti
Hello all. I am a beginner in Python .Just started to learn Python .Using Python 3.6 . Practicing variables, strings , etc . Any suggestion from you seniors would be appreciated . Thnx in advance (sorry for my bad Eng grammer) -- You received this message because you are subscribed to the Google

Create Mobile App from Django Template

2017-07-17 Thread Megan Zhao
My friend and I followed the Django tutorial to create a web blog where the professors can post their office hours and students can access to search and browse. We want to create a mobile app that contains the same info so that when the professors post on the web, the info in the app also update

Re: Create Mobile App from Django Template

2017-07-17 Thread Jani Tiainen
Hi, There are numerous ways to do that. You could create mobile version of your site or do called responsive design. That way site would be accessible with virtually any device. If you want to create native app you can write for example rest api to provide data for your app. 17.7.2017 21.54 "Meg

Build Mobile App from Django Web

2017-07-17 Thread Megan Zhao
My friend and I build a web blog from Django tutorial where the professors can post their office hours and students and search and browse them. We want to build a mobile app that will update when the professors post on the website. I don't think we can build a mobile app from Django. Is there a

Re: I am new in this world of Python.

2017-07-17 Thread yingi keme
Well you just need to keep practicing. Try to write programs to solve some simple task. Remember, learning the syntax is just the first step. You have to practice more by doing some exercises. When you are very comfortable with language, then you can start a web app project. You always learn

Re: I am new in this world of Python.

2017-07-17 Thread Lachlan Musicman
Adil, If you are looking for a long list of exercises to practice on, try the Euler project https://projecteuler.net/archives It starts easy cheers L. -- "The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic civics is the insistence that we cannot ignore the truth, nor should

Re: Create Mobile App from Django Template

2017-07-17 Thread Marsel Xhaxho
Hello, Django Rest Framework to the rescue. You can use this package to expose your database via a HTTP REST api and consume it via swift/java or any other language/platform you might think. This actually is the way web works nowadays, even for web apps.

What Way is best to extend User in Django 1.11?

2017-07-17 Thread 李余通
How to extend User?I find many ways; 1. Use Profile eg: class UserProfile(models.Model): user = models.OneToOneField(User) major = models.TextField(default='', blank=True) This way is easy to understand,However,it will create a new table in sql,I heard this will add System burden. 2