Wednesday, June 26, 2013
Monday, June 24, 2013
Thursday, June 20, 2013
Had a big adventure getting postgreSQL working on my laptop today!
http://dba.stackexchange.com/questions/44928/trouble-creating-a-database-with-postgreql/44981#44981
Just for notes, here is how I stopped the server:
PS C:\Users\Chris\Documents\test> & 'C:\Program Files\PostgreSQL\9.2\bin\pg_ctl.exe' -D "C:\Users\Chris\Documents\postgr
esql" -l logfile stop
waiting for server to shut down.... done
server stopped
http://dba.stackexchange.com/questions/44928/trouble-creating-a-database-with-postgreql/44981#44981
Just for notes, here is how I stopped the server:
PS C:\Users\Chris\Documents\test> & 'C:\Program Files\PostgreSQL\9.2\bin\pg_ctl.exe' -D "C:\Users\Chris\Documents\postgr
esql" -l logfile stop
waiting for server to shut down.... done
server stopped
Wednesday, June 19, 2013
Sunday, June 16, 2013
Thursday, June 13, 2013
Well this is frustrating.
C:\Users\Chris\Documents\django_dev\django-polls>python setup.py sdist
running sdist
running egg_info
creating django_polls.egg-info
writing django_polls.egg-info\PKG-INFO
writing top-level names to django_polls.egg-info\top_level.txt
writing dependency_links to django_polls.egg-info\dependency_links.txt
writing manifest file 'django_polls.egg-info\SOURCES.txt'
error: package directory 'polls' does not exist
Looks like this might be a solution:
https://code.djangoproject.com/ticket/16671#comment:32
C:\Users\Chris\Documents\django_dev\django-polls>python setup.py sdist
running sdist
running egg_info
creating django_polls.egg-info
writing django_polls.egg-info\PKG-INFO
writing top-level names to django_polls.egg-info\top_level.txt
writing dependency_links to django_polls.egg-info\dependency_links.txt
writing manifest file 'django_polls.egg-info\SOURCES.txt'
error: package directory 'polls' does not exist
Looks like this might be a solution:
https://code.djangoproject.com/ticket/16671#comment:32
Needed to install distribute before starting the next django tutorial:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Chris>pip install distribute
Requirement already satisfied (use --upgrade to upgrade): distribute in c:\pytho
n27\lib\site-packages
Cleaning up...
The package 'distribute' allows one to easily download, build, install, upgrade, and uninstall Python packages.
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Chris>pip install distribute
Requirement already satisfied (use --upgrade to upgrade): distribute in c:\pytho
n27\lib\site-packages
Cleaning up...
The package 'distribute' allows one to easily download, build, install, upgrade, and uninstall Python packages.
Wednesday, June 12, 2013
Sunday, June 9, 2013
Got a really weird error when I tried to setup a django test environment:
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.test.utils import setup_test_environment
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\django\test\__init__.py", line 5, in <modu
le>
from django.test.client import Client, RequestFactory
File "C:\Python27\lib\site-packages\django\test\client.py", line 21, in <modul
e>
from django.db import close_connection
File "C:\Python27\lib\site-packages\django\db\__init__.py", line 11, in <modul
e>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53, in __ge
tattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 46, in _set
up
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but se
ttings are not configured. You must either define the environment variable DJANG
O_SETTINGS_MODULE or call settings.configure() before accessing settings.
The issue is django does not know what you are working on. This resolved it:
C:\Users\Chris\Documents\django_dev\mysite>python manage.py shell
Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.test.utils import setup_test_environment
>>>
I guess that is a django interactive shell?
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.test.utils import setup_test_environment
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\django\test\__init__.py", line 5, in <modu
le>
from django.test.client import Client, RequestFactory
File "C:\Python27\lib\site-packages\django\test\client.py", line 21, in <modul
e>
from django.db import close_connection
File "C:\Python27\lib\site-packages\django\db\__init__.py", line 11, in <modul
e>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53, in __ge
tattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 46, in _set
up
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but se
ttings are not configured. You must either define the environment variable DJANG
O_SETTINGS_MODULE or call settings.configure() before accessing settings.
The issue is django does not know what you are working on. This resolved it:
C:\Users\Chris\Documents\django_dev\mysite>python manage.py shell
Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.test.utils import setup_test_environment
>>>
I guess that is a django interactive shell?
Friday, June 7, 2013
Went to the Los Angeles Tech Happy Hour and found some interesting training sites:
Code School
http://www.codeschool.com/
Team Tree House
http://teamtreehouse.com/
Code School
http://www.codeschool.com/
Team Tree House
http://teamtreehouse.com/
Wednesday, June 5, 2013
This looks like a promising way to learn Django:
Test-Driven Development with Python
I am really curious about how he uses Selenium to test the web app. You can buy the book from O'Reilly or read it for free by clicking on the link. Might be worth checking out...
Test-Driven Development with Python
I am really curious about how he uses Selenium to test the web app. You can buy the book from O'Reilly or read it for free by clicking on the link. Might be worth checking out...
Hi!
My name is Chris Spears, and for about eight years I have worked in the visual effects industry. However, recent events in that industry have got me thinking about a career change, so now I am trying to learn web development focusing (but not limited to) on using python and Django. I created this blog as a diary to chart my learning process.
My name is Chris Spears, and for about eight years I have worked in the visual effects industry. However, recent events in that industry have got me thinking about a career change, so now I am trying to learn web development focusing (but not limited to) on using python and Django. I created this blog as a diary to chart my learning process.
Subscribe to:
Posts (Atom)