Dismiss All your code in one place Over 36 million developers use GitHub together to host and review code, project manage, and build software together across more than 100 million projects. Sign up for free See pricing for teams and enterprises
Fabric+Webistranoっぽいのの構築したメモです。 rubyに入門しませんでしたm(_ _)m!!使用は、Pythonでいきたいなぁーっと。 pythonとshellの方が自分に実績があって、手に馴染むだけです。chefとcapistranoの方が、 現状では情報が多いので、誰得?になってしまうんだろうけど、自分用の記録。長編。。。 前は、phpでmakuoさん使ったデプロイツール作って使ってましたが(遠い目)今回は自前は辞め、 pythonで、chefっぽいものと、capistranoっぽいものを構築することが目的です。(capistranoはWebistranoを目標) 構築した環境は、Scientific Linux 6.4 x86_64です。 (インストール時のオプションは、Basic Serverで、カスタマイズで開発ツールを追加しています。) ■Fabricのインス
To install the latest stable version: pip install git+git://github.com/dcramer/django-devserver#egg=django-devserver django-devserver has some optional dependancies, which we highly recommend installing. pip install sqlparse -- pretty SQL formatting pip install werkzeug -- interactive debugger pip install guppy -- tracks memory usage (required for MemoryUseModule) pip install line_profiler -- does
Django 1.5.1 が昨日 リリースされました 。リリース内容を見るて、クエリーセットにメモリリークの問題があったそうです。 もともとのバグ 1.4 では、2回クエリーセットを解決すると、空な結果が返ってきて、前の結果がガーベージコレクションされない現象があったそうです (バグ #19895) 例えば: qs = MyModel.objects.all() first = list(qs) second = list(qs) # second は first と一緒だはずなのに、空になってしまう。。 1.5 ではこの問題に対して、 修正された らしい。ただし、1.5 のリリース後にその修正はメモリリークを招いたことが分かった。 メモリリーク この問題は Python の動きに関係があるそうです。Django の開発者は Python のバグ を登録していたんだけど、うちは社内で「それ
One of the many challenges we face with a large web application is error tracking. We want to know when an error occurs on any of our servers, and we want to know the context and location of the error in our code. To help track and log these errors, we use Redmine and django-db-log internally. They work fairly well, and we’ve been actively improving them as we needed more features. Around three we
Pinax is an open-source platform built on the Django Web Framework. By integrating numerous reusable Django apps and providing starter projects and infrastructure tools, Pinax takes care of the things that many sites have in common so you can focus on what makes your site different. Pinax has been used for everything from social networks to conference websites, and from intranets to online games.
Slides of a talk I gave about importd: http://amitu.com/importd/ importd is being developed on http://github.com/amitu/importd/. See the Changelog: https://github.com/amitu/importd/blob/master/ChangeLog.rst. hello world with importd¶ With importd there is no need to create a django project or app. There is no settings.py or urls.py, nor is there a need of manage.py. A single file is sufficient, e.
OpenBlock is a hyper-local news & data platform. Run a local news website for your community, or use it to serve widgets and feeds for integration with your existing website. Find out more 100% Open-Source! Built on Django. OpenBlock is Open Source Software, meaning that it can be downloaded and installed for free (under the GPL license). It leverages many well established open-source technologies
やりたいこと python manage.py test を実行すると、デフォルトではINSTALLED_APPSに登録されたアプリのmodels.pyとtests.py内のdocstringからテストが作られるが、tests.py以外のスクリプト内のdocstringもテストしたい! 問題 まずはDjangoのテストフレームワークから外れて、一般的なPythonのdoctestを行おうとした。 if __name__ == "__main__": import doctest doctest.testmod()を各スクリプトファイルの末尾に追加し、python hoge.py を実行してテストを行おうとした。 しかし、python manage.py shell で起動したシェルでしか実行できないコードがある場合、これではうまくいかないことがわかった。 調査 Djangoのテストフレーム
A beautiful content management interface A beautiful content management interface The Django admin interface is a powerful application in order to manage your data. Grappelli adds a consistent and grid-based look & feel and some nifty features. Clean and consistent look & feel Related lookups with Autocompletes Inline sortables with Drag & Drop Compass-based CSS Integrated TinyMCE theme Customizab
webアプリではオブジェクトの一覧を表示する画面がよくでてきます。 一覧系の画面が妙に遅い場合、SQLが大量に発行されている(N+1問題)場合があります。 例えばDjangoで、以下のように関連しているモデルがあるとします。(Django 1.4) books/models.py from django.db import models class City(models.Model): name = models.CharField(max_length=30) class Person(models.Model): hometown = models.ForeignKey(City) name = models.CharField(max_length=100) class Book(models.Model): author = models.ForeignKey(Person) t
Django-ja の方からきました。こんにちわ。さて、昨日の Ian 先生のブログにも書いてある通り、ついに Django にも本格的に Python 3 の足音が近づいてきました。ただし現在 alpha 版が公開されている 1.5 では "実験的" なサポートで、1.6 以降で正式にサポートする予定となっています。あくまでも "実験的" であり、プロダクションでの利用は "非推奨" となっています。Django コミュニティでは、この 1.5 でサポートをテストしてもらい、そのフィードバックを呼びかけています。なのでプロダクションでの利用は 1.6 まで待ちでしょうね。また Python 3 サポートと同時に、Django 1.4 では Python 2.4 がサポートから外れ、1.5 では Python 2.5 がサポートから外れます。これで 1.7 以降から django.util
この記事は2012 Pythonアドベントカレンダー(Webフレームワーク)の第3目の記事。昨日の記事は id:shomah4a の「 2012 Python アドベントカレンダー (Web フレームワーク ) 二日目WSGIでなんか作ってみる 」。明日は surgoさんが、Django 1.5以降とPython 3あたりの記事を書いてくれます。 10月25日に Django 1.5 alpha 1がリリースされて、順調に先週の火曜日(11月27日)に Django 1.5 beta 1がリリースされました。徐々に Django 1.5 の正式リリースに近づいてきいます。もしかして、年内にいいクリスマスプレゼントになるかもしれません。 新機能 Django 1.5はたくさんの変更がありますが、一番大きい変更をピックアップして、紹介します。 Python 3 対応 Django 1.5 では
2012-11-25 Django で JSON.stringify された POST データを受け取る Backbone.js とか Spine はデフォルトで Content-Type: application/json & JSON.stringify されたデータを送信してくるので、Django の request.POST.get('hoge') で受け取る事ができず不便です。 Class base view のメソッドをいくつか継承して自前デコード + 分解してあげることで疑似 POST データを作ってあげるといいのかなーとおもいました。 Django の FormView は get_form_kwargs の戻り値を get_form に渡して form を生成しているので、get_form_kwargs をちょっといじります。urlencode しているのは json.l
Note There’s new content and tutorials coming! Sign up to be notified with Effective Django is updated. Django is a popular, powerful web framework for Python. It has lots of “batteries” included, and makes it easy to get up and going. But all of the power means you can write low quality code that still seems to work. Effective Django development means building applications that are testable, main
Djangoのcontribには、テンプレートでrestructuredtextなどのマークアップをHTMLに変換してくれるフィルタのセット、django.contrib.markupがあります。 https://docs.djangoproject.com/en/dev/ref/contrib/markup/ restructuredtextフィルターを使う場合は、docutilsのインストールが必要になります。 今回は、このrestructuredtextフィルターでblockdiagディレクティブを使えるようにしてみます。 ブロック図生成ツール blockdiag — blockdiag 1.0 ドキュメント 試したバージョンは、Python2.7、Django1.4.2、docutils0.9.1、blockdiag1.2.2です。 Djangoの初期化時に読み込まれるアプリケーシ
やりたかったことは、指定した緯度経度(GPSから取得した現在位置)に近い場所の検索と距離の算出でした。 DjangoだとPostGIS+GeoDjangoを使えばできますが、今回はデータベースがMySQLであるため、filterでdistanceが使えませんでした。 GeoDjango Database API | Django documentation | Django いい方法がないかググっていたら、Google Developersサイト内のGoogle Maps APIに関する記事で、PHPとMySQLを使う例があり、参考になりました。 Creating a Store Locator with PHP, MySQL & Google Maps | Google Maps APIs | Google Developers このページにあるSQLを少しいじってDjangoで
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く