Re: virtualenv used with mod_wsgi

2010-09-16 Thread Jagdeep Singh Malhi
On Sep 16, 2:25 am, Graham Dumpleton wrote: > You need to add it to sys.path in WSGI script file. The PYTHONPATH > in .bashrc of your personal account isn't used by Apache/mod_wsgi. > > Graham i already use sys.path my WSGI script file is { import site site.addsitedir('/home/jagdeep/CMS/bin/lib/

Re: Initialize model's fields

2010-09-16 Thread Marco Vicario
Thanks a lot Bruno!!! 2010/9/15 bruno desthuilliers > On 15 sep, 18:35, marcovic wrote: > > Hi all, > > i'm trying to do a simple task with Django but evidently it is not so > > simple... > > It is - when you understand how things work. > > > I have my model: > > > > class Mymodel(models.Model)

Protobuff model memcaching

2010-09-16 Thread burg
Hi everybody, Recently I've been trying to migrate from AppEngine-Patch (with Appengine models) into django-nonrel. In the past, I've been using Protobufs serialization for memcache as suggested by Nick here http://blog.notdot.net/2009/9/Efficient-model-memcaching - which seemed to be very efficie

Re: virtualenv used with mod_wsgi

2010-09-16 Thread Graham Dumpleton
Then that directory isn't where it is installed, or the permissions on your directories are such that user that Apache runs as can't read that directory. Post a 'ls -las' directory listing of your site- packages directory and check that from that directory up to your home directory is readable to

Django Chat App?

2010-09-16 Thread Sithembewena Lloyd Dube
Hi all, I will soon be working on a Django site that will incorporate a heavily customised chat app. The client wants voip capability. I've had a look at the Twisted framework, but I need to know whether or not there is anything else out there - perhaps tailored for use with Django? -- Regards,

Re: Django Chat App?

2010-09-16 Thread Shamail Tayyab
On Thursday 16 September 2010 03:40 PM, Sithembewena Lloyd Dube wrote: Hi all, I will soon be working on a Django site that will incorporate a heavily customised chat app. The client wants voip capability. I've had a look at the Twisted framework, but I need to know whether or not there is a

Re: problem with block tag and autoescaping

2010-09-16 Thread Nuno Maltez
On Wed, Sep 15, 2010 at 4:50 PM, Julian wrote: > before returning, all paramaters in the urls are separated by & as > they should be. in the template the & occur as &. for example, the > url is print'ed in the tag: > > /go/to/url? > utts=-1&utsrc=trackuser&utsig=f6730dc992ee9a23c24ed0adae0eb5f6 >

Re: have to use older versions of django/python

2010-09-16 Thread Christian Ştefănescu
Hello, what OS are you using and which version? On Thursday, September 16, 2010, Wendy wrote: > Hello, > I've just been told that I have to run my project on the server with > django 1.0, python 2.5, when previously I was told I could use any > version I wanted, so I've been using python 2.6.1

how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread perfecthills
Have a website build on django, i desire to transfer the website to a new domain, i already created the application and even website at webfaction, i have even copied the entire code of the previous site to the ftp of the new website iwant. well being new, all i get is It worked! Congratulations

Re: have to use older versions of django/python

2010-09-16 Thread Carlton Gibson
HI Wendy, On 15 Sep 2010, at 23:10, Wendy wrote: > I am pretty new to all this though, so if anyone has any tips that > will save me from tearing my hair out, correct order of doing things, > etc. I'd really appreciate it. Any advice would be appreciated. Once you've got your Python version in

Re: have to use older versions of django/python

2010-09-16 Thread Carlton
On Sep 16, 12:00 pm, Carlton Gibson wrote: > Here's the links: > Python Package Index : pip 0.8.1 > virtualenv — virtualenv v1.5 documentation > > This I found useful: > Tools of the Modern Python Hacker: Virtualenv, Fabric and Pip - > electronic.habitat : alex.clemesha > (If you follow this I

Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi,,, i need to do unit testing in one of d django project, is there any other way to test functions ( or methods ) without using test client..? -- Girish M S -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Django Chat App?

