Re: hello django users, I have one doubt. I am doing one django project. It shows one SyntaxError in the line(if not created:) in views.py file.I attached the particular in that. I want the reason o

2010-06-05 Thread kanniga sivasubramanian
hello Karen Tracey sir, Thank you for your acknowledgement.I was corrected the problem. On Fri, Jun 4, 2010 at 6:31 PM, Karen Tracey wrote: > On Fri, Jun 4, 2010 at 7:54 AM, kanniga sivasubramanian > wrote: >> >> If not created: > > Don't uppercase the I in if. > > Karen > -- > ht

Re: django ORM memory leaks in standalone script

2010-06-05 Thread kanniga sivasubramanian
hello yakovenko sir, I think your databse_user and database_password are incorrect. I had affected by this problem. You will give correct username and password of mysql. On Sat, Jun 5, 2010 at 1:02 AM, tmitchell wrote: > Holy reading comprehension, Batman.  Just saw you have DEBUG off, >

Re: Template issue, maybe?

2010-06-05 Thread Dmitry Dulepov
Hi! Venkatraman S wrote: > Admin media is not being loaded. Yes, looks like that. In FireFox/Firebug or Safari or Chrome it is possible to use a corresponding web developer console and see what is not loading (Network or Resource tabs). > On Fri, Jun 4, 2010 at 11:59 PM, Vectar

ModelAdmin save_model method not saving many to many relationship value

2010-06-05 Thread Ryno in Stereo
I have a Page model that uses the sites framework and I've added a save_model method on its admin class to check if the template or sites collections are empty. If they are, I want to populate them with default values. Why not do this in the model declaration? - I can't seem to populate a defau

Queryset filtering based on user supplied callable??

2010-06-05 Thread Joakim Hove
Hello, I have a query list which I want to filter based on a computation which I supply: # Create a query set containing everything: obj_list = MyObject.objects.all() # Now - select only the element which pass some test: obj_list = obj_list.filter( my_filter ) def my_filter( obj ): # Do

Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
MOD_PYTHON ERROR ProcessId: 3793 Interpreter:'127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI:'/' Location: '/' Directory: None Filename: '/var/www/' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handl

Re: Django with Apache and mod_python

2010-06-05 Thread Kenneth Gonsalves
On Saturday 05 June 2010 16:30:46 Jagdeep Singh Malhi wrote: > PythonPath "['/home/username/mysite'] + sys.path" > PythonPath "['/home/username/'] + sys.path" -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google

How to share a session with a php application.

2010-06-05 Thread nameless
I have a django blog project and a chat in PHP. I need to share the id of the user logged in django ( request.user.id ) with the chat in PHP. Is this possible ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to use Django with Apache and mod_wsgi

2010-06-05 Thread Richard Shebora
A must read for using django with mod_wsgi... http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html On Sat, Jun 5, 2010 at 1:45 AM, Dmitry Dulepov wrote: > Hi! > > Jagdeep Singh Malhi wrote: >> please Discuss in detail ... >> I am not able to understand ,how i can use Dj

Re: Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
Thanks very much But Now the new are is come MOD_PYTHON ERROR ProcessId: 3219 Interpreter:'127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI:'/' Location: '/' Directory: None Filename: '/var/www/' PathInfo: '' Phase:

Re: help with serving up mp4 with "nice" url

2010-06-05 Thread Vasil Vangelovski
You can achieve this without django at all. By defining rewrite rules on your web server. But why don't you make your own view/template on the url you want that will play the desired video? You can use the HTML file generated by camtasia for a reference on how to write the template. On Sat, Jun 5,

Re: How to share a session with a php application.

2010-06-05 Thread Vasil Vangelovski
It's possible if both of your applications are under the same domain. see the SESSION_COOKIE_* settings variables http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-age You can then find the current user by the sessionid from the django_* tables. On Sat, Jun 5, 2010 at 1:40 PM, na

Re: How to share a session with a php application.

2010-06-05 Thread nameless
If the chat is in a subdomain ? On Jun 5, 2:05 pm, Vasil Vangelovski wrote: > It's possible if both of your applications are under the same domain. > see the SESSION_COOKIE_* settings variables > > http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-age > > You can t

Re: How to share a session with a php application.

2010-06-05 Thread Vasil Vangelovski
set SESSION_COOKIE_DOMAIN=".mychatapp.com" this will make the django cookie valid both for www.mychat.com and chat.mychat.com On Sat, Jun 5, 2010 at 2:34 PM, nameless wrote: > If the chat is in a subdomain ? > > > > > > On Jun 5, 2:05 pm, Vasil Vangelovski wrote: >> It's possible

Re: Directory structuring

