Is there any possibility that one project connect with more than one databases?

2008-12-25 Thread David
not support this requirement? Thx a lot! David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from

Re: Comma or Currency formats

2009-01-03 Thread David
On Jan 3, 5:33 am, phoebebright wrote: > On Jan 2, 7:06 pm, Shay Ben Dov wrote: > > > Hi, > > > I'm using GAE and wondering how come there is no comma insertion > > orcurrencyformating of floating numbers like: > > > {{ value|floatformat:2 }}

Django Production Setup / Threading / Fcgi

2009-01-27 Thread David
of behaviour and problems i will expect in a bigger production enviroment. Regards David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

I quit my job and now I'm making roughly 150 dollars a day! haha

2007-08-04 Thread David
About a month ago I quit my job at Hollister. I didn't quit it because I didn't like it there I quit because I was making about 150-200 dollars a day filling out opinion surveys for Nike. I mean seriously that's close to four times what I was making at Hollister. There are still job openings if

Re: CSS problem

2007-11-09 Thread David
128 __init__.pyc dir media: 09.11.2007 10:54 images 14.08.2007 18:37 4'929 style.css I get the content of the html-file (in templates/myDir) but no style or images. I use Django version 0.97-pre-SVN-6654 what can be wrong here? thanks for any hints david

Re: CSS problem

2007-11-09 Thread David
excuse me, can you explain this please? On Nov 9, 7:25 pm, pepe <[EMAIL PROTECTED]> wrote: > alert('x'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: CSS problem

2007-11-12 Thread David
Nobody that could help me? Do you need further information? On Nov 9, 7:16 pm, David <[EMAIL PROTECTED]> wrote: > I seem to have a similar (stupid) problem, which I just can't get: > (Though it's not the backslashes!) > > This is from my settings.py: > MEDIA_ROOT = 'C:

Re: CSS problem

2007-11-13 Thread David
Thank you Lazlo, today your my hero! David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from

POST data delay

2008-10-14 Thread david
Hi hope all is well. Please tell me if this is related to Django. Using Django 1.0 with Apache 2.2.9. Have a very simple form by writing to the Httpresponse directly. r = HttpResponse() r.write('') r.write('First name: ') r.write('') r.write('') return r After the form is displayed on the

Re: POST data delay

2008-10-14 Thread david
On Oct 15, 11:42 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-10-14 at 17:38 -0700, david wrote: > > Hi hope all is well.  Please tell me if this is related to Django. > > > Using Django 1.0 with Apache 2.2.9. > > > Have a very simple fo

Non-Programmer Help: filter_insterface error?

2008-10-14 Thread David
Hello, I'm not a python programmer, this is the first time I've ever worked with a python app. I'm trying to install "Surftrackr" for my company and I have a problem. I have searched and can not find any clear answers. I have the installed the latest svn of Django. (I started out with the

Re: Non-Programmer Help: filter_insterface error?

2008-10-15 Thread David
() got an unexpected keyword argument 'max_length' On Oct 14, 11:25 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 15, 2008 at 1:20 AM, David <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm not a python programmer, this is the first time I

Re: Non-Programmer Help: filter_insterface error?

2008-10-15 Thread David
, Oct 15, 2008 at 1:20 AM, David <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm not a python programmer, this is the first time I've ever worked > > with a python app.  I'm trying to install "Surftrackr" for my company > > and I have a problem.  I h

Re: Non-Programmer Help: filter_insterface error?

2008-10-15 Thread David
THANK YOU THANK YOU THANK YOU THANK YOU 7388 worked perfectly! On Oct 15, 8:40 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 15, 2008 at 11:15 AM, David <[EMAIL PROTECTED]> wrote: > > > Can you tell me what the last Revision from the SVN that

Re: Model inheritance problem in admin

2008-07-14 Thread David
Thanks, Malcolm. It was great to see inheritance in the first place, and we'll just wait for newforms-admin to use an admin interface to it. On Jul 14, 5:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-14 at 14:46 -0700, David wrote: > > When I save objects

Django and dynamic database'ing

2008-09-02 Thread David
? such as regular maintenance or in my case creation of tables due to an external factor. If any clarification is needed, just email me. Also, does anyone have simple example or using django with script.aculo.us? Much obliged! Best, David --~--~-~--~~~---~--~~ You received