2010-09-16 Thread Sithembewena Lloyd Dube
Thanks Shamail! I should have mentioned that I actually need something open-source :) On Thu, Sep 16, 2010 at 12:16 PM, Shamail Tayyab wrote: > On Thursday 16 September 2010 03:40 PM, Sithembewena Lloyd Dube wrote: > >> Hi all, >> >> I will soon be working on a Django site that will incorporate a

Re: problem with block tag and autoescaping

2010-09-16 Thread Julian Moritz
Am Donnerstag, den 16.09.2010, 11:18 +0100 schrieb Nuno Maltez: > On Wed, Sep 15, 2010 at 4:50 PM, Julian wrote: > > before returning, all paramaters in the urls are separated by & as > > they should be. in the template the & occur as &. for example, the > > url is print'ed in the tag: > > > > /go

Re: how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread Sithembewena Lloyd Dube
Start here and work your way through the whole tutorial : http://docs.djangoproject.com/en/1.2/intro/tutorial01/#intro-tutorial01 On Thu, Sep 16, 2010 at 7:25 AM, perfecthills wrote: > Have a website build on django, i desire to transfer the website to a > new domain, i already created the appli

Re: Unit testing in django without using test client

2010-09-16 Thread Shawn Milochik
You can use Python's unittest module to test any Python code (including Django code). What is it about Django's test client or TestCase class that is a problem for you? Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: How do I troubleshoot mod_wsgi 404 admin issues

2010-09-16 Thread Bill Freeman
I think that I'd start by making a clone, on some development box, run using the development server, but with SUB_SITE='perf/'. The removes the most glaring difference between your development and production versions. If it fails there you have full recourse to print statements and pdb. That said

Re: Django and third party python apps, best practices for path locations?

2010-09-16 Thread werefr0g
Hello, I think you should use virtualenv for lot of reasons: * it is easy to use * you can even change you python interpreter according context without mixing accidentally libs from previous version, for example * you can test if upgrading a library, module, app doesn't break your project (yo

Help :django registration - the account activation gives error messages

2010-09-16 Thread failuch
Hello, all. I have a problem with django registration v 0.8. I use register and activate signals and I indeed got these signals and my functions worked well, except that account activation produces an error message. This error message gets printed if template did not have account variable. I rea

How do I get rid of the "Something object" text in inlines?

2010-09-16 Thread hejsan
When adding an inline object, there is always the text "Something object" displayed above the first column. (Replace "Something" with the classname of the inline object) How do I get rid of that? Please don't tell me I have to override the template.. Thanks -- You received this message because

Re: Launching Background Processes from a View

2010-09-16 Thread Heath
My eventual solution was to just rework the way my watcher scripts execute. I now use celery and rabbitMQ, and let pyInotify send a new job to any available worker. For my application, 20 or so workers is fine and this can scale as needed. I'm still looking for a definitive answer on whether the

Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
thanks for reply, actually i used unit test to test urls and other view functions,,,there is a module called Client() in django which acts as a browser to test urls,,, my problem is ,i want to test other methods in my project,,, how to do so, without making use of django's test client..?.. O

Re: Unit testing in django without using test client

2010-09-16 Thread Paul Winkler
On Sep 16, 10:11 am, girish shabadimath wrote: > thanks for reply, > actually i used unit test to test urls and other view functions,,,there is a > module called Client() in django which acts as a browser to test urls,,, > > my problem is ,i want to test other methods in my project,,, how to do >

Re: Launching Background Processes from a View

2010-09-16 Thread Brian Bouterse
Yes, python multiprocessing can spawn background threads. Just spawn the thread and don't join() it. You could also call things linux things like nohup through the python process module. On Thu, Sep 16, 2010 at 10:11 AM, Heath wrote: > My eventual solution was to just rework the way my watcher

Re: How do I get rid of the "Something object" text in inlines?

2010-09-16 Thread Daniel Roseman
On Sep 16, 3:06 pm, hejsan wrote: > When adding an inline object, there is always the text "Something > object" displayed above the first column. > (Replace "Something" with the classname of the inline object) > > How do I get rid of that? Please don't tell me I have to override the > template.. >