2010-06-05 Thread EJ
Hi guys, thanks a lot for your help! Dmitry Dulepov wrote: > > a) It's not the standard.  I've looked around at subversion repository > > tutorials but can't seem to wrap my head around applying that to our > > software. > > Why not the standard? Many large companies do it the same way as you do.

Re: Queryset filtering based on user supplied callable??

2010-06-05 Thread johan de taeye
Possible through basic Python: obj_list = [ i for i in MyObject.objects.all() where my_filter(i) ] Note that this filtering is happening on the Python side of things, whereas a queryset filter is executed in SQL on the database. The filtering on the database is normally much, much faster, so b

Re: Queryset filtering based on user supplied callable??

2010-06-05 Thread johan de taeye
Typo... The correct syntax is : obj_list = [ i for i in MyObject.objects.all() if my_filter(i) ] On Jun 5, 4:29 pm, johan de taeye wrote: > Possible through basic Python: > >   obj_list = [ i for i in MyObject.objects.all() where my_filter(i) ] > > Note that this filtering is happening on the

Re: How to share a session with a php application.

2010-06-05 Thread nameless
Someone has telled me that I could share the user id ( from Django and PHP ) also throught a cookie. In your opinion what is the best way ? Thanks ^_^ - On Jun 5, 4:01 pm, Vasil Vangelovski wrote: > set > > SESSION_COOKIE_DOMAIN=".mychatapp.com" > > this will make the django cooki

Re: aggregation question

2010-06-05 Thread Łukasz Rekucki
On Jun 4, 10:20 pm, "P. Kaminski" wrote: > Hello, > I'm studying the Django page on aggregation > In the section 'Joins and aggregates' there's an example of how to > create an annotation for each Store with book price ranges. But what > if I want to do the opposite, i.e. for each available Book,

error : Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
MOD_PYTHON ERROR ProcessId: 3219 Interpreter:'127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI:'/' Location: '/' Directory: None Filename: '/var/www/' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.hand

Re: help with serving up mp4 with "nice" url

2010-06-05 Thread Margie Roginski
Good point on the rewrite rules, hadn't thought of that simply because someone else did our apache set up, so I'm not too familiar with that, but that seems like a good solution. I just thought maybe I was missing something obvious - I thought there would be a way redirect to an html in site_media

Re: django ORM memory leaks in standalone script

2010-06-05 Thread yakovenko
hello kanniga, I use correct user and password. I can get data from database. I read about it in an one post that described what may be due not correct settings of connect to database, but there were no details. On Jun 5, 2:54 pm, kanniga sivasubramanian wrote: > hello yakovenko sir, >         I

Re: error : Django with Apache and mod_python

2010-06-05 Thread Vasil Vangelovski
It seems that your application is trying to render a template that doesn't exist. And why are you using mod_python anyway? On Sat, Jun 5, 2010 at 5:49 PM, Jagdeep Singh Malhi wrote: > > MOD_PYTHON ERROR > > ProcessId:      3219 > Interpreter:    '127.0.1.1' > > ServerName:     '127.0.1.1' > Docu

Re: How to share a session with a php application.

2010-06-05 Thread Vasil Vangelovski
Not directly. The session cookie stores the session id (session key). The session id references data stored for the session in the django session backend. The user for that session is contained in that data. So it really depends on what the session backend is. So I'll assume it's the default which

Re: How to share a session with a php application.

2010-06-05 Thread nameless
I want to add cometchat ( written in PHP ) in my djangoproject and I need to edit this function to get it work ( a function that return the userid of the user logged in ): function getUserID() { // I could use SESSION or other to get the user id fo the user logged in: if (!empt

How to pass List to Form Meta Class

2010-06-05 Thread ars_sim
Hello All, I am newbie in django and I will very thankful to you if you help me in this regard. I want to pass list of fields from view to Meta class of FormModel. Please check this example. view.py: fields = [name, email, phone] individual_form = IndividualForm(fields) forms.py class IndF

Misbehaving queryset override in admin

2010-06-05 Thread Brandon Taylor
Hello everyone, I have two models: PublicAccount and Order. I need to provide a link to filter Orders by PublicAccount. So, I added a field to the list display of my PublicAccount: def orders(self): return 'View' % \ (reverse('admin:orders_order_changelist'), self.pk) orders.allow_ta

Latest wisdom on 'small migrations'

2010-06-05 Thread Dave E
Given that Syncdb won't ever issue an alter table command ('no such column'), that http://code.djangoproject.com/wiki/ SchemaEvolution">Schema Evolution is still in debate, that http://south.aeracode.org/";>South is a bit of an overhead if all you want to do is add a field to an existing model - on

Re: Latest wisdom on 'small migrations'

2010-06-05 Thread Dave E
ah. forgot about the plain text in Google Groups... apologies. Again, in English: Given that Syncdb won't ever issue an alter table command ('no such column'), that Schema Evolution is still in debate, that South is a bit of an overhead if all you want to do is add a field to an existing model - o

Re: Django with Apache and mod_python

2010-06-05 Thread Kenneth Gonsalves
On Saturday 05 June 2010 17:25:16 Jagdeep Singh Malhi wrote: > File "/usr/local/lib/python2.6/dist-packages/django/template/ > loader.py", line 138, in find_template > raise TemplateDoesNotExist(name) > > TemplateDoesNotExist: 500.html > you are calling a template with either the wrong pat

Re: Django with Apache and mod_python

2010-06-05 Thread Raffaele Salmaso
Jagdeep Singh Malhi wrote: > MOD_PYTHON ERROR > please help... use mod_wsgi, mod_python is old and not more mantained http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-deployment-modwsgi -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) | That's

