sample_model = Sample.objects.all().first()
for field in sample_model._meta.get_fields():
print("{}: {}".format(field.name, field.value_from_object(sample_model))
list_sample = [1, 3, 2, 5, 4, 2]
print(list_sample)
# [1, 3, 2, 5, 4, 2]
list_sample2 = [i for i in [1, 2, 3]]
print(list_sample2)
# [1, 2, 3]
list_sample2 = [i for i in range(0, 10)]
print(list_sample2)
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
list_sample2 = [i for i in range(0, 10, 2)]
print(list_sample2)
# [0, 2, 4, 6, 8]
{{Front}}
<br/><br/>
{{type:Back}}
.card {
font-family: Meiryo;
font-size: 14px;
text-align: center;
color: black;
background-color: white;
}
code#typeans { font-family: Arial; }
#answer { margin-top: 0; }
{{sound}}
{{no}} {{section}}-{{id}}
<hr>
{{FrontSide}}
<hr id=answer>
(書類, ドキュメントフォルダ)/Anki/(プロファイル名: ユーザー 1)/collection.media
に置く。 bundle install --path vendor/bundle
実行時に下記のようなエラーが出たとき。
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/vagrant/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150409-9027-w2urdg.rb extconf.rb
creating Makefile
Text file busy @ unlink_internal - ./siteconf20150409-9027-w2urdg.rb
$ mkdir ~/.bundles
.bundle/config
を開きパスを変更してインストールを実行する。
BUNDLE_PATH: "/home/vagrant/.bundles/プロジェクト名"
$ bundle install
または、configファイルを変更する代わりに実行時に指定する。
$ bundle install --path /home/vagrant/.bundles/プロジェクト名
カレンダー
最新記事
最古記事
ブログ内検索
フリーエリア