Re: Launching Background Processes from a View

2010-09-16 Thread Paul Winkler
On Sep 16, 10:11 am, Heath wrote: > My eventual solution was to just rework the way my watcher scripts > execute. I now use celery and rabbitMQ, and let pyInotify send a new > job to any available worker. For my application, 20 or so workers is > fine and this can scale as needed. > > I'm still lo

Re: Tools to ease template/ui development

2010-09-16 Thread russellneufeld
PyCharm is incredible. Django (with template) support. Integrated version control with git, svn, and more. Best debugger out there for python by far. Can't say enough good things about it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To po

testing app with multi db's one of which is read-only

2010-09-16 Thread keith
I have an app that accesses two different databases which are defined in settings.py one of them is read-only and its models all have managed=False, when i run 'manage.py test', unsurprisingly i guess, i get an insufficient privileges error when trying to create/destroy the testing database on the

Re: unit testing and not creating database for read only database

2010-09-16 Thread keith
I have the same problem, have you logged a ticket for this? -- 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 django-users+unsubscr.

Re: Django Chat App?

2010-09-16 Thread esatterwh...@wi.rr.com
The Flex Framework is open source. On Sep 16, 6:19 am, Sithembewena Lloyd Dube wrote: > Thanks Shamail! I should have mentioned that I actually need something > open-source :) > > On Thu, Sep 16, 2010 at 12:16 PM, Shamail Tayyab wrote: > > > > > > > On Thursday 16 September 2010 03:40 PM, Sithemb

Re: unit testing and not creating database for read only database

2010-09-16 Thread keith
created http://code.djangoproject.com/ticket/14296 On Sep 16, 4:22 pm, keith wrote: > I have the same problem, have you logged a ticket for this? -- 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...

Re: Django Chat App?

2010-09-16 Thread Sithembewena Lloyd Dube
Indeed it is, but the media server isn't :). On Thu, Sep 16, 2010 at 5:35 PM, esatterwh...@wi.rr.com < esatterwh...@wi.rr.com> wrote: > The Flex Framework is open source. > > On Sep 16, 6:19 am, Sithembewena Lloyd Dube wrote: > > Thanks Shamail! I should have mentioned that I actually need somet

Re: How do I troubleshoot mod_wsgi 404 admin issues

2010-09-16 Thread dclaar
Actually, DEBUG *is* on in the production instance. And yet, all I get is the "No Testbeds match..." message, which was a bit surprising to me. Without DEBUG, I just get a 404 not found. I'll try the clone idea. The problem I have is: Where do I put the print statements? The admin stuff is automagi

Re: How do I get rid of the "Something object" text in inlines?

2010-09-16 Thread hejsan
Thanks a bunch. On Sep 16, 2:39 pm, Daniel Roseman wrote: > On Sep 16, 3:06 pm, hejsan wrote: > > > When adding an inline object, there is always the text "Something > > object" displayed above the first column. > > (Replace "Something" with the classname of the inline object) > > > How do I get

Re: How do I get rid of the "Something object" text in inlines?

2010-09-16 Thread hejsan
Thanks a bunch On Sep 16, 2:39 pm, Daniel Roseman wrote: > On Sep 16, 3:06 pm, hejsan wrote: > > > When adding an inline object, there is always the text "Something > > object" displayed above the first column. > > (Replace "Something" with the classname of the inline object) > > > How do I get

What is `sys.path` supposed to be?

2010-09-16 Thread cool-RR
Hello! There's something that's bothering me: When developing a Django application, what is `sys.path` supposed to contain? The directory which contains the project, or the directory of the project, or both? What led me to this question is a failure when using `urlresolvers.reverse`. It's giving

Re: How do I troubleshoot mod_wsgi 404 admin issues

2010-09-16 Thread Bill Freeman
Well, you have to hope that behavior under the development server gives you a clue where to put the prints, or breakpoints. You might find yourself patching a piece of middleware to look for the troublesome path and only doing a set_trace() for it. Then you can single step your way into the url d

named admin url w filter

