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

2008-12-25 Thread David
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 }} built_in filter > > > Shay > > You could > tryhttp:

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 ob

Django and dynamic database'ing

2008-09-01 Thread David
cedures to cron job's working with django? 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 --~--~-

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 th

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 th

django and sql databases

2008-09-03 Thread David
cedures to cron job's working with django? such as regular maintenance or in my case creation of tables due to an external factor. thanks David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: handling unique entries

2008-09-04 Thread David
In the admin, I just get a trace of errors yayks! On Sep 3, 5:28 pm, [EMAIL PROTECTED] wrote: > In the admin, or on the site in a view? > > On Sep 3, 12:12 pm, David <[EMAIL PROTECTED]> wrote: > > > Hi, > > when setting (for example) > > name = models.Cha

Re: django and sql databases

2008-09-04 Thread David
correctly one can add an extra column within an existing table (and then I assume have another table for date stamps, or two columns in the original table). In either case, how would you go about adding columns and have django deal with the change in table structure? Thanks, David On Sep 3, 10:

Re: handling unique entries

2008-09-05 Thread David
Thanks Karen, I've updated. On Sep 4, 6:02 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 4, 2008 at 12:52 PM, David <[EMAIL PROTECTED]> wrote: > > > In the admin, I just get a trace of errors yayks! > > What level of Django are

Extending User Model with obligatory fields

2008-09-05 Thread David
Hi, I have a clients table, and I need each user to belong to a client. So in fact what I need is to extend the user model with one additional obligatory field. I have already seen the UserProfile approach, but that is not obligatory, meaning I can create a user without the profile, because the

form_for_instance

2008-09-06 Thread David
;) p = get_object_or_404(Person, pk=pID) PersonForm = forms.form_for_instance(p) pForm = PersonForm() return render_to_response('person_form.html', {'pForm':pForm}) Thanks, David. --~--~-~--~~~---~--~~ You received this message bec

Re: form_for_instance

2008-09-06 Thread David
nm i figured it out. class PersonForm(ModelForm): class Meta: model = Person def person_form(request, pID='0'): p = get_object_or_404(Person,pk=pID) #PersonForm = forms.ModelForm() pForm = PersonForm() On Sep 6, 5:03 pm, David <[EMAIL PROTECTED]

Re: form_for_instance

2008-09-06 Thread David
oops, should be. pForm = PersonForm(instance=p) On Sep 6, 5:14 pm, David <[EMAIL PROTECTED]> wrote: > nm i figured it out. > > class PersonForm(ModelForm): >     class Meta: >           model = Person > > def person_form(request, pID='0'): >

interacting django with external programs

2008-09-06 Thread David
Hey'a I have a newbie question. I want to execute an external (lets say python, but can be any) program given a interval set by a user (which would be in the user table). The external program would update the sql database. I thought of doing this with a cronjob but as they may be a number of use

Re: interacting django with external programs

2008-09-07 Thread David
e rest of > the work is in your Python code. > > --Ned.http://nedbatchelder.com > > > > David wrote: > > Hey'a I have a newbie question. > > > I want to execute an external (lets say python, but can be any) > > program given a interval set by a u

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 content

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 m

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
logForm() p = get_object_or_404(Person,pk=pID) if request.method == '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:

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 br

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 rele

Re: Non-Programmer Help: filter_insterface error?

2008-10-15 Thread David
;max_length' surftrackr.preferences: __init__() 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, > >

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

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

Django Production Setup / Threading / Fcgi

2009-01-27 Thread David
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

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 values

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.) dataset

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= eachcriterion.

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 suc

Re: How to get this value

