Source

scrumpy / log_twgroups.txt

Full commit
Last login: Fri Oct 23 09:34:39 on ttys007
macbook:~ david$ cd Desktop/scrumpy
macbook:scrumpy david$ django-admin.py startproject twgroups
macbook:scrumpy david$ ls -al
total 0
drwxr-xr-x   4 david  staff  136 23 oct 16:41 .
drwx------+ 22 david  staff  748 23 oct 10:06 ..
drwxr-xr-x  14 david  staff  476 23 oct 09:04 backup
drwxr-xr-x   6 david  staff  204 23 oct 16:41 twgroups
macbook:scrumpy david$ hg init twgroups
macbook:scrumpy david$ cd twgroups/
macbook:twgroups david$ ls -al
total 24
drwxr-xr-x  7 david  staff   238 23 oct 16:41 .
drwxr-xr-x  4 david  staff   136 23 oct 16:41 ..
drwxr-xr-x  5 david  staff   170 23 oct 16:41 .hg
-rw-r--r--  1 david  staff     0 23 oct 16:41 __init__.py
-rwxr-xr-x  1 david  staff   546 23 oct 16:41 manage.py
-rw-r--r--  1 david  staff  2777 23 oct 16:41 settings.py
-rw-r--r--  1 david  staff   546 23 oct 16:41 urls.py
macbook:twgroups david$ python manage.py startapp messages
macbook:twgroups david$ ls -al messages/
total 24
drwxr-xr-x   6 david  staff  204 23 oct 16:42 .
drwxr-xr-x  10 david  staff  340 23 oct 16:42 ..
-rw-r--r--   1 david  staff    0 23 oct 16:42 __init__.py
-rw-r--r--   1 david  staff   57 23 oct 16:42 models.py
-rw-r--r--   1 david  staff  514 23 oct 16:42 tests.py
-rw-r--r--   1 david  staff   26 23 oct 16:42 views.py
macbook:twgroups david$ dj runserver
Validating models...
0 errors found

Django version 1.2 pre-alpha SVN-11616, using settings 'twgroups.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[23/Oct/2009 09:43:09] "GET / HTTP/1.1" 200 2057
^Cmacbook:twgroups david$ mate .
macbook:twgroups david$ dj syncdb
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_admin_log
Creating table django_content_type
Creating table django_session
Creating table django_site

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'david'): 
E-mail address: d@l.Fr
Password: 
Password (again): 
Superuser created successfully.
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
macbook:twgroups david$ dj shell
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from messages.models import TwMessage
>>> TwMessage.objects.all()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/david/Sites/lib/django/db/models/query.py", line 68, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "/Users/david/Sites/lib/django/db/models/query.py", line 83, in __len__
    self._result_cache.extend(list(self._iter))
  File "/Users/david/Sites/lib/django/db/models/query.py", line 238, in iterator
    for row in self.query.results_iter():
  File "/Users/david/Sites/lib/django/db/models/sql/query.py", line 287, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/Users/david/Sites/lib/django/db/models/sql/query.py", line 2369, in execute_sql
    cursor.execute(sql, params)
  File "/Users/david/Sites/lib/django/db/backends/util.py", line 19, in execute
    return self.cursor.execute(sql, params)
  File "/Users/david/Sites/lib/django/db/backends/sqlite3/base.py", line 193, in execute
    return Database.Cursor.execute(self, query, params)
OperationalError: no such table: messages_twmessage
>>> 
macbook:twgroups david$ dj syncdb
Creating table messages_twmessage
Installing index for messages.TwMessage model
macbook:twgroups david$ dj shell
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from messages.models import TwMessage
>>> TwMessage.objects.all()
[]
>>> from django.contrib.auth.models import User
>>> User.objects.all()
[<User: david>]
>>> david = User.objects.get(username="david")
>>> david
<User: david>
>>> TwMessage.objects.create(content="First message", author=david)
<TwMessage: TwMessage>
>>> 
macbook:twgroups david$ dj runserver
Validating models...
0 errors found

Django version 1.2 pre-alpha SVN-11616, using settings 'twgroups.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[23/Oct/2009 09:49:54] "GET /admin/ HTTP/1.1" 200 1676
^Cmacbook:twgroups david$ mkdir locale
macbook:twgroups david$ dj makemessages -l fr
processing language fr
macbook:twgroups david$ dj compilemessages
processing file django.po in /Users/david/Desktop/scrumpy/twgroups/locale/fr/LC_MESSAGES
macbook:twgroups david$ dj runserver
Validating models...
0 errors found

Django version 1.2 pre-alpha SVN-11616, using settings 'twgroups.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[23/Oct/2009 10:03:03] "GET /messages/ HTTP/1.1" 200 203