Handling 'unique'

2008-09-02 Thread David
Hi, when setting (for example) name = models.CharField('Name', max_length=50, unique = True) How does one go about handling the exception if a name is entered that already exists in the database? Thanks, David, --~--~-~--~~~---~--~~ You received this message

handling unique entries

2008-09-03 Thread David
Hi, when setting (for example) name = models.CharField('Name', max_length=50, unique = True) How does one go about handling the exception if a name is entered that already exists in the database? Thanks, David, --~--~-~--~~~---~--~~ You received this message

Forms

2008-09-09 Thread David
Hey, I seem to be doing something wrong as when I click on the button on the page the message does not change? - {% block title %}Person Form{% endblock %} {% block

Re: Forms

2008-09-09 Thread David
duh! apologies - misspelt 'FORM' (Jesus) On Sep 9, 6:34 pm, David <[EMAIL PROTECTED]> wrote: > Hey, I seem to be doing something wrong as when I click on the button > on the page the message doe

updating entry from form in django 1.0!?

2008-09-10 Thread David
whereas once you had p = get_object_or_404(Person, pk=pID) MyForm = forms.form_for_instance(p) f = MyForm(request.POST.copy()) how on earth do you do it now? I've tried simply f = MyForm(request.POST.copy()) where MyForm is previously defined as a class with model=Person, but then django thinks

Re: updating entry from form in django 1.0!?

2008-09-10 Thread David
Thanks, are they also any example of the case of form_for_model (as I am assuming the above is only with respect to form_for_instance) Thx. D. On Sep 10, 9:32 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 10, 8:56 am, David <[EMAIL PROTECTED]> wrote: > > > wher

Re: updating entry from form in django 1.0!?

2008-09-10 Thread David
== 'POST': if request.POST['submit'] == 'add': bf = BlogForm(request.POST.copy()) SaveForm = forms.form_for_model(Blog) ... On Sep 10, 10:42 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 10, 9:56 am, David <[EMAIL PROTECTED]> wrote: > > > Thanks, a

manage.py syncdb error

2009-04-29 Thread David
elf, exc, value) File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1142, "CREATE command denied to user 'david'@'localhost' for table 'auth_permission'")

Re: manage.py syncdb error

2009-04-29 Thread David
AGE ON *.* TO 'david'@'localhost' IDENTIFIED BY PASSWORD '*2A032F7C5BA932872F0F045E0CF6B53CF702F2C5' | | GRANT ALL PRIVILEGES ON `david_database`.`david_database` TO 'david'@'localh

Re: manage.py syncdb error

2009-04-29 Thread David
i see. i should grant priviliges on the database that table 'auth_permission' belongs to. let me do it. thanks. On Apr 29, 3:32 pm, David <ww...@yahoo.com> wrote: > mysql>

Re: manage.py syncdb error

2009-04-29 Thread David
sorry i can not find a database that table 'auth_permission' belongs to. any more hints what i should do? thanks so much. On Apr 29, 3:35 pm, David <ww...@yahoo.com> wrote: > i see. i should grant priviliges on the database that table > 'auth_permission' belongs to.  let me do it

Re: manage.py syncdb error

2009-04-29 Thread David
it works now. thanks Kai. On Apr 29, 3:54 pm, Kai Kuehne <kai.kue...@gmail.com> wrote: > No TOFU please. > > On Thu, Apr 30, 2009 at 12:49 AM, David <ww...@yahoo.com> wrote: > > sorry i can not find a database that table > > 'auth_permission' belongs to. any mor

Help: django.contrib.admin

