Re: if statement in django

2014-04-05 Thread Jay Lozier
l(self): amount = 0 if self.sale_head <= 0: amount = self.number * self.estimated_weight_hd return amount Both versions will return a value not matter whether the test condition evaluates to True or False. The second version assumes the default value is 0 -- Jay Lozier jsloz...@

Re: python manage.py runserver error

2013-07-23 Thread Jay Lozier
virtualenv works, this for the link. On Sunday, July 21, 2013 10:09:59 PM UTC-4, Jay Lozier wrote: > > I get the following error when run python manage.py runserver: > > OS openSUSE 12.3 > django 1.7 > > > boopers@linux-nss6:~/myfirstsite> python manage.py runserver &g

Re: django-admin.py startproject mysite error

2013-07-23 Thread Jay Lozier
virtualenv seems to work well and I can get django tamed. On Saturday, July 20, 2013 5:55:21 PM UTC-4, Jay Lozier wrote: > > Using openSUSE 12.3 > python 2.7.3 > django 1.5.1 installed manually and verified > > When I enter "django-admin.py startproject mysite" at

python manage.py runserver error

2013-07-22 Thread Jay Lozier
I get the following error when run python manage.py runserver: OS openSUSE 12.3 django 1.7 boopers@linux-nss6:~/myfirstsite> python manage.py runserver Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File

Re: django-admin.py startproject mysite error

2013-07-21 Thread Jay Lozier
-pad-1.0 /usr/lib/python2.7/site-packages /usr/lib64/python2.7/site-packages/wx-2.9.4-gtk2 On Saturday, July 20, 2013 5:55:21 PM UTC-4, Jay Lozier wrote: > > Using openSUSE 12.3 > python 2.7.3 > django 1.5.1 installed manually and verified > > When I enter "django-admin

django-admin.py startproject mysite error

2013-07-20 Thread Jay Lozier
Using openSUSE 12.3 python 2.7.3 django 1.5.1 installed manually and verified When I enter "django-admin.py startproject mysite" at the command prompt I get the following traceback: Traceback (most recent call last): File "/usr/bin/django-admin.py", line 5, in