TemplateDoesNotExist - even though the template is in the correct folder

2010-06-05 Thread elysianfields
I did see a very similar post in this group, but it did not help me with my problem. I'm probably overlooking something simple, this is what I have: # SETTINGS.PY: TEMPLATE_DIRS = ( "D:/django-projects/localsite/templates", ) # POLLS/VIEWS.PY: from django.http import HttpResponse from local

django and android application

2010-06-05 Thread rahul jain
Hi Django, I would like to create an android application which talks to Django. If I hit a url on my phone, it hits one of my views (urlconf), that view processes the request and give the result back to the android app. Anybody in the community have any knowledge how to proceed with it Firstlty,

Re: django and android application

2010-06-05 Thread Maksymus007
On Sat, Jun 5, 2010 at 10:18 PM, rahul jain wrote: > Hi Django, > > I would like to create an android application which talks to Django. > If I hit a url on my phone, it hits one of my views (urlconf), that > view > processes the request and give the result back to the android app. > > Anybody in

Re: django and android application

2010-06-05 Thread Jeliuc Alexandr
Hello, I've to do something similar... but application django connects written for iphone... I know nothing about android... ideas xml or json... does it support these formats? On Jun 5, 11:18 pm, rahul jain wrote: > Hi Django, > > I would like to create an android application which talks to Djan

searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-05 Thread joelklabo
I am trying to capture the slug from a URL to search and find the object with that slug. Here is my URLconf: (r'^brewery/(\w+)', breweryDetail), It works when there are no spaces in the slug, but nothing comes up when there are. There are no errors just no results showing up. Here is my v

Re: Queryset filtering based on user supplied callable??

