os.path

2010-08-01 Thread yalda.nasirian
hi note If you want to be a bit more flexible and decoupled, though, you can take advantage of the fact that Django settings files are just Python code by constructing the contents of TEMPLATE_DIRS dynamically, for example: import os.path TEMPLATE_DIRS = (

Re: Django 1.3

2010-08-01 Thread Russell Keith-Magee
On Sun, Aug 1, 2010 at 10:35 PM, mayikmaster wrote: > hello and thank you for this great project which I have learned so > much. I would like to know what will happen with djanggo 1.3 Where > we've heard.many thanks Formal plans for Django 1.3 have not yet been announced.

where is my os.path

2010-08-01 Thread yalda.nasirian
hi when i type import sys or os i have error that unknown os -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Does anyone know how to conditionally set the fieldsets??

2010-08-01 Thread gondor
I use fieldsets in my admin panel to group/title my related fields. This works great in superuser. When I log in as staff, which has some fields excluded I get an error. Caught KeyError while rendering: Key 'A' not found in Form In the simple example below if i'm a super user all works great.

Re: ModelChoiceField Question

2010-08-01 Thread Steve Holden
On 7/29/2010 8:56 AM, Daniel Roseman wrote: > On Jul 29, 5:23 am, Carlos Daniel Ruvalcaba Valenzuela > wrote: >> Hello list, >> >> I was wondering which would be the best way to handle this situation >> with ModelChoiceFields: >> >> I have a form with a ModelChoiceField, the

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-01 Thread Jirka Vejrazka
Hi Balu, django-admin.py uis copied to C:\Python2x\Scripts on your PC (depending on the specific Python version). This is not typically on you system path, so Windows can't find it. A simple solution is to copy or move the django-admin.py from Scripts subdir to C:\Python2x (where python.exe

Re: Django error can't adapt

2010-08-01 Thread Daniel França
Hi, I'm not running on Apache, just trying to run in the django standalone server On Sun, Aug 1, 2010 at 5:47 AM, Antoni Aloy wrote: > 2010/8/1 Daniel França : >> Hi, >> I just migrated from Linux to Mac OS, and I'm getting an error message >> when

Re: Django 1.3

2010-08-01 Thread Alexander Jeliuc
It is django-users group. Isn't it? On Sun, Aug 1, 2010 at 5:35 PM, mayikmaster wrote: > hello and thank you for this great project which I have learned so > much. I would like to know what will happen with djanggo 1.3 Where > we've heard.many thanks > > > --- > hola y

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-01 Thread balu
Thank you. I could able to run python programs well using the Python GUI. It is the problem raised when I tried to execute "django-admin.py startproject mysite" command on Windows 7 On Aug 1, 9:26 pm, Karen Tracey wrote: > On Sun, Aug 1, 2010 at 11:47 AM, balu

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-01 Thread balu
I could able to run python programs using the Python GUI. I could say that the problem raised because of functionality of Python it is because of Django. On Aug 1, 9:26 pm, Karen Tracey wrote: > On Sun, Aug 1, 2010 at 11:47 AM, balu wrote: > > Still I

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-01 Thread Karen Tracey
On Sun, Aug 1, 2010 at 11:47 AM, balu wrote: > Still I couldn't made it on window 7. May be it is incompatible with > Django > I don't have Windows 7 to test, but the problem you are describing (Windows not knowing what executable is associated with .py files) is not a

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread Kev
rmschne wrote: > Sorted. But gosh, why did this simple error crash Python? > > for both these models, a recent change was to remove a database field > and replace with function in the model. However I neglected to change > the __unicode__() method for that model to change the the variable >

Re: Is there anyone who is using Django on Windows 7 host system.

2010-08-01 Thread Michael Hipp
I'm using it on two Win7 systems (one x32, one x64). The "django-admin.py startproject mysite" command seems to do just what is expected. But note that I can't just enter it that way. Here's what I do: python C:\dev\virtenvs\redmule\Scripts\django-admin.py startproject mysite This is because

django using apache2 and mod_wsgi

2010-08-01 Thread watad
dear all i am using django with apache2 and mod_wsgi with djapian as my search engine i have noticed two major issues so far : 1) the first issue is when i use djapian im stuck in a deadlock when i call any Xapian method or function (this is explained in this ticket

django using apache2 and mod_wsgi

2010-08-01 Thread watad
dear all i am using django with apache2 and mod_wsgi with djapian as my search engine i have noticed two major issues so far : 1) the first issue is when i use djapian im stuck in a deadlock when i call any Xapian method or function (this is explained in this ticket

Is there anyone who is using Django on Windows 7 host system.

2010-08-01 Thread balu
I'm not getting the actual result which should we get when we run "django-admin.py startproject mysite" on windows 7 Operating system. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: To access specific columns in a table?

2010-08-01 Thread Kaushik Vemula
Yeah, that will do. You made me a point to read documentation more carefully. Thank you ! On Aug 1, 10:22 am, Franklin Einspruch wrote: > Will this do? > > http://docs.djangoproject.com/en/dev/ref/models/querysets/#only-fields > > Franklin > > On Sun, Aug 1, 2010

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-01 Thread balu
Still I couldn't made it on window 7. May be it is incompatible with Django. On Aug 1, 1:09 am, "Casey S. Greene" wrote: > It runs django-admin.py using the python interpreter. > > Maybe this webpage, or a windows user on this list, will have the >

Re: To access specific columns in a table?

2010-08-01 Thread Franklin Einspruch
Will this do? http://docs.djangoproject.com/en/dev/ref/models/querysets/#only-fields Franklin On Sun, Aug 1, 2010 at 11:14 AM, Kaushik Vemula wrote: > Hi, > when I use objects.all(), I get all the columns in a table. How to > limit it to some specific columns of the

To access specific columns in a table?

2010-08-01 Thread Kaushik Vemula
Hi, when I use objects.all(), I get all the columns in a table. How to limit it to some specific columns of the table? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

To access specific columns in a table?

2010-08-01 Thread Kaushik Vemula
Hi, when I use objects.all(), I get all the columns in a table. How to limit it to some specific columns of the table? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread rmschne
Sorted. But gosh, why did this simple error crash Python? for both these models, a recent change was to remove a database field and replace with function in the model. However I neglected to change the __unicode__() method for that model to change the the variable from "self.abcdefg" to

Django 1.3

2010-08-01 Thread mayikmaster
hello and thank you for this great project which I have learned so much. I would like to know what will happen with djanggo 1.3 Where we've heard.many thanks --- hola y gracias por este gran proyecto del cual he aprendido tanto. me gustaria saber que va pasar con djanggo 1.3 cuando tendremos

Re: 'python manage.py startproject survey' does not add 'survey' to INSTALLED _APPS.

2010-08-01 Thread Karen Tracey
On Thu, Jul 29, 2010 at 5:25 PM, to_see wrote: > Huh. I missed that one, I was working from a book I bought, which did > not explain that I needed to do that, as far as I can tell (but maybe > I am a bit careless?). I will try to be more careful! > It is there, perhaps it is not

Re: How to access a MySQL table in Django?

2010-08-01 Thread Karen Tracey
On Thu, Jul 29, 2010 at 11:39 AM, snipinben wrote: > > yeah, i was able to find that exact thing yesterday, and it works and i am > so > happy. now i have one more problem, i cnat get oracle-cx to work. it says > that "no software installation was found" or

Re: JSON reponseText is undefined

2010-08-01 Thread Himanshu Srivastava
Hi sorry for the mistake Actualy i found that the code is not working even if i send a string the actual code is as follows Views.py return HttpResponse('Hello') Javascript var ajaxRequest; try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch

Re: Get request path without having a request object

2010-08-01 Thread cootetom
I have found some code that can get the request object. f = sys._getframe() while f: request = f.f_locals.get('request') if isinstance(request, HttpRequest): path = request.path break f = f.f_back James: I understand completely what you are saying and have thought

Re: JSON reponseText is undefined

2010-08-01 Thread Daniel Roseman
On Aug 1, 8:54 am, Himanshu Srivastava wrote: > Hi > I am sending  a Json data from django on an ajax call as A > HttpResponse but i get it as undefined when i try to access it in > javascript > The code is as follows\ > > Views.py > > data=simplejson.dump(dic) > return

Re: django-admin.py not working

2010-08-01 Thread Daniel Roseman
On Jul 31, 3:41 pm, ginost7 wrote: > Im using ubuntu > > I managed to get through the poll project working on the django tut. >  then tried another project > > At the prompt i get > > g...@gino-laptop:~/djangoDEV$ django-admin > The program 'django-admin' is currently not

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread rmschne
Kev, Thanks. A bit more info: The "add" button works, but the "change" and the link to the table name crashes. Happens in both Chrome and Safari ... so doubt the browser. The server: [01/Aug/2010 12:02:26] "GET /admin/soc_util/annualdinnerhost/ HTTP/ 1.1" 200 26977 [01/Aug/2010 12:02:26]

admin panel fieldsets for different type of users?

2010-08-01 Thread gondor
I use formset in my admin panel to group/title my related fields. This works great except when I go to exclude some fields for lesser users. In the simple example below if i'm a super user all works great. If i log in as a staff user thus the code exclude A formset I get the following error:

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread Kev
rmschne wrote: > I have a small Django app that until now has been used simply for > access to the data (in MySQL) for doing computations/reporting and > outputting results to files. Have not been using the ADMIN module or > Dev server or anything. Now that hard part of this work, I'm >

Re: Django error can't adapt

2010-08-01 Thread Antoni Aloy
2010/8/1 Daniel França : > Hi, > I just migrated from Linux to Mac OS, and I'm getting an error message > when I try register a new user of my django site, (at my page) > I get the error: can't adapt type 'US/Eastern' > I'm using Postgresql and psycopg2, I tried to change

Crashing Dev Server (or Browser?)

2010-08-01 Thread rmschne
I have a small Django app that until now has been used simply for access to the data (in MySQL) for doing computations/reporting and outputting results to files. Have not been using the ADMIN module or Dev server or anything. Now that hard part of this work, I'm starting to get the admin app

Re: django-admin.py not working

2010-08-01 Thread Kev
ginost7 wrote: > Im using ubuntu > > I managed to get through the poll project working on the django tut. > then tried another project > > At the prompt i get > > g...@gino-laptop:~/djangoDEV$ django-admin > The program 'django-admin' is currently not installed. You can > install it by typing:

JSON reponseText is undefined

2010-08-01 Thread Himanshu Srivastava
Hi I am sending a Json data from django on an ajax call as A HttpResponse but i get it as undefined when i try to access it in javascript The code is as follows\ Views.py data=simplejson.dump(dic) return HttpResponse(data,mimetype='application/json') Javascript var ajaxRequest; try{