Dec 312009

Google App Engine lets you run your web applications on Google’s infrastructure.
It is kind of web hosting server I think.
Django can be also served with google app engine.

Posted by weboom at 1:42 am Tagged with: , ,
Dec 012009

After you made changes,
to see its effect,
execute restart under apache2/bin/
>/home/pyncus/webapps/django11/apache2/bin/restart

Posted by weboom at 2:40 am Tagged with: , ,
Dec 012009

First, download Django-1.1.1.tar.gz. Then:
tar xzvf Django-1.1.1.tar.gz
cd Django-1.1.1
sudo python setup.py install

Posted by weboom at 12:33 am Tagged with: , , ,
Sep 142009

When I have been surfing around django sites, I saw many webfaction service advertised.
For my new project, I just started to search for web hosting service and finally decided to go with Webfaction.
The major concern I had in choosing webfaction was limited disk space and bandwidth.
However, I realized that anyway my website will have low [...]

Posted by weboom at 4:34 pm Tagged with: , ,
Sep 102009

I found an interesting python development method that can be done from a usb drive.
portable python
portableapps.com has many interesting apps:
1. commandprompt portable
2. notepad++ portable
3. sumatrapdf portable
4. putty portable
5. winscp portable
etc.
After installing portablepython
execute
SPE-Portable.exe
open manage.py
and run (F9) with argument “runserver”

Posted by weboom at 5:57 pm Tagged with: , ,
Aug 042009

Then,
import datetime

Posted by weboom at 7:49 am Tagged with: , ,
Aug 032009

You may get the above error message in
—-
from biz.models import Entry, City, Category
class CityAdmin(admin.ModelAdmin):
list_display = (’name’)
admin.site.register(City, CityAdmin)
———
to fix,
list_display = (’name’,)

Posted by weboom at 5:36 am Tagged with: , ,
Aug 022009

In urls.py
urlpatterns = patterns(’mysite.bizcard.views’,
(r’^about$’, views.simple, {’template_name’:’about.html’}),
(r’^help/$’, views.simple, {’template_name’:’help.html’}),
)
In views.py
def simple(request, template_name):
return render_to_response(template_name, {’book_list’:Book.objects.all()})
——–
Note here that single view function can render multiple template files.

Posted by weboom at 7:31 pm Tagged with: ,
Aug 022009

1.
(r’^articles/(\d{4})/(\d{2})/$’, month_archive)
vs.
2.
(r’^articles/(?P<year>\d{4})/(?P<month>\d{2})/$’, month_archive)
The first one: positional argument
The second one: keyword argument
For example, a request to
/articles/2009/10/
would result in
1. month_archive (request, ‘2009′,’10′)
2. month_archive(request, year=’2009′, month=’10′)

Posted by weboom at 7:25 pm Tagged with: , , , , ,
Aug 022009

Use
delete() method
—–
e.g.,
>>>Card.objects.get(name=’Hot Pot’).delete()
>>>Card.objects.filter(city=’USA’).delete()
>>>Card.objects.all().delete()
Note that
>>>Card.objects.delete()
is not working.

Posted by weboom at 5:58 am Tagged with: , ,
Switch to our mobile site
Page 1 of 512345»Top Footer