万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    Macのフォントのありか

    ~/Library/Fonts

    bitbucket使ってみた

    ・ここがいい
    http://d.hatena.ne.jp/griefworker/20110303/mercurial_bitbucket#c

    ~/.hgrcがないといけない。

    ReVIEW フォーマット

    https://github.com/kmuto/review/blob/master/doc/format.rdoc

    SphinxはReStructuredText
    http://ja.wikipedia.org/wiki/ReStructuredText

    sphinx-quickstart」は「source/conf.py」を生成するコマンド

    Pyproメモ

    syncdbうまくいかない

    $ python manage.py syncdb
    Traceback (most recent call last):
      File "manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
        utility.execute()
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
        self.execute(*args, **options.__dict__)
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
        output = self.handle(*args, **options)
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
        return self.handle_noargs(**options)
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
        cursor = connection.cursor()
      File "/Users/shinriyo/.virtualenvs/bpbook/lib/python2.7/site-packages/django/db/backends/dummy/base.py", line 15, in complain
        raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
    django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

    「myprj/settings.py」の「django.db.backends.」のあとにデータベースの設定を追記しないといけない。
    参考:http://d.hatena.ne.jp/Ponsuke/20100305/1267797617


    あとは「Please fill out the database NAME in the settings」ってあるので、

    DATABASES = { 
        'default': {
            'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
            'NAME': 'bpbook',                      # Or path to database file if using sqlite3.
            'USER': '',                      # Not used with sqlite3.
            'PASSWORD': '',                  # Not used with sqlite3.
            'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
            'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
        }
    }