2009-04-30 Thread David
Hello, I followed Django tutorial 2 to activate the admin site, however I got da...@django:~/mysite$ python manage.py syncdb Error: No module named admindjango.contrib after I added "django.contrib.admin" to your INSTALLED_APPS setting. This is how it looks like. INSTALLED_APPS = (

Re: Help: django.contrib.admin

2009-04-30 Thread David
fixed... thanks! david On Apr 30, 8:42 am, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Apr 30, 2009 at 11:36 AM, David <ww...@yahoo.com> wrote: > > > Hello, > > > I followed Django tutorial 2 to activate the admin site, however I got > > > da..

Can not get Django admin page

2009-05-05 Thread David
Hello, I am following those steps in django tutorial 2, however I can not get "django administration: Username and Password" page. I still get the "Welcome" page. I did these steps twice but I got the same result. 1. Add "django.contrib.admin" to your INSTALLED_APPS setting. 2. Run

Re: Can not get Django admin page

2009-05-05 Thread David
...and I re-started the dev server as the 4th step david On May 5, 8:57 am, David <ww...@yahoo.com> wrote: > Hello, > > I am following  those steps in django tutorial 2,  however I can not > get "django administration: Username and Password" page. I still get >

Re: Can not get Django admin page

2009-05-05 Thread David
yes, i added "/admin" to the url. thanks, david On May 5, 9:05 am, Matthias Petermann <matth...@d2ux.org> wrote: > Did you add /admin to the URL? > > Kind regards, > Matthias > > Am Dienstag, den 05.05.2009, 09:03 -0700 schrieb David: > > > > &

Re: Can not get Django admin page

2009-05-05 Thread David
Hi Nate, You are right... I did not uncomment (r^...). now it works. thanks so much! and thanks too to Adam and Matthias! David On May 5, 9:43 am, Domain Admin <morb...@syphonedbrew.com> wrote: > In the urls.py did you also uncomment the last line where it says: > # Uncomm

mail add_flag

2009-05-12 Thread David
Hello, I have read related part in python library and also searched this list, however I still can not figure out where is wrong with my code. so I post my question. I am using the following code to process e-mails in a user account.

Where to configure this view

2009-06-02 Thread David
Hello, I added a "telephone_number = models.CharField(max_length=15)" in the "User" class in Django-1.0.2-final/django/contrib/auth/models.py. Now I need to add/update telephone numbers on admin page. Which file should I configure so that I can see this "telephone_number" on the admin page?

Re: Where to configure this view

2009-06-02 Thread David
Thanks Alex David On Jun 2, 3:00 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Jun 2, 2009 at 4:56 PM, David <ww...@yahoo.com> wrote: > > > Hello, > > > I added a "telephone_number = models.CharField(max_length=15)" in the > > "

How to import this module

2009-06-05 Thread David
Hello, In my project "mysite" directory I have "middleware.py". This "middleware.py" has only one class "SiteLogin" and this class has only one method "process_request". Now I need to import this "process_request" into "urls.py" in the "mysite" directory. Can anybody give me a clue how to do

Re: How to import this module

2009-06-05 Thread David
Thanks DR. I did put 'mysite.middleware.SiteLogin' into MIDDLEWARE_CLASSES in settings.py already, however I still get Exception Value: name 'process_request' is not defined On Jun 5, 8:35 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jun 5, 3:51 pm,

Re: How to import this module

2009-06-05 Thread David
Middleware class: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'mysite.middleware.SiteLogin', ) === urls.py: from

Re: How to import this module

2009-06-05 Thread David
place myproject with your project name) and you’re done" I must have did something wrong. Then how to enable a user login? On Jun 5, 9:07 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jun 5, 4:58 pm, David <ww...@yahoo.com> wrote: > > > > &

Re: How to import this module

2009-06-05 Thread David
I am new in this Django field so please do not get surprised when you see my stupid errors. any more suggestions on how to set up a user login page? Thanks. On Jun 5, 9:17 am, David <ww...@yahoo.com> wrote: > I am trying to set up a user login page. A user needs to login first &g

Re: How to import this module

2009-06-05 Thread David
thanks for your information. it is quite helpful. thanks again. On Jun 5, 9:27 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jun 5, 5:17 pm, David <ww...@yahoo.com> wrote: > > > I am trying to set up a user login page. A user needs to login first

accounts/profile question

2009-06-05 Thread David
Hello, I have set up a user login page and it works. However I do not know how to redirect this user to his/her account. I have (r'^accounts/login/$', 'django.contrib.auth.views.login'), in my urls.py. When a user types his/her username/password correctly, the url transfers to

Re: accounts/profile question

2009-06-05 Thread David
ok. then is there a default userpage template that I can use? thanks. On Jun 5, 1:23 pm, Phil Mocek <pmocek-list-django-us...@mocek.org> wrote: > On Fri, Jun 05, 2009 at 01:21:50PM -0700, David wrote: > > Is there a homepage for users by default? > > That is a question a