2010-06-05 Thread Joakim Hove
Thank you very much :-) Joakim On Jun 5, 4:42 pm, johan de taeye wrote: > Typo... > The correct syntax is : >     obj_list = [ i for i in MyObject.objects.all() if my_filter(i) ] > > On Jun 5, 4:29 pm, johan de taeye wrote: > > > Possible through basic Python: > > >   obj_list = [ i for i in My

Re: TemplateDoesNotExist - even though the template is in the correct folder

2010-06-05 Thread elysianfields
Well, after inserting a number of debugging statements in loader.py and filesystem.py, I found the cause of this; here's what the filesystem.py Loader's load_template_source attempts to access: filepath=u'/cygdrive/d/django-projects/localsite/D:/django-projects/ localsite/templates/polls/index.htm

Re: django and android application

2010-06-05 Thread Sithembewena Lloyd Dube
I would think that you need to be calling the Django url from an Android app that can handle the protocol used (e.g. http protocol). Django should talk to an Android, PHP, JSP, RoR, ASP.NET etc web app using urls and so on - and vice versa - as long as your Android app can make sense of and handle

bigint + postgre (+ south) lacks sequence for primary keys

2010-06-05 Thread LD
Hi, I have just migrated my project to Django 1.2.1 and changed some of primary keys to big integers (id = models.BigIntegerField(primary_key = True)). South migration (from scratch) went without any problems and I have also bigint id fields created on my database. The problem is that all my test

Re: TemplateDoesNotExist - even though the template is in the correct folder

2010-06-05 Thread elysianfields
I'm talking to myself here, but in case someone else runs into the same problem, I'll summarize the cause & solution I used (although it's only a hack, I don't know if it will work consistently): Cause: If you have Python installed through Cygwin on Windows, Django is using the Cygwin path, which

Using DATE_FORMAT in django 1.2

2010-06-05 Thread Tomas Zulberti
Hi. I have the following values in the settings.py: USE_L10N = True DATETIME_FORMAT = '%d/%m/%Y' When the date is printed it prints: "Nov. 24, 1983". The date is: datetime.date(1983, 11, 24). As far as I was able to follow the code, in the django/utils/ formats.py, the it uses the the get_format f

Re: Using DATE_FORMAT in django 1.2

2010-06-05 Thread Karen Tracey
On Sat, Jun 5, 2010 at 6:17 PM, Tomas Zulberti wrote: > So my question is: is this a bug, or I am doing something wrong (I am > sure I might be doing something grong but I don't know where). > I ran into the same behavior this afternoon. I think it is a bug: http://code.djangoproject.com/ticket/

Cycle tag since 1.2

2010-06-05 Thread cootetom
Hi all, I've decided to upgrade to 1.2 but have hit a stumbling block with the cycle tag. The release notes here http://docs.djangoproject.com/en/dev/releases/1.2/#stateful-template-tags say that because of the new thread safe template renderer that including another template whilst inside a loop

Django external access [Windows]

2010-06-05 Thread John Yeukhon Wong
For my home purpose, currently I am running Windows XP. I have everything ready. Django, Python are all good. If I let the runserver (I am using the django-development server) to be 127.0.0.1:8000 or 192.168.1.101:8000 they all worked. Let say abc.no-ip.org is a FREE DNS service I use to access

Model question on subclass and parent class.

2010-06-05 Thread Ivan
I have a question on django model. I want to create a magazine model that allow admin to add gadget, sport articles. And there are classes for gadget, sport and food for adding only that specific article. How to model this? I read through one to one field and many to many field. I just could not ge

Re: Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
Sir , i am not able to remove this error.. which of template or file name is wrong.. On Jun 5, 5:09 pm, Kenneth Gonsalves wrote: > On Saturday 05 June 2010 17:25:16 Jagdeep Singh Malhi wrote: > > >   File "/usr/local/lib/python2.6/dist-packages/django/template/ > > loader.py", line

Re: error : Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
i am not able to configure "Apache and mod_wsgi". http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-deployment-modwsgi I am unable to understand this .. please help .. if possible... i also want to use this.. On Jun 5, 10:09 pm, Vasil Vangelovski wrote: > It se

Re: Django with Apache and mod_python

2010-06-05 Thread Kenneth Gonsalves
On Sunday 06 June 2010 09:12:30 Jagdeep Singh Malhi wrote: > Sir , i am not able to remove this error.. > which of template or file name is wrong.. > how would I know? I know nothing about your directory structure, your models and views. -- Regards Kenneth Gonsalves Senior Associa

Re: Django external access [Windows]

2010-06-05 Thread Sam Lai
By default, the Django development server does not allow hosts to connect unless it is localhost (127.0.0.1) or a local IP (192.168.1.101 in your case). Doing this is a *bad idea*, as indicated by the docs - http://docs.djangoproject.com/en/1.2/ref/django-admin/#djadmin-runserver If you really do

Re: Django external access [Windows]

2010-06-05 Thread Sam Lai
Oops. Seems like you've tried that already. Have you checked your Windows firewall settings? On 6 June 2010 13:53, Sam Lai wrote: > By default, the Django development server does not allow hosts to > connect unless it is localhost (127.0.0.1) or a local IP > (192.168.1.101 in your case). > > Doi

Re: design question - forms as meta-data to a model

2010-06-05 Thread Jason Beaudoin
On Fri, Jun 4, 2010 at 2:42 AM, Russell Keith-Magee wrote: > On Fri, Jun 4, 2010 at 12:03 PM, Jason Beaudoin > wrote: >> Silence usually implies some key piece of documentation was missed, or >> was this just lost amongst more interesting posts? :) > > You've missed two important alternatives: >

Re: Django external access [Windows]

2010-06-05 Thread John Yeukhon Wong
I just disabled the FW, but no luck with any trials. Yeah. Security isn't my concern because only a few people (including myself) will learn about this project. They will only see the interfaces at certain stages when I give out notifications. I am sure in Linux there isn't any problem with overri

Re: Django with Apache and mod_python

2010-06-05 Thread Jagdeep Singh Malhi
ok sir , thanks very much indeed i try my best.. On Jun 6, 8:52 am, Kenneth Gonsalves wrote: > On Sunday 06 June 2010 09:12:30 Jagdeep Singh Malhi wrote: > > > Sir  , i am  not able to remove this error.. > > which of template or file name is wrong.. > > how would I know? I know

Re: Django external access [Windows]

2010-06-05 Thread Sam Lai
Does it work from another machine on the same local network? This is definitely possible though; I've done it before. On 6 June 2010 14:35, John Yeukhon Wong wrote: > I just disabled the FW, but no luck with any trials. > > Yeah. Security isn't my concern because only a few people (including > m