Re: HELP on unittest.loader.ModuleImportFailure

2014-06-08 Thread Kelvin Wong
Open this file /Users/kim/Desktop/Python/python3/superlists/lists/tests.py On line 3 change from superlists.lists.views import home_page to from lists.views import home_page For the future, check your paths with the following import sys; print(sys.path) K On Sunday, June 8, 2014 9:31:03

Re: HELP on unittest.loader.ModuleImportFailure

2014-06-08 Thread Kimitaka Nakazawa
Thank you very much for the reply! Going through your suggestion below, at ">>> from lists.tests import *” part, I got an error which is below.  Traceback (most recent call last):   File "", line 1, in   File "/Users/kim/Desktop/Python/python3/superlists/lists/tests.py", line 3, in     from sup

Re: Running a test from other folder using manage.py

2014-06-08 Thread Jimish Parekh
Hi, Try running python manage.py test lists.tests and see if tests are running or not. Thanks, On Sunday, June 8, 2014 6:18:45 PM UTC+5:30, Kim wrote: > > Hi everyone, > > I have a question on unit tests. > I have manage.py file placed in the upper superlists folder and the > tests.py placed in

Re: HELP on unittest.loader.ModuleImportFailure

2014-06-08 Thread Kelvin Wong
Find out which versions you are using $ python --version Python 2.7.6 $ django-admin.py version 1.4.10 Try importing the lists app from the shell $ python manage.py shell Python 2.7.6 (default, Jan 13 2014, 04:26:18) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "cre

Re: HELP on unittest.loader.ModuleImportFailure

2014-06-08 Thread Kimitaka Nakazawa
Hi Kelvin, Thank you very much for your reply! I tried your codes above but I still get the same error... Kind regards, Kim On Mon, Jun 9, 2014 at 3:33 AM, Kelvin Wong wrote: > You need to be in the first superlists directory. You have a db created so > you must have run syncdb at some point.

Re: Why doesn't saving a related model update the _id field?

2014-06-08 Thread Russell Keith-Magee
On Sun, Jun 8, 2014 at 10:34 PM, Malcolm Box wrote: > I'm confused by Django's behaviour when saving related models. Take for > example: > > class X(models.Model): > pass > > class Y(models.Model): >x = models.ForeignKey(X) > > Now if I create some objects (unsaved): > > x = X() > y = Y(x

Re: Django Python

2014-06-08 Thread hito koto
Thanks -- 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.

Re: Django Python

2014-06-08 Thread Thiago borges dos reis
When you use m>0, you will do m+1 interaction . Ex.: foo(2,2): sum+=foo(2,1) last interaction 2014-06-08 18:57 GMT-03:00 hito koto : > I have a question > > This is why : > if m >1 > and why you not use 0? > > -- > You received this message because you are subscribed to the Google Gro

Re: Django Python

2014-06-08 Thread hito koto
I have a question This is why : if m >1 and why you not use 0? -- 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 p

Re: Django Python

2014-06-08 Thread hito koto
Hi, Thiago borges dos reis Thank you! 2014年6月9日月曜日 3時32分34秒 UTC+9 John: > > This list is about the use of Django, a python framework for websites. > You might get better help using a list which covers python more generally. > > By the way, your function doesn't need recursion: > > def foo(n,m

Re: HELP on unittest.loader.ModuleImportFailure

2014-06-08 Thread Kelvin Wong
You need to be in the first superlists directory. You have a db created so you must have run syncdb at some point. Go back to that folder: $ pwd /home/you/superlists $ ls __init__.py db.sqlite3superlistslistsmanage.py $ ls lists/tests.py lists/tests.py $ python manage.py test Cr

Re: Django Python

2014-06-08 Thread John
This list is about the use of Django, a python framework for websites. You might get better help using a list which covers python more generally. By the way, your function doesn't need recursion: def foo(n,m): return m*n John On 08/06/14 16:39, Thiago borges dos reis wrote: > I'm sorry, i m

Re: newcomer to django testing

2014-06-08 Thread monoBOT
Hi Esau. Funny to see you here ;.D I checked what you told me and its true ... if I try to create the database starting with the comunidad table it raises the error but when starting the migrations with usuario it goes smooth. Simply changing the app order in the settings.py file fixed the prob

Re: Django Python

2014-06-08 Thread Thiago borges dos reis
I'm sorry, i made a mistacke ! def foo(n,m): ... sum = n ... if m>1: ... sum+=foo(n,m-1) ... return sum 2014-06-08 12:19 GMT-03:00 Thiago borges dos reis : > without identaction !!! > > def foo(n, m): > sum = 0 >while m > 0: >sum = sum + n >m = m -1

Re: Django Python

2014-06-08 Thread Thiago borges dos reis
without identaction !!! def foo(n, m): sum = 0 while m > 0: sum = sum + n m = m -1 return sum 2014-06-08 12:06 GMT-03:00 hito koto : > Hi, > > I want to change recursive definition from function, > > this code change to recursive definition, So how can i do to? > > def foo(

Django Python

2014-06-08 Thread hito koto
Hi, I want to change recursive definition from function, this code change to recursive definition, So how can i do to? def foo(n, m): sum = 0 while m > 0: sum = sum + n m = m -1 return sum -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: newcomer to django testing

2014-06-08 Thread Esau Rodriguez
The testing process creates db itself when using south it migrate all apps with migrations. Could you have a problem with your migrations when run from zero?. Regards Esau Rodriguez. On Sun, Jun 8, 2014 at 10:20 AM, monoBOT wrote: > Im new on testing ... to be honest its my first django test

Why doesn't saving a related model update the _id field?

2014-06-08 Thread Malcolm Box
I'm confused by Django's behaviour when saving related models. Take for example: class X(models.Model): pass class Y(models.Model): x = models.ForeignKey(X) Now if I create some objects (unsaved): x = X() y = Y(x=x) All well so far. But now odd things happen when I save: A) y.save() t

Running a test from other folder using manage.py

2014-06-08 Thread Kim
Hi everyone, I have a question on unit tests. I have manage.py file placed in the upper superlists folder and the tests.py placed in lists folder. I keep getting an error message saying "ImportError: No module named lists.tests”. Would anyone know how to access a test file from other folder u

newcomer to django testing

2014-06-08 Thread monoBOT
Im new on testing ... to be honest its my first django test XD Now i wanted to test one of my applications and after the innitial tweaking of allowing the django user to be able to create databases i get this error: ​The error was: relation "usuario_usuario" does not exist Error in migration: co

Re: The Django 1.7 tees!

2014-06-08 Thread Russell Keith-Magee
Hi Lloyd, You should have got an email when you placed your order, and another when the campaign completed (i.e., last Sunday). If you didn't get either of those emails, then I don't know what's happened with your order - you might want to contact TeeSpring support. Yours, Russ Magee %-) On Sund

Re: OperationalError happening after giving authorization to the class based view

2014-06-08 Thread yutaka kobayashi
I made two models on models.py they are Contacts and Address along with this http://effectivedjango.com/tutorial/related.html page I tried to use the both of this models. Which means Address model under the Contact model. The authentication stuff that I had problem with went well after I comm