Re: accounts/profile question

2009-06-05 Thread David
I see. thanks. On Jun 5, 1:30 pm, "Gabriel ." <gabriel@gmail.com> wrote: > On Fri, Jun 5, 2009 at 5:21 PM, David<ww...@yahoo.com> wrote: > > > Hello, > > > I have set up a user login page and it works. However I do not know > > how to redir

Question about login

2009-06-06 Thread David
Hello, Just wonder if anybody has met this. I modified LOGIN_REDIRECT_URL from "accounts/profile" to 'accounts' but Django still re-directs to "accounts/profile" after a user has logined successfully. If LOGIN_REDIRECT_URL is the url for default re-directing, then why it still comes the word

Re: Question about login

2009-06-06 Thread David
Your reply is truely helpful! Thanks Gabriel! On Jun 6, 7:22 pm, Gabriel <gabriel@gmail.com> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > David escribió: > > > > > > > Hello, > > > Just wonder if anybody has met this.

What template: admin site

2009-06-08 Thread David
Hello, Following the online tutorial I have created "mysite" project. After I have logined into admin, I can see Auth --- Mysite Sites. Now I would like to use the same layout/template for my user home page as this admin page. I have read django/contrib/admin/sites.py but could not find

Re: What template: admin site

2009-06-08 Thread David
Thanks Alex! Now I know where to start. On Jun 8, 10:18 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Jun 8, 2009 at 12:14 PM, David <ww...@yahoo.com> wrote: > > > Hello, > > > Following the online tutorial I have created "mysite" project.

How to retrieve "sms" for a user on Admin

2009-06-09 Thread David
Hi, I am in a position of "/admin/auth/user/", where it lists a user's username, e-mail address, first name, last name and staff status. The title of this page is "Select user to change". If I click a user's username, then I am transferred to "Change user" webpage. I checked

Re: How to retrieve "sms" for a user on Admin

2009-06-09 Thread David
Actually I have already created a "userProfile" that extends User. In the "userProfile" I have "sms". However, this makes me have an extra table though it works. I just wonder if I should modify the original view or just use this userProfile to extend.

Re: How to retrieve "sms" for a user on Admin

2009-06-09 Thread David
Thanks Alex. Then I do not make any modifications. Have a great day. On Jun 9, 8:29 am, David <ww...@yahoo.com> wrote: > Actually I have already created a "userProfile" that extends User. In > the "userProfile" I have "sms".  However, this makes me ha

Is it possible to write this with Q package?

2009-07-10 Thread David
Hello, I have some records in MySQL database. Each record has id: Primary Key, autoincrement Type: varchar Price: float Date: dateTime Type can be a "car" or a "truck". There are many records whose Type is "car" or whose Type is "truck". Date has a format of "2009-07-07 20:00:00". This

How to get this value

2009-07-13 Thread David
Hello, I have following code: alertcriteria1 = Alert_Criteria1.objects.all ()...(1.) for eachcriterion in alertcriteria1:. (2.)

Re: How to get this value

2009-07-13 Thread David
I do not know why the code gets seperated. Here it is. alertcriteria1 = Alert_Criteria1.objects.all() for eachcriterion in alertcriteria1: dataset1 = eachcriterion.dataset criteria1_metric1=

Re: How to get this value