2009-07-13 Thread David
gt; any more ideas? I am also googling online to see if I can find a solution. On Jul 13, 3:29 pm, Javier Guerra wrote: > On Mon, Jul 13, 2009 at 4:36 PM, David wrote: > > > Thanks Amit. Here is the problem that I meet. > > > alerts = Alert.objects.filter((Q(datas

Re: How to get this value

2009-07-13 Thread David
x27;get' >>> On Jul 13, 3:53 pm, Javier Guerra wrote: > On Mon, Jul 13, 2009 at 5:48 PM, David wrote: > > TypeError: 'Alert' object is unsubscriptable > > sorry, i was mixing languages. > > try "e_metric1 = eachalert.get (criteria1_metric1)&quo

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 wrote: > Try: > > getattr(eachalert, criteria1_metric1) or something similar. look up > the getattr python function. > > On 7/14/09, David wrote: > > > > > > > > > still no lu

Re: How to get this value

2009-07-13 Thread David
side the first for loop. This is not what I wanted. Thanks again. On Jul 13, 4:52 pm, Karen Tracey wrote: > On Mon, Jul 13, 2009 at 5:36 PM, David wrote: > > > Thanks Amit. Here is the problem that I meet. > > > alerts = Alert.objects.filter((Q(dataset=dataset1) > >

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 wrote: > Hi Karen, > > Thanks for your long reply. Though thi

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 chec

Re: How to create this filter

2009-07-24 Thread David
4, 2:01 pm, Frédéric Hébert 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 : > > > > > > > &

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". > > > So I have to wait for the new

Re: How to create this filter

2009-07-24 Thread David
rator: >, >=, <, =, 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 wrote: > Great. I go to pick up extr

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 wrote: > Here comes a new problem. I do not know which columns' value

Re: How to create this filter

2009-07-24 Thread David
anybody likes to give me help? thanks so much. On Jul 24, 4:23 pm, David wrote: > I used this syntax > > .extra(where=['%s >= %s - %s'], params=['criteria1_metric1', > 'criteria1_metric2',  'criteria1_value']) > > however I got erro

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 wrote: > On 25 Temmuz, 02:23, David wrote: > > > I used this syntax > &g

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 ('dimension1').annotate(Sum('metric1')).order_by('dimension1'

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 ,adddate(current_date,-1)

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 = Alert.objects.filter(creation_date__regex=yesterday).values

Re: Template and substitute

2009-08-04 Thread David
Thanks for your replies. On Aug 4, 4:16 am, David De La Harpe Golden 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 use a shovel to hammer in

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 problem is the same? --~--~-

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.: http://example.com/

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 wrote: > On Aug 7, 6:16 pm, David wrote: > > > > > > > Hello, > > > My project is Web-based and I work in Django environment on

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

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" wrote: > Hi, > > On Mon, Aug 10, 2009 at 4:46 PM, David wrote: > > Why request.user.username did not bind to "john" in this scenario? > > Anybody knows what caused such a p

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 thoug

Re: Is it possible to skip this field?

2009-08-10 Thread David
Great. Thanks Daniel! On Aug 10, 3:04 pm, Daniel Roseman wrote: > On Aug 10, 10:58 pm, David wrote: > > > > > > > Hello, > > > When I use the following code, > > >   > >         > >             {{ form.as_table }} > >         &g

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? Tha

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 Henriquehttp://www.gustavohenriq

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 "Model_F

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 wrote: > Hello, > > I am trying to retrieve an autoField id value in my following code > when I update records. > > def upd

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 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 wrote: > > > > > Hello, >

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 the

QuerySet's cache

2009-08-16 Thread David
objects.create(name='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

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 wrote: > On Sun, Aug 16, 2009 at 8:42 AM, David wrote: > > > Hi all, > > > I'm a bit puzzled by the caching behaviour of QuerySets, when used in > > iteration and when called with repr()

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 wrote: > Hi David, > > David schrieb: > > > Hello, &g

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 log

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 fil

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, when

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 p

Re: Session problem?

2009-08-28 Thread David
equired right before each def that I want to > ensure is viewable only to the logged-in user. > > > > On Fri, Aug 28, 2009 at 12:00 PM, David wrote: > > > hello Django community, > > > I met this problem and can not find a solution. I wonder if any people &g

Re: Session problem?

2009-08-28 Thread David
{{ my_auth_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

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 '

Re: manage.py syncdb error

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

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 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 wrote: > i see. i should grant priviliges on the database that table > 'auth_permission' belongs to.  let me do it. &g

Re: manage.py syncdb error

2009-04-29 Thread David
it works now. thanks Kai. On Apr 29, 3:54 pm, Kai Kuehne wrote: > No TOFU please. > > On Thu, Apr 30, 2009 at 12:49 AM, David wrote: > > sorry i can not find a database that table > > 'auth_permission' belongs to. any more hints what i should d

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 = ( 'django

Re: Help: django.contrib.admin

2009-04-30 Thread David
fixed... thanks! david On Apr 30, 8:42 am, Karen Tracey wrote: > On Thu, Apr 30, 2009 at 11:36 AM, David wrote: > > > Hello, > > > I followed Django tutorial 2 to activate the admin site, however I got > > > da...@django:~/mysite$ python manage.py syn

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 python

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 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 > the "Welcome"

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 wrote: > Did you add /admin to the URL? > > Kind regards, > Matthias > > Am Dienstag, den 05.05.2009, 09:03 -0700 schrieb David: > > > > > ...and I re-started

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 wrote: > In the urls.py did you also uncomment the last line where it says: > # Uncomment the next line to enable the

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? Ca

Re: Where to configure this view

2009-06-02 Thread David
Thanks Alex David On Jun 2, 3:00 pm, Alex Gaynor wrote: > On Tue, Jun 2, 2009 at 4:56 PM, David wrote: > > > Hello, > > > I added a "telephone_number = models.CharField(max_length=15)" in the > > "User" class in Django-1.0.2-final/django/contri

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 thi

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 wrote: > On Jun 5, 3:51 pm, David wrote: > >

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 django.conf.urls.de

Re: How to import this module

2009-06-05 Thread David
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 wrote: > On Jun 5, 4:58 pm, David wrote: > > > > > > > Middleware class: > > > MIDDLEWARE_CLASSES =

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 wrote: > I am trying to set up a user login page. A user needs to login first > before he/she can do an

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 wrote: > On Jun 5, 5:17 pm, David wrote: > > > I am trying to set up a user login page. A user needs to login first > > before he/she can do anything. > > > I refe

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 http://ip_addres

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 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 about your application, not about the Dja

Re: accounts/profile question

2009-06-05 Thread David
I see. thanks. On Jun 5, 1:30 pm, "Gabriel ." wrote: > On Fri, Jun 5, 2009 at 5:21 PM, David wrote: > > > 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 acc

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 "pro

Re: Question about login

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

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 whi

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 wrote: > On Mon, Jun 8, 2009 at 12:14 PM, David wrote: > > > Hello, > > > Following the online tutorial I have created "mysite" project. After I > > have logined into admin, I can see

  1   2   3   4   5   6   7   8   9   10   >