sitemap

2011-09-04 Thread veva...@yandex.ru
Would You please help me to find a mistake? --- blog.model.py: from django.db import models class Entry(models.Model): title = models.CharField(max_length=150) body = models.TextField() is_draft = models.BooleanField() pub_date = models.DateField() def __unicode__(self):

Beginner's unit test question

2011-09-04 Thread Rodney Topor
I'm trying to use unit tests for the first time. In app/tests.py I have: import unittest from django.test.client import Client class IndexTest(unittest.TestCase): def test_index(self): client = Client() response = client.get('/index/')

Re: save_as only saves data showing on the form

2011-09-04 Thread Kejun He
save_model() ??? https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model On Sat, Sep 3, 2011 at 9:45 PM, zobbo wrote: > I have a very extensive model and and an admin form which contains key > fields from that model. Other

Re: logging django errors also on the server

2011-09-04 Thread Reinout van Rees
On 05-09-11 02:25, Gelonida N wrote: I see my own log traces. In many situations I do see error messages in the log output. An important thing that's not mentioned too clearly in Django 1.3's logging docs: *add a root logger*. So a logger with an empty string as a name. That one catches all

Re: logging django errors also on the server

2011-09-04 Thread Gelonida N
On 09/05/2011 02:03 AM, Reinout van Rees wrote: > On 05-09-11 00:58, Gelonida N wrote: >> Im am debugging a django application. >> >> If I set DEBUG=True >> then I can see error messages on the browser. >> >> Is there any way to see the same error messages in the server log file? >> Occasionally

Re: logging django errors also on the server

2011-09-04 Thread Reinout van Rees
On 05-09-11 00:58, Gelonida N wrote: Im am debugging a django application. If I set DEBUG=True then I can see error messages on the browser. Is there any way to see the same error messages in the server log file? Occasionally (especially for rpc client or Ajax requests I would prefer looking

logging django errors also on the server

2011-09-04 Thread Gelonida N
Hi, Im am debugging a django application. If I set DEBUG=True then I can see error messages on the browser. Is there any way to see the same error messages in the server log file? Occasionally (especially for rpc client or Ajax requests I would prefer looking at the log file instead of looking

JavaScript translation problem

2011-09-04 Thread galgal
Hi I have a problem with JS translation in Django. I did everything like is said in documentation, so: I made .po then .mo files (django.mo, djangojs.mo). Translated files are in path: *myapp/locale/pl/LC_MESSAGES/* and *myapp/locale/en/LC_MESSAGES/* *Translations in .html and .py files work

Re: Problem with file upload!

2011-09-04 Thread Ludvig
Im so sorry it was a typo, i did wrote self.request.method ==" POST" in code On Sep 4, 7:00 pm, Simon Connah wrote: > On 4 Sep 2011, at 11:25, Ludvig wrote: > > > added a print statement after self.request.post == "POST" and it came > > out, so its a post. > > You

Admin TabularInline add-another icon wraps onto another line

2011-09-04 Thread Lee
Depending on how many fields I have in my TabularInlines, the add- another icon (+) often displays below the foreign-key select list instead of next to it. There's no CSS class assigned to the so I can't widen that field. Anyone figure out an easy way to always display that icon to the right of

Re: Problem with file upload!

2011-09-04 Thread Simon Connah
On 4 Sep 2011, at 11:25, Ludvig wrote: > added a print statement after self.request.post == "POST" and it came > out, so its a post. You should use: if request.method == 'POST': instead. That is the correct method to determine whether a URL was requested using the POST method. -- You

Re: Problem with file upload!

2011-09-04 Thread Ludvig
added a print statement after self.request.post == "POST" and it came out, so its a post. On Sep 3, 9:29 am, Jeff Tchang wrote: > Can you verify that your request method is indeed a POST? Print it out > if necessary. > > -Jeff > > > > > > > > On Fri, Sep 2, 2011 at 10:39

Re: Problem with file upload!

2011-09-04 Thread Ludvig
No errors, and yes the file exists on the file system. I can see its title in request.raw_post_data On Sep 3, 2:34 am, Mo Mughrabi wrote: > is there any error messages you seeing? or logged? does the file exists on > the filesystem? > > > > > > > > On Fri, Sep 2, 2011 at

Need help on Pinax and Django

2011-09-04 Thread О . Тэмүлэн
Hello. I need help on django. I'm using Django project with Pinax. And i need to translate default login page also sign up page fields. But i can't find where should i translate. I found the signup.html but it uses this: ** *{% csrf_token %}* ** *{{