2009-07-13 Thread David
Thanks Amit. Here is the problem that I meet. alerts = Alert.objects.filter((Q(dataset=dataset1) for eachalert in alerts: e_metric1 = eachalert.criteria1_metric1 Django complains that there is no such item "criteria1_metric1" in Alert class. This is correct as Alert class does not have

Re: How to get this value

2009-07-13 Thread David
ore ideas? I am also googling online to see if I can find a solution. On Jul 13, 3:29 pm, Javier Guerra <jav...@guerrag.com> wrote: > On Mon, Jul 13, 2009 at 4:36 PM, David<ww...@yahoo.com> wrote: > > > Thanks Amit. Here is the problem that I meet. > > > alerts =

Re: How to get this value

2009-07-13 Thread David
t;> On Jul 13, 3:53 pm, Javier Guerra <jav...@guerrag.com> wrote: > On Mon, Jul 13, 2009 at 5:48 PM, David<ww...@yahoo.com> wrote: > > TypeError: 'Alert' object is unsubscriptable > > sorry, i was mixing languages. > > try &

Re: How to get this value

2009-07-13 Thread David
Hi Sam, Cool! It works. Thanks so much! On Jul 13, 4:49 pm, Sam Lai <samuel@gmail.com> wrote: > Try: > > getattr(eachalert, criteria1_metric1) or something similar. look up > the getattr python function. > > On 7/14/09, David <ww...@yahoo.com> wrote: &g

Re: How to get this value

2009-07-13 Thread David
ide the first for loop. This is not what I wanted. Thanks again. On Jul 13, 4:52 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Jul 13, 2009 at 5:36 PM, David <ww...@yahoo.com> wrote: > > > Thanks Amit. Here is the problem that I meet. > > > ale

Re: How to get this value

2009-07-13 Thread David
Before I posted my code, I formatted them carefully on wordpad. However, they became so messy after I posted them. Is it possible to do anything to clear such a problem? just wondering this. On Jul 13, 5:15 pm, David <ww...@yahoo.com> wrote: > Hi Karen, > > Thanks for

How to create this filter

2009-07-24 Thread David
Hello, Here is a table "myTable" with columns of "col1", "col2", "col3", ..., "col5". The types of these columns are all float. Now for two values from any two columns of these columns, I may need to add, or subtract, or multiply or divide these two values. With this result, I do a condition

Re: How to create this filter

2009-07-24 Thread David
4, 2:01 pm, Frédéric Hébert <fg.heb...@gmail.com> wrote: > It seems to me that you have to transform your fields lookup like that : > >  col1_value >= col2_value * 2 > > something like col1__gte=F('col2') * 2 > > Frédéric > > 2009/7/24 David <ww...@yahoo.com

Re: How to create this filter

2009-07-24 Thread David
Great. I go to pick up extra() to use. Thanks Tim. On Jul 24, 2:33 pm, Tim Chase wrote: > > Such a transformation is fine. I found that my Django has no F(). > > Checking the Django doc I saw that this new feature is "New in Django > > Development version". >

Re: How to create this filter

2009-07-24 Thread David
: >, >=, <, =, etc col_var_2: col1, or col2, etc manipulation_operator: +, -, x, / constant_value: float value in the where clause, I have to use these variables. What's the syntax? any help? thanks so much. On Jul 24, 2:39 pm, David <ww...@yahoo.com> wrote: > Great. I g

Re: How to create this filter

2009-07-24 Thread David
I used this syntax .extra(where=['%s >= %s - %s'], params=['criteria1_metric1', 'criteria1_metric2', 'criteria1_value']) however I got error. On Jul 24, 4:16 pm, David <ww...@yahoo.com> wrote: > Here comes a new problem. I do not know which columns' values to use;

Re: How to create this filter

2009-07-25 Thread David
If I use variable names without quotes in "params[]", I get errors too. My Python is 2.5. It does not have this string formatting feature. It's new in 2.6. On Jul 25, 6:58 am, Necmettin <necmettin.begi...@gmail.com> wrote: > On 25 Temmuz, 02:23, David <ww...@yahoo.co

Is it possible to combine these two queries?

2009-07-30 Thread David
Hi, I have two queries as follows. al_1 = Alert.objects.filter(creation_date__regex=today).values ('dimension1').annotate(Sum('metric1')).order_by('dimension1') and al_2 = Alert.objects.filter(creation_date__regex=yesterday).values

Template and substitute

2009-08-01 Thread David
Hi, When I tested sql of MySQL in Python interactive shell, I got an error of "not enough arguments for format string". I checked the arguments however I could not find anything wrong. Can anybody give me a clue? Thanks so much. >>> sql = Template('select dimension1

Re: Is it possible to combine these two queries?

2009-08-02 Thread David
Thanks Tim. Your reply is quite helpful. On Jul 30, 6:25 pm, Tim Chase wrote: > > al_1 = Alert.objects.filter(creation_date__regex=today).values > > ('dimension1').annotate(Sum('metric1')).order_by('dimension1') > > > and > > > al_2 =

Re: Template and substitute

2009-08-04 Thread David
Thanks for your replies. On Aug 4, 4:16 am, David De La Harpe Golden <david.delaharpe.gol...@ichec.ie> wrote: > Malcolm Tredinnick wrote: > > You seem to be trying to create raw SQL using Django's template system. > > Please don't do that. It's like trying to u

Simultaneous use of the admin interface

2009-08-05 Thread David
Using Django 1.1 if I do: 1) sign into admin as user A in one browser and begin to edit a record 2) sign into admin as user B in another browser and begin to edit the SAME record 3) make a change as user A and press Save 4) make a different change as user B and press Save The result is that A's

