Re: Errors on Django Tests Tutorial 5, how to fix.

2013-12-04 Thread Matt Schloepp
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django',
'USER': 'matt',
'PASSWORD':'***',
'HOST': '127.0.0.1',
'PORT': '5432',
},
'OPTIONS': {
'autocommit': True,
}

I forgot to post DB settings
On Wednesday, December 4, 2013 2:32:14 PM UTC-8, Matt Schloepp wrote:
>
> Django is 1.6 and Python is 2.7.5. On Windows 8.1, no virtual-env, but my 
> actual project will be on a *nix VM. I accidentally download and install a 
> development version, I think removed it before installing 1.6 but no 
> previous django versions were installed on this system. Maybe dropping my 
> db and starting over would fix the issue?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/acdf1883-ce8e-49e5-b48c-94edf6117620%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Errors on Django Tests Tutorial 5, how to fix.

2013-12-04 Thread Matt Schloepp
Django is 1.6 and Python is 2.7.5. On Windows 8.1, no virtual-env, but my 
actual project will be on a *nix VM. I accidentally download and install a 
development version, I think removed it before installing 1.6 but no 
previous django versions were installed on this system. Maybe dropping my 
db and starting over would fix the issue?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2272299c-3432-495a-b31f-28b70613ee13%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Errors on Django Tests Tutorial 5, how to fix.

2013-12-04 Thread Thomas Lockhart

On 12/4/13 9:18 AM, Matt Schloepp wrote:
I'm running Django on Windows with PostgreSQL database. I'm in 
tutorial 5 and have copy/pasted the code after it's initial failure. 
I've been following the tutorials to this point, with only a little 
side experimentation, and everything has been working. It looks like 
it DB related since I'm not using SQLite. I'm lost. What do I need to 
add or modify to get the tests to work?
What version of Django are you running? I think an issue with starting 
up tests with PostgreSQL were fixed for 1.6 (but I haven't tried it 
myself). fwiw PostgreSQL is supported as well or better than any other 
choice, and SQLite just postpones the inevitable transition to something 
which is full-featured.


hth

   - Tom



Output:

==

ERROR: test_was_published_recently_with_future_poll
(polls.tests.PollMethodTests)

--

Traceback (most recent call last):

File "C:\python27\lib\site-packages\django\test\testcases.py",
line 178, in __call__

self._pre_setup()

File "C:\python27\lib\site-packages\django\test\testcases.py",
line 749, in _pre_setup

self._fixture_setup()

File "C:\python27\lib\site-packages\django\test\testcases.py",
line 861, in _fixture_setup

if not connections_support_transactions():

File "C:\python27\lib\site-packages\django\test\testcases.py",
line 848, in connections_support_transactions

for conn in connections.all())

File "C:\python27\lib\site-packages\django\test\testcases.py",
line 848, in 

for conn in connections.all())

File
"C:\python27\lib\site-packages\django\utils\functional.py",
line 49, in __get__

res = instance.__dict__[self.func.__name__] = self.func(instance)

File
"C:\python27\lib\site-packages\django\db\backends\__init__.py", line
664, in supports_transactions

self.connection.leave_transaction_management()

File
"C:\python27\lib\site-packages\django\db\backends\__init__.py", line
317, in leave_transaction_management

if managed == self.get_autocommit():

File
"C:\python27\lib\site-packages\django\db\backends\__init__.py", line
324, in get_autocommit

self.ensure_connection()

File
"C:\python27\lib\site-packages\django\db\backends\__init__.py", line
124, in ensure_connection

self.connect()

File "C:\python27\lib\site-packages\django\db\utils.py", line
86, in __exit__

db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__)

AttributeError: 'DatabaseWrapper' object has no attribute
'Database'


--

Ran 0 tests in 0.001s


FAILED (errors=1)


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0067a22-b212-4ffa-ad5d-7fab897f9ca7%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/529FAA27.509%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Errors on Django Tests Tutorial 5, how to fix.

2013-12-04 Thread Matt Schloepp
Commenting out my Postgresql DB and putting back the default options for 
the sqlite DB fixed the issue. 

Is there a tests.py variable I could use to create an If..Else that would 
allow this to be automatic and not force me to edit my settings.py every 
time I wanted to run a test.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/16971b55-ed41-4086-ba37-4248b13646b7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Errors on Django Tests Tutorial 5, how to fix.

2013-12-04 Thread Matt Schloepp
I'm running Django on Windows with PostgreSQL database. I'm in tutorial 5 
and have copy/pasted the code after it's initial failure. I've been 
following the tutorials to this point, with only a little side 
experimentation, and everything has been working. It looks like it DB 
related since I'm not using SQLite. I'm lost. What do I need to add or 
modify to get the tests to work?

Output:

> ==
>
> ERROR: test_was_published_recently_with_future_poll 
>> (polls.tests.PollMethodTests)
>
> --
>
> Traceback (most recent call last):
>
>   File "C:\python27\lib\site-packages\django\test\testcases.py", line 178, 
>> in __call__
>
> self._pre_setup()
>
>   File "C:\python27\lib\site-packages\django\test\testcases.py", line 749, 
>> in _pre_setup
>
> self._fixture_setup()
>
>   File "C:\python27\lib\site-packages\django\test\testcases.py", line 861, 
>> in _fixture_setup
>
> if not connections_support_transactions():
>
>   File "C:\python27\lib\site-packages\django\test\testcases.py", line 848, 
>> in connections_support_transactions
>
> for conn in connections.all())
>
>   File "C:\python27\lib\site-packages\django\test\testcases.py", line 848, 
>> in 
>
> for conn in connections.all())
>
>   File "C:\python27\lib\site-packages\django\utils\functional.py", line 
>> 49, in __get__
>
> res = instance.__dict__[self.func.__name__] = self.func(instance)
>
>   File "C:\python27\lib\site-packages\django\db\backends\__init__.py", 
>> line 664, in supports_transactions
>
> self.connection.leave_transaction_management()
>
>   File "C:\python27\lib\site-packages\django\db\backends\__init__.py", 
>> line 317, in leave_transaction_management
>
> if managed == self.get_autocommit():
>
>   File "C:\python27\lib\site-packages\django\db\backends\__init__.py", 
>> line 324, in get_autocommit
>
> self.ensure_connection()
>
>   File "C:\python27\lib\site-packages\django\db\backends\__init__.py", 
>> line 124, in ensure_connection
>
> self.connect()
>
>   File "C:\python27\lib\site-packages\django\db\utils.py", line 86, in 
>> __exit__
>
> db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__)
>
> AttributeError: 'DatabaseWrapper' object has no attribute 'Database'
>
>
>> --
>
> Ran 0 tests in 0.001s
>
>
>> FAILED (errors=1)
>
>
 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0067a22-b212-4ffa-ad5d-7fab897f9ca7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.