2010-09-16 Thread Carl Karsten
Is there a better way to do: {% url admin:main_episode_changelist %}?show__id__exact={{show.id}} I tried: {% url admin:main_episode_changelist show__id__exact=show.id %} Caught NoReverseMatch while rendering: Reverse for 'main_episode_changelist' with arguments '()' and keyword arguments '{'show_

Re: Deply with mod_wsgi

2010-09-16 Thread Nuno Maltez
At a glance: is your graphic dynamically generated and served by Django? If so, shouldn't the the src of the img tag point to /simuladores/grafico/ - or something under /simuladores where the wsgi script can catch it - instead of /grafico ? If your code is writing the image to the filesystem, is i

Re: Deply with mod_wsgi

2010-09-16 Thread Waléria Antunes David
Yes, my graph is generated dynamically. Where do I change my code for this error doesn't occur and my image appears? On Thu, Sep 16, 2010 at 1:56 PM, Nuno Maltez wrote: > At a glance: is your graphic dynamically generated and served by > Django? If so, shouldn't the the src of the img tag point

Re: Deply with mod_wsgi

2010-09-16 Thread Nuno Maltez
Well, my guess is that you should change the template responsible for the page in your second picture and fix the tag that displays the graphic so that the source points to /simuladores/grafico/ instead of /grafico/ Nuno On Thu, Sep 16, 2010 at 6:05 PM, Waléria Antunes David wrote: > Yes, my gr

Re: Django Chat App?

2010-09-16 Thread Yo-Yo Ma
This might not be any help since I know nothing of VOIP, but for the chat portion take a look in to Ape ( a comet server written in C ). On Sep 16, 9:41 am, Sithembewena Lloyd Dube wrote: > Indeed it is, but the media server isn't :). > > On Thu, Sep 16, 2010 at 5:35 PM, esatterwh...@wi.rr.com <

Re: Deply with mod_wsgi

2010-09-16 Thread Waléria Antunes David
Nuno... Thank you very much. My problem was resolved. Thanks again :) Waléria. On Thu, Sep 16, 2010 at 2:12 PM, Nuno Maltez wrote: > Well, my guess is that you should change the template responsible for > the page in your second picture and fix the tag that displays > the graphic so that the

Re: virtualenv used with mod_wsgi

2010-09-16 Thread Jagdeep Singh Malhi
On Sep 16, 1:51 pm, Graham Dumpleton wrote: > Then that directory isn't where it is installed, or the permissions on > your directories are such that user that Apache runs as can't read > that directory. Post a 'ls -las' directory listing of your site- > packages directory and check that from th

Admin not using verbose_name on required fields

2010-09-16 Thread geraldcor
Hello all, I am using the admin and fieldsets to display a change form as usual. Some fields' labels, even with blank=True are being given the class required and are not using the verbose_name argument either given via keyword or positional usage. All fields that really are required (blank=False)

Multi-table + Abstract Model Inheritance

2010-09-16 Thread ringemup
Is it possible for a model to inherit from an abstract model, which in turn inherits from a non-abstract model? Here's an example. In this case, the reason for using multi-table inheritance rather than an explicit one-to-one relation would be that the office addresses would be editable via office

Re: Django Chat App?

2010-09-16 Thread Rod Hamby
This might not be any help since I know nothing of VOIP, but for the > chat portion take a look in to Ape ( a comet server written in C ). > > On Sep

Re: Admin not using verbose_name on required fields

2010-09-16 Thread Daniel Roseman
On Sep 16, 7:26 pm, geraldcor wrote: > Hello all, > > I am using the admin and fieldsets to display a change form as usual. > Some fields' labels, even with blank=True are being given the class > required and are not using the verbose_name argument either given via > keyword or positional usage.

Preventing code from running during user tests

2010-09-16 Thread Jim D.
I have some code that calls a third-party API in a Django application I'm working on, which could be triggered at various points throughout a project. I would like to ensure that the API itself doesn't actually get called at all during test mode, much the same way that Django itself swaps out the e