Re: Simultaneous use of the admin interface

2009-08-05 Thread David
On Aug 5, 5:21 pm, Margie wrote: >  I think > that when fields became editable in 1.1, this was not handled and > needs to be adressed in order for multiple people to modify at once. > Thanks Margie. I wasn't referring to list_editable though, but perhaps the

Re: Simultaneous use of the admin interface

2009-08-05 Thread David
> 1) sign into admin as user A in one browser and begin to edit a record > 2) sign into admin as user B in another browser and begin to edit the > SAME record To clarify, both users have their browsers pointing at the editing form for the same instance of the same model, e.g.:

How to get this URI

2009-08-07 Thread David
Hello, My project is Web-based and I work in Django environment on Linux. Let me give a Scenario first. A user whose username is "peter" logins into "www.myfoo.com" online. After his username/password get authenticated, he arrives this webpage "www.myfoo.com/user_login". On this page it looks

Re: How to get this URI

2009-08-07 Thread David
I never know why I missed that part when I read it before. Anyway, thanks DR for your clue. On Aug 7, 10:23 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Aug 7, 6:16 pm, David <ww...@yahoo.com> wrote: > > > > > > > Hello, > > > My project

Question about request.user

2009-08-10 Thread David
hello, Here is what I met. I logined into my Django application online with a username "peter". Then I logined with another username "john". All seemed fine. Now I printed user name in "john" account, and it gave "peter". I used following code. if request.user.is_authenticated(): print

Re: Question about request.user

2009-08-10 Thread David
ls.User". any more ideas? On Aug 10, 2:33 pm, "Carlos A. Carnero Delgado" <carloscarn...@gmail.com> wrote: > Hi, > > On Mon, Aug 10, 2009 at 4:46 PM, David<ww...@yahoo.com> wrote: > > Why request.user.username did not bind to "john" in this sce

Is it possible to skip this field?

2009-08-10 Thread David
Hello, When I use the following code, {{ form.as_table }} . It prints all form fields with corresponding values on a user's monitor. Now that in that form there is a field "username", for some reasons I can not show this information to that user even

Re: Is it possible to skip this field?

2009-08-10 Thread David
Great. Thanks Daniel! On Aug 10, 3:04 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Aug 10, 10:58 pm, David <ww...@yahoo.com> wrote: > > > > > > > Hello, > > > When I use the following code, > >

Re: Question about request.user

2009-08-10 Thread David
I tested this again with IE and Firefox. On IE I logined as "peter" and then I logined as "john" on Firefox. Now I checked user in "peter" account with "request.user.username", and I got "john". Can anybody do this test on your machine?

Re: Question about request.user

2009-08-11 Thread David
This fixes the problem. Thanks Gustavo! On Aug 11, 6:07 am, Gustavo Henrique wrote: > maybe a problem with cache. > try this: > > from django.views.decorators.cache import never_cache > @never_cache > def yourview(request): >    # your code here > > -- > Gustavo

How to get this auto-field id value

2009-08-11 Thread David
Hello, I am trying to retrieve an autoField id value in my following code when I update records. def update_record(request): if request.POST: form = Model_Form(request.POST) if form.is_valid(): form.save(pk=form.id, force_update=True) I got an error that

Re: How to get this auto-field id value

2009-08-11 Thread David
Just a little more information. The autoField id is in the model class. Model_Form is a form based on this model class. On Aug 11, 9:20 am, David <ww...@yahoo.com> wrote: > Hello, > > I am trying to retrieve an autoField id value in my following code > when I updat

Re: How to get this auto-field id value

2009-08-11 Thread David
Any tips/suggestions are highly appreciated... On Aug 11, 9:26 am, David <ww...@yahoo.com> wrote: > Just a little more information. The autoField id is in the model > class.  Model_Form is a form based on this model class. > > On Aug 11, 9:20 am, David <ww...@yahoo.com>

