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

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

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

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?

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

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

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

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

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/ >

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

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

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

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

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

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

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/

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

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

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

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

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

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

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

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

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 -

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 -

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)

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

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

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

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' > >

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

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

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,

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: 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

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

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.  

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: > >