How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Evgeny
Hello, I know that this has been asked before, and the answer seemed to be - display the wrong data back to the user along with the error message. However, this does not really work with password fields, because there is nothing really to display. Let's say the entered password was too short or t

Re: testing app with multi db's one of which is read-only

2010-09-16 Thread Russell Keith-Magee
On Thu, Sep 16, 2010 at 11:18 PM, keith wrote: > I have an app that accesses two different databases which are defined > in settings.py > one of them is read-only and its models all have managed=False, when i > run 'manage.py test', unsurprisingly i guess, i get an insufficient > privileges error

Re: named admin url w filter

2010-09-16 Thread Russell Keith-Magee
On Fri, Sep 17, 2010 at 12:24 AM, Carl Karsten wrote: > Is there a better way to do: > > {% url admin:main_episode_changelist %}?show__id__exact={{show.id}} Django doesn't include the GET arguments as part of the URL dispatch process, so the {% url %} tag matches the body of the URL; if you want

validation in fields with custom forms

2010-09-16 Thread msoulier
I have a custom field with takes an ipv4/v6 address or an fqdn, or a list of same, comma-separated. I'm using it in a form where I then have a custom validator for that field. ie. class SipTrunkForm(forms.Form): remote_addr = twcustomfields.SockaddrListField() remote_port = forms.IntegerF

Re: Preventing code from running during user tests

2010-09-16 Thread Russell Keith-Magee
On Fri, Sep 17, 2010 at 6:15 AM, Jim D. wrote: > I have some code that calls a third-party API in a Django application > I'm working on, which could be triggered at various points throughout > a project. I would like to ensure that the API itself doesn't actually > get called at all during test mo

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Karen Tracey
On Thu, Sep 16, 2010 at 7:20 PM, Evgeny wrote: > Hello, > > I know that this has been asked before, and the answer seemed to be > - display the wrong data back to the user along with the error > message. > > However, this does not really work with password fields, because there > is nothing reall

Re: Preventing code from running during user tests

2010-09-16 Thread Jim D.
Thanks Russ, that's helpful. I would think signals would ideally be a solution for this, no? E.g., a setup and teardown signal that fired in setup_test_environment() and teardown_test_environment(), respectfully. I was actually hoping to find this already implemented when I checked the documentati

Mudar Senha de um usuário

2010-09-16 Thread Giovanna Ronzé
Dado que um usuário está logado e quer mudar sua senha, como eu faço para o django mudar a senha daquele user sem que seja preciso que ele preencha esse campo (do nick)? Bem, para resolver esse problema, primeiro eu fiz de uma forma que necessitava do user dizer o nick. Pesquisando, eu vi que tinh

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Brian Neal
On Sep 16, 7:37 pm, Karen Tracey wrote: > > Use this widget for the field: > > http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#django.forms > > with render_value=False > Note that the docs indicate the default value for render_value is True but in the code it is False: http://code.dja

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Brian Neal
On Sep 16, 9:55 pm, Brian Neal wrote: > On Sep 16, 7:37 pm, Karen Tracey wrote: > > > Use this widget for the field: > > >http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#django.forms > > > with render_value=False > > Note that the docs indicate the default value for render_value is Tr

Re: How to clear wrong form data (e.g password field), but still show error?

2010-09-16 Thread Evgeny
perfect, Thanks! On Sep 16, 7:55 pm, Brian Neal wrote: > On Sep 16, 7:37 pm, Karen Tracey wrote: > > > Use this widget for the field: > > >http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#django.forms > > > with render_value=False > > Note that the docs indicate the default value for

Re: how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread Justin Myers
It already tells you why it's showing that page. You need to add some entries to urls.py, at the very least. The tutorial Sithembewena linked you to is a good start. -Justin On Sep 16, 12:25 am, perfecthills wrote: > Have a website build on django, i desire to transfer the website to a > new doma

Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi Paul, thanks for d reply,,,but im new to python n django,,,dint do ne python unit testing before,,can u plz give me some links or hints to start with... On Thu, Sep 16, 2010 at 8:09 PM, Paul Winkler wrote: > On Sep 16, 10:11 am, girish shabadimath > wrote: > > thanks for reply, > > actually