Modification difference in Adm and user accounts

2009-08-14 Thread David
Hello, Here is what I meet. In "Admin" account I can see all users' records. If I modify a user's record, say "Peter", then I can see Peter's modified record immediately if i refresh my browser. However, If I login into "Peter" account (as a user) and do this modification, then I can not see

QuerySet's cache

2009-08-16 Thread David
'two') # expecting queryset to use cache, which does not contain new tag >>> queryset [, ] # hmm, maybe not?? Any help on clarifying this would be greatly appreciated! David --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: QuerySet's cache

2009-08-16 Thread David
Ah, ok that makes more sense now. Thank you! On Aug 16, 5:52 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Sun, Aug 16, 2009 at 8:42 AM, David<davidsh...@googlemail.com> wrote: > > > Hi all, > > > I'm a bit puzzled by the caching behaviour of QuerySets, wh

Problem with "Cancel" button

2009-08-18 Thread David
Hello, I have a "Cancel" button on one of my Webpages. The button sometimes works as expected, sometimes it does not. After the button has been clicked, it is supposed that the webpage is re-directed to another page. However, this re-direction seems not work all the time. Following is my script.

Re: Problem with "Cancel" button

2009-08-19 Thread David
Thanks Thomas for your reply. I just tested it with Firefox. "Cancel" button works perfect. With IE "Cancel" button has such a problem. Let me do more test and see. On Aug 19, 7:50 am, Thomas Guettler <h...@tbz-pariv.de> wrote: > Hi David, > > David schrieb:

Column font: strong or not strong

2009-08-20 Thread David
Hello, I searched this list and googled online, however I could not find an answer. So I post my question here. In my model I have criteria1_value = models.FloatField(max_length=12) condition_dimension1= models.CharField(max_length=255, null=True, blank=True,) When I

Chaining filters on a ManyToManyField

2009-08-25 Thread David
Hi all, I am trying to understand spanning multi-valued relationships (as documented here http://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-valued-relationships). More specifically, these paragraphs: "Everything inside a single filter() call is applied simultaneously to

Configure Django project in a subdirectory using mod_python. Apps and Admin not found.

2009-08-26 Thread David
HI guys. I was trying to configure my django project in a subdirectory of the root, but didn't get things working.(Locally it works perfect). I followed the django official django documentarion to deploy a project with mod_python. The real problem is that I am getting "Page not found" errors,

Session problem?

2009-08-28 Thread David
hello Django community, I met this problem and can not find a solution. I wonder if any people has met this problem before? Can anybody give a clue or hint how to fix it? For my project, I have enabled sessions and I use contrib.auth.models.User. If one user logins into his/her account, all is

Re: Session problem?

2009-08-28 Thread David
ensure is viewable only to the logged-in user. > > > > On Fri, Aug 28, 2009 at 12:00 PM, David <ww...@yahoo.com> wrote: > > > hello Django community, > > > I met this problem and can not find a solution. I wonder if any people > > has met this problem be

Re: Session problem?

2009-08-28 Thread David
h_user.first_name}} > {{ my_auth_user.last_name}} > {{ my_auth_user.email}} > > This ensures the the User object for that id belongs to is being called to > get the username and other information. > > Of course, you can pass into the template the cookies and session id stuff >

Can't get css working

2009-10-14 Thread David
oject/media_site/" MEDIA_URL = "/media_site/" ADMIN_MEDIA_PREFIX = "/media/" in the template base.html: blabla in urls.py: patterns('', (r'^media_site/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), ... ) from the terminal

Re: Can't get css working

2009-10-14 Thread David
cGaw <jpmc...@gmail.com> wrote: > Hi David, > > I don't anything wrong with what you've typed. I have one suggestion: > use the os.path module from Python to avoid hard-coding the paths to > your project. Inside of settings.py, you could add: > > import os > # CURRENT_PATH

How to start this dev server

2009-10-14 Thread David
Hello django community, I checked out a django project from svn and tried to start dev server, however I met d...@sgbr:~/nimma$ python manage.py runserver Error: No module named nimma d...@sgbr:~/nimma$ In my home directory I have nimma -> svn/nimma/trunk/ svn and "svn" is a work copy and

  1   2   3   4   5   6   7   8   9   10   >