Re: Python SSH Library for Deploy Script

2007-10-27 Thread Michael Cuddy

> I'm writing a deploy script, but right now it runs ssh commands directly
> from os.system:

Paramiko.

http://www.lag.net/paramiko/

--
Mike Cuddy ([EMAIL PROTECTED]), Programmer, Baritone, Daddy, Human.
Fen's Ende Software, Redwood City, CA, USA, Earth, Sol System, Milky Way.

"The problem with defending the purity of the English language is
that English is about as pure as a cribhouse whore. We don't just
borrow words; on occasion, English has pursued other languages down
alleyways to beat them unconscious and rifle their pockets for new
vocabulary." -- James D. Nicoll

   Join CAUCE: The Coalition Against Unsolicited Commercial E-mail.
  

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



problem with wilson lau

2007-10-27 Thread Kenneth Gonsalves

hi,

I have noticed that whenever I reply to a post on this list, I get a  
bounce message from eox.com.my - can the admins do something about this?
-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Python SSH Library for Deploy Script

2007-10-27 Thread Hugh Bien
Hi all!
I'm writing a deploy script, but right now it runs ssh commands directly
from os.system:

import os
os.system("ssh server.name.com 'cd /deploy/path && run commands'")

I'm pretty new to Python and I'm trying to find a SSH library to run
commands on a remote server.  Does anyone have any experience with a good
one?

Thanks,
- Hugh

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't set request.method = 'POST'

2007-10-27 Thread Kenneth Gonsalves


On 28-Oct-07, at 8:54 AM, James Bennett wrote:

>> I have some links on my site.  I don't want to wrap these links  
>> around
>> a form element.  Is there anyway that I can send post data without
>> using a form?
>
> You need to start by reading this:
>
> http://faqs.org/rfcs/rfc2616.html

cool - bookmarked

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



nginx + django dev server => WSGIRequestHandler instance has no attribute 'path'

2007-10-27 Thread globophobe

I checked out a recent copy of django from svn recently, and
"path_info" returned to rear its ugly head. The patch as per
http://code.djangoproject.com/ticket/3414 (mostly) resolves the
issue.

There doesn't seem to be a problem with FastCGI on my iBook nor on my
FreeBSD production machine; however, for some reason that I'm not
bright enough to understand, there is a problem with the simple
included server in conjunction with a server such as nginx, and
possibly others. This is a problem with both the bleeding edge svn
checkout as well as the most recent stable verstion of django over
plain old HTTP:

Exception happened during processing of request from ('127.0.0.1',
56249)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/SocketServer.py", line 222, in handle_request
self.process_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/SocketServer.py", line 241, in process_request
self.finish_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 543, in
__init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/SocketServer.py", line 521, in __init__
self.handle()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 584, in
handle
if not self.parse_request(): # An error code has been sent, just
exit
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/BaseHTTPServer.py", line 276, in parse_request
self.send_error(400, "Bad request syntax (%r)" % requestline)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/BaseHTTPServer.py", line 340, in send_error
self.log_error("code %d, message %s", code, message)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/BaseHTTPServer.py", line 411, in log_error
self.log_message(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 592, in
log_message
if self.path.startswith(self.admin_media_prefix) or self.path == '/
favicon.ico':
AttributeError: WSGIRequestHandler instance has no attribute 'path'


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't set request.method = 'POST'

2007-10-27 Thread Karen Tracey
On 10/27/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
> On 10/27/07, Greg <[EMAIL PROTECTED]> wrote:
> > I have some links on my site.  I don't want to wrap these links around
> > a form element.  Is there anyway that I can send post data without
> > using a form?
>
> You need to start by reading this:
>
> http://faqs.org/rfcs/rfc2616.html


Yes, though it's a bit of a long dry read.  My concern with what you (Greg)
have described so far as wanting to do is summed up by this paragraph from
that rfc:

   In particular, the convention has been established that the GET and
   HEAD methods SHOULD NOT have the significance of taking an action
   other than retrieval. These methods ought to be considered "safe".
   This allows user agents to represent other methods, such as POST, PUT
   and DELETE, in a special way, so that the user is made aware of the
   fact that a possibly unsafe action is being requested.

You're essentially pulling a fast one on your users if you turn their
innocent clicking on a link into something that does some kind of POST
processing.  But, what exactly is the function searchresult doing?  From its
name it sounds more like a data search/retrieval.  Is that the case?  If so,
why is it expecting POST requests?

Karen

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Search returns every object

2007-10-27 Thread Karen Tracey
On 10/27/07, Joel Hooks <[EMAIL PROTECTED]> wrote:
>
>
> > if you are searching on foreignkey field called city, it will not
> > work if you put 'city' in the search field, you have to put 'city__name'
> >
>
> That's cool, that answers a totally different question I was wrestling
> with, but I am searching the local properties and not returning any
> results.


But it may also be the key to why you are not getting any results for what
you posted.  You have as search fields:

  search_fields   = ('first_name', 'last_name', 'firm')

But firm is a ForeignKey.  I think firm, by itself, without any __fieldname
appended, is causing the whole search attempt to fail.  The e=1 in where you
get redirected to is a clue something went awry.  I'm guessing when the
attempt to search the ForeignKey field causes an error, the admin gives up
and just returns the whole unfiltered list, plus puts e=1 in place of your
query string to indicate something isn't working.  So, what happens if you
either remove firm from the search_fields or specify the field in firm you
want to search on?

Karen

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Search returns every object

2007-10-27 Thread Joel Hooks

> if you are searching on foreignkey field called city, it will not
> work if you put 'city' in the search field, you have to put 'city__name'
>

That's cool, that answers a totally different question I was wrestling
with, but I am searching the local properties and not returning any
results.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't set request.method = 'POST'

2007-10-27 Thread James Bennett

On 10/27/07, Greg <[EMAIL PROTECTED]> wrote:
> I have some links on my site.  I don't want to wrap these links around
> a form element.  Is there anyway that I can send post data without
> using a form?

You need to start by reading this:

http://faqs.org/rfcs/rfc2616.html

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't set request.method = 'POST'

2007-10-27 Thread Greg

Karen,
I have some links on my site.  I don't want to wrap these links around
a form element.  Is there anyway that I can send post data without
using a form?

Thanks

On Oct 27, 6:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> So you are trying to turn an HTTP request that comes in as a GET into a
> POST?  That strikes me as a bit odd.  I don't know why what you are doing
> works under the development server but not in production (you give no
> details on your production environment), but note that the documentation for
> HttpRequest objects 
> (http://www.djangoproject.com/documentation/request_response/) states:
>
> All attributes except session should be considered read-only.
>
> So, attempting to change request.method looks like the wrong approach.
> Perhaps some more background on the overall problem would enable people to
> suggest a better approach.
>
> Karen


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Search returns every object

2007-10-27 Thread Kenneth Gonsalves


On 28-Oct-07, at 4:48 AM, Karen Tracey wrote:

> On 10/27/07, Joel Hooks <[EMAIL PROTECTED]> wrote:
> It doesn't seem to matter what I put in the search_fields, it always
> returns every object in the list. My guess is that I am doing
> something incorrectly, but I can't figure it out after much searching.
> Would anybody have an idea as to what I am doing wrong?
>
> It's rather hard to speculate without some specifics.   
> search_fields worksforme just fine.  What's your model look like?   
> What are you putting in search_fields? What do you enter in the  
> search box and what entries are returned that seem like they should  
> not be there?

if you are searching on foreignkey field called city, it will not  
work if you put 'city' in the search field, you have to put 'city__name'

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Setting up your django project outside the document root

2007-10-27 Thread Kenneth Gonsalves


On 27-Oct-07, at 11:29 PM, Adam D. wrote:

> Everywhere I read about django, it suggests to put your django project
> outside of your servers document root.

the only thing you should put in document root is your favicon
>
> My question is if my document root is '/var/www/vhosts/domain.com/
> doc_root' and I put my project outside of that root, at '/var/www/
> vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
> when i go to http://www.domain.com, it serves my djano site?

your site should not be under /var at all. It should be in your home  
directory. You use the Alias and Location directives in your apache  
config to find your files. Here is a sample apache config where  
sitemedia is for the static media files, and smedia is for the media  
uploaded to the site.


 ServerAdmin [EMAIL PROTECTED]
 ServerName conference.web
 ServerAlias www.conference.web
 DocumentRoot /opt/local/apache2/htdocs/conference
 ErrorLog /opt/local/apache2/logs/conference_error.log

 # Possible values include: debug, info, notice, warn, error,  
crit,
 # alert, emerg.
 LogLevel warn

 CustomLog /opt/local/apache2/logs/access.log combined

 Alias /media/ "/Users/lawgon/django_src/django/contrib/admin/ 
media/"
 Alias /smedia/ "/Users/lawgon/media/"
 Alias /sitemedia/ "/Users/lawgon/programs/conference/sitemedia/"


 
   Order deny,allow
   Allow from all
 

 
   Order deny,allow
   Allow from all
 

 
   Order deny,allow
   Allow from all
 

 
   Order deny,allow
   Allow from all
 

 
   SetHandler python-program
   PythonHandler django.core.handlers.modpython
   SetEnv DJANGO_SETTINGS_MODULE conference.settings
   PythonInterpreter conference_main
   PythonDebug On
 



and from settings.py:

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '/Users/lawgon/media'

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com;
MEDIA_URL = 'http://conference.web/smedia/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure  
to use a
# trailing slash.
# Examples: "http://foo.com/media/;, "/media/".
ADMIN_MEDIA_PREFIX = '/media/'



-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Search returns every object

2007-10-27 Thread Joel Hooks

>
> It's rather hard to speculate without some specifics.  search_fields
> worksforme just fine.  What's your model look like?  What are you putting in
> search_fields? What do you enter in the search box and what entries are
> returned that seem like they should not be there?
>
> Karen

Below is a model. All of my models are constructed in a similar
fashion. I search for first names that I know exist, nothing. I search
for last names that I know exist and nothing. If I search for
'mark' (at least 5 in my db) the console says this:

[27/Oct/2007 21:55:39] "GET /admin/cases/person/?q=mark HTTP/1.1" 302
0

But it returns me to:

http://localhost:8000/admin/cases/person/?e=1

with every Person in the db shown. I've tried it with '=first_name'
also.

= THE MODEL ==

class Person(models.Model):
"""This is a person. I suppose that is obvious, because the class
name is 'person'?"""

user= models.ForeignKey(User, related_name = 'person',
unique=True,
blank = True, null = True)
group   = models.ForeignKey(Group, null = True)
salutation  = models.CharField(maxlength = 5, blank = True,
null = True)
first_name  = models.CharField(maxlength = 20, null = True)
middle_name = models.CharField(maxlength = 20, null = True,
blank = True)
last_name   = models.CharField(maxlength = 20, null = True)
firm= models.ForeignKey(Firm, blank = True, null =
True, related_name = 'people')
location= models.ForeignKey('Location',
related_name='people', null = True, blank = True)

class Admin:
js = ['tiny_mce/tiny_mce.js', 'js/textareas.js']
list_display= ('last_name', 'first_name', 'firm',)
list_filter = ('group', 'firm',)
ordering= ('-last_name',)
search_fields   = ('first_name', 'last_name', 'firm')
list_select_related = True
class Meta:
verbose_name_plural = "People"
def __unicode__(self):
return '%s %s' % (self.first_name, self.last_name)


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: model help for a newbie

2007-10-27 Thread Malcolm Tredinnick

On Sun, 2007-10-28 at 01:15 +, Hani wrote:
> Hi,
> A complete and utter newbie seeks help.
> 
> I have a model Beer with another model called TastingNotes tied via
> foreign key to the Beer table.
> 
> 
> models.py
> 
> class Beer(models.Model):
>   beer=models.CharField(max_length=50, core=True)
>   def __unicode__(self):
>   return self.beer
> 
> 
> class TastingNote(models.Model):
>   beer=models.ForeignKey(Beer, edit_inline=models.TABULAR,
> raw_id_admin=True, num_in_admin=1)
>   tastingnotes=models.TextField('Tasting notes', core=True)
>   rating=models.CharField(max_length=1,
> choices=RATING_CHOICES,core=True)
> 
>   def __unicode__(self):
>   return self.tastingnotes[:15]+"... Rating:"+self.rating
> 
> (note that RATING_CHOICES is defined at the top of models.py).
> 
> What I would like is to have a field, average_rating, that belongs to
> the Beer model that is the average rating for that beer derived from
> all the ratings in the TastingNote model. So I could call it like
> this: beer.id.average_rating.
> 
> Would I do that with a manager class?

A manager class is usually only necessary if you need a method that
operates on *all* of the instances of this model. So, for example, if
you wanted some function that operated on all the Beers, it would be an
appropriate choice for a manager method on the Beer class.

In this case, though, you have a specific beer that is the centre of
attention, so just put a method on the Beer model. If you wrote
something like this:

def average_rating(self):
ratings = [o.rating for o in self.tastingnote_set.all()]
return sum(ratings) / len(ratings)

as a method of the Beer model, it would do what you want. Then you could
call it as beer.average_rating() in Python code or beer.average_rating
in a template.

[Except there's a problem here: You've defined the "rating" field on
TastingNote to be a CharField, so "average" doesn't make a lot of sense.
Do you really want it to be an IntegerField? None of what I wrote in
that code will work for characters, because it assumes numerical
properties exist. sum() doesn't do anything for strings and division
certainly won't work.]

If you aren't familiar with Python, the first line above might be a
little confusing. Look up "list comprehensions" in the Python
documentation.

Also, from the sample code you wrote, it looks like you'll need to read
the Django documentation for how to use reverse relations. If you have
Beer instance and want to refer to all the TastingNote instances
associated with it, you would use

my_beer.tastingnote_set.all()

like I did above (except that I had access to 'self' there, so that was
the thing I used, not my_beer). See [1] for details on this (that's a
link to deep in the middle of some documentation, so you might need to
scroll up the beginning of the section for it to make sense and try out
a few experiments).

[1] http://www.djangoproject.com/documentation/db-api/#backward

Regards,
Malcolm

-- 
Despite the cost of living, have you noticed how popular it remains? 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



model help for a newbie

2007-10-27 Thread Hani

Hi,
A complete and utter newbie seeks help.

I have a model Beer with another model called TastingNotes tied via
foreign key to the Beer table.


models.py

class Beer(models.Model):
beer=models.CharField(max_length=50, core=True)
def __unicode__(self):
return self.beer


class TastingNote(models.Model):
beer=models.ForeignKey(Beer, edit_inline=models.TABULAR,
raw_id_admin=True, num_in_admin=1)
tastingnotes=models.TextField('Tasting notes', core=True)
rating=models.CharField(max_length=1,
choices=RATING_CHOICES,core=True)

def __unicode__(self):
return self.tastingnotes[:15]+"... Rating:"+self.rating

(note that RATING_CHOICES is defined at the top of models.py).

What I would like is to have a field, average_rating, that belongs to
the Beer model that is the average rating for that beer derived from
all the ratings in the TastingNote model. So I could call it like
this: beer.id.average_rating.

Would I do that with a manager class?

class AveRatingManager(models.Manager):
def get_query_set(self):

for y in self.TastingNote.rating:
rating += y
return (rating/self.TastingNote.count())

Any help or insight into this issue would be greatly appreciated. I am
new to both Django and Python but am having great fun learning.

Thanks
H


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic error reporting to admin email

2007-10-27 Thread Malcolm Tredinnick

On Sat, 2007-10-27 at 14:39 -0700, RichardH wrote:
> 
> On Oct 27, 11:51 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
> > On Sat, 2007-10-27 at 08:39 +, Daybreaker wrote:
> > > I'm developing & administrating a django-powered website.
> > > It's still in beta phase, so some errors are found by users.
> >
> > > I want to make an automatic error reporting system. How can I handle
> > > 500 internal server error or exceptions 'somewhere' in my code?
> >
> > When DEBUG=False, 500 errors (the tracebacks) are automatically emailed
> > to everybody in the ADMINS setting.
> >
> > When DEBUG=True, you will need to override the
> > django.views.debug.technical_500_response function. Write your own
> > function that takes the same parameters and which sends the mail. It
> > should probably call the existing method as its last step so that the
> > user sees something. Then, somewhere in your code (e.g. settings.py),
> > assign your new function to django.views.debug.technical_500_response
> >
> > Regards,
> > Malcolm
> >
> > --
> > Monday is an awful way to spend 1/7th of your 
> > life.http://www.pointy-stick.com/blog/
> 
> This functionality also interests me. I have had a look through the
> Django code but I can't find where the automatic mailing of tracebacks
> to ADMINS is handled when DEBUG is set to False. Could you give me a
> quick point in the right direction?

http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L127

Regards,
Malcolm

-- 
The hardness of butter is directly proportional to the softness of the
bread. 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't set request.method = 'POST'

2007-10-27 Thread Karen Tracey
So you are trying to turn an HTTP request that comes in as a GET into a
POST?  That strikes me as a bit odd.  I don't know why what you are doing
works under the development server but not in production (you give no
details on your production environment), but note that the documentation for
HttpRequest objects (
http://www.djangoproject.com/documentation/request_response/) states:

All attributes except session should be considered read-only.

So, attempting to change request.method looks like the wrong approach.
Perhaps some more background on the overall problem would enable people to
suggest a better approach.

Karen

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Search returns every object

2007-10-27 Thread Karen Tracey
On 10/27/07, Joel Hooks <[EMAIL PROTECTED]> wrote:
>
> It doesn't seem to matter what I put in the search_fields, it always
> returns every object in the list. My guess is that I am doing
> something incorrectly, but I can't figure it out after much searching.
> Would anybody have an idea as to what I am doing wrong?


It's rather hard to speculate without some specifics.  search_fields
worksforme just fine.  What's your model look like?  What are you putting in
search_fields? What do you enter in the search box and what entries are
returned that seem like they should not be there?

Karen

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can't post attachment file in django test

2007-10-27 Thread Karen Tracey
On 10/27/07, Igor Kovalenko <[EMAIL PROTECTED]> wrote:
>
>
> Hello!
>
> Could somebody tell what I'm doing wrong. I can't post a file in
> django test.
> My code is the following:
>
> path = os.getcwd() + '\\fotogallery\\testfotos\\gfoto1.jpg'
> gf = open(path)
> response = self.client.post('/fotogallery/addgallery/', {'name': 'New
> Gallery 1', 'annotation': 'This is New Gallery
> 1','galleryfilename':gf})
> gf.close()


Is the value assigned to 'galleryfilename' really supposed to be an open
file object?  Just based on the name it sounds more like it should be a
string containing the file name.

Unfortunately the traceback is useless.  Something in your code is causing a
500 error to be raised, but in trying to generate the 500 response page the
Django code hits another exception when it cannot find a 500.html template,
and that's the traceback you are seeing.  To see the traceback associated
with the real error try setting DEBUG=True in your test settings file (I
assume that works when running under the test framework?  If not you'll need
a 500.html that Django can find and the proper other settings to have the
real root cause traceback emailed to you).

Karen

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Is it possible to debug a view using breakpoints in Eclipse?

2007-10-27 Thread Karen Tracey
I assume you are using the development server to test -- have you included
--noreload among the arguments to runserver when you run under
Eclipse/PyDev?  That's what you need in order for breakpoints to work.

Karen

On 10/27/07, Divan Roulant <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I would like to debug a view and even though I set breakpoints in it,
> the debugger doesn't stop on them when the execution is required by
> the Web browser. I'm using Eclipse with PyDev and everything seems
> configured appropriately.
>
> Since I'm pretty new to Web dev, maybe there's something I don't get
> that makes it impossible. Is it the case? If not, how may I debug a
> view?
>
> Thanks a lot!
>
> Divan
>
>
> >
>

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: newforms: required field mark

2007-10-27 Thread andresj


On Oct 22, 11:33 am, [EMAIL PROTECTED] wrote:
> So, in the template, I was hoping to be able do something like:
>
> {{field.label_tag}}: {{field}}
> {% if field.error%}
> {{ field.error }}
> {% else %}
>{% if field.required%} *{% endif %}
> {% endif %}
> {% if field.help_text %}}   color="silver">{{ field.help_text }}{% endif %}

Almost like that, just subsitite field.required to
field.field.required. field is a BoundField, and field.field is the
Field (e.g. CharField, IntegerField) that is set in the Form.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic error reporting to admin email

2007-10-27 Thread RichardH


On Oct 27, 11:51 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-10-27 at 08:39 +, Daybreaker wrote:
> > I'm developing & administrating a django-powered website.
> > It's still in beta phase, so some errors are found by users.
>
> > I want to make an automatic error reporting system. How can I handle
> > 500 internal server error or exceptions 'somewhere' in my code?
>
> When DEBUG=False, 500 errors (the tracebacks) are automatically emailed
> to everybody in the ADMINS setting.
>
> When DEBUG=True, you will need to override the
> django.views.debug.technical_500_response function. Write your own
> function that takes the same parameters and which sends the mail. It
> should probably call the existing method as its last step so that the
> user sees something. Then, somewhere in your code (e.g. settings.py),
> assign your new function to django.views.debug.technical_500_response
>
> Regards,
> Malcolm
>
> --
> Monday is an awful way to spend 1/7th of your 
> life.http://www.pointy-stick.com/blog/

This functionality also interests me. I have had a look through the
Django code but I can't find where the automatic mailing of tracebacks
to ADMINS is handled when DEBUG is set to False. Could you give me a
quick point in the right direction?
Thanks,
Richard


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Scaling the server

2007-10-27 Thread Graham Dumpleton

On Oct 27, 2:33 am, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote:
> Hi again Simon,
>
> > @ Michel: I think the best approach is to use a separate IP for Lighttpd to
> > listen on, but it should be equally easy to have Lighttpd listen on
> > for example port 81.
>
> Hum, understood. The last one question (I think :-P). The use of
> apache to redirect connections to lighttpd through mod_proxy isnĀ“t
> appropriated, is it? I want to do some action now and this is the
> easiest way to act, so I can have some time to install a server with
> apache worker, python with shared libraries and maybe mod_wsgi...

If you are already having issues with Apache's ability to serve up
your static media files, using Apache as a proxy to lighttpd probably
isn't going to make any difference as the content of the files still
has to pass through Apache. It is possible that proxying via Apache
for the static files may just make it a bit worse.

If you want to proxy via one of the web servers, probably better to
proxy via lighttpd, or as I suggested previously, have a look at
Pound. Obviously better to use separate port/ip/machine for one media
server.

Graham


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Setting up your django project outside the document root

2007-10-27 Thread Graham Dumpleton



On Oct 28, 4:59 am, "Adam D." <[EMAIL PROTECTED]> wrote:
> I am a newbie.
>
> Everywhere I read about django, it suggests to put your django project
> outside of your servers document root.
>
> My question is if my document root is '/var/www/vhosts/domain.com/
> doc_root' and I put my project outside of that root, at '/var/www/
> vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
> when i go tohttp://www.domain.com, it serves my djano site?
>
> Basic stuff... Just can't find a definitive answer anywhere...
>
> Also, how would having the django code in your document_root, pose a
> security problem, if it is all server-side code? I come from a PHP
> background, so I am very used to just putting the entire site in the
> root.

You should not put your Django applications source code under the
document root because if the web site administrator stuffs up your web
server configuration, or it isn't configured properly in the first
place, then people can download your source code including possibly
any database login and password information.

The ultimate answer to your question depends on what web server you
are using and what hosting mechanism you are using to bridge to
Django.

Are you using Apache, lightpd, or nginx?

Are you using mod_python, mod_wsgi, CGI, FASTCGI, SCGI etc etc?

Also, are you only talking about linking in the media files, given
that they will be the only static files that the web server will
actually need to serve up itself?

Graham


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Search returns every object

2007-10-27 Thread Joel Hooks

It doesn't seem to matter what I put in the search_fields, it always
returns every object in the list. My guess is that I am doing
something incorrectly, but I can't figure it out after much searching.
Would anybody have an idea as to what I am doing wrong?


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Customize Admin Object elements

2007-10-27 Thread Griffin Caprio

Gustaf,

Awesome thanks.

- Griffin
On Oct 27, 2007, at 2:15 PM, [EMAIL PROTECTED] wrote:

>
> class MyModel(models.Model):
> ...
>
> class Meta:
> ordering = ['name']
>
> /Gustaf
>
> On Oct 27, 8:07 pm, Griffin <[EMAIL PROTECTED]> wrote:
>> Is there any way to customize the drop down lists that appear when
>> editing an object in the admin interface?  I would like to change the
>> order that elements appear.  Instead of sorting by id, I would  
>> like to
>> sort by another property such as name.
>>
>> I've already customized the Admin class within the model itself,  
>> but I
>> can't find any option that allows me to customize how the fields are
>> displayed.
>>
>> Is the only option a custom view?
>>
>> Thanks,
>> Griffin
>
>
> >


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Can't post attachment file in django test

2007-10-27 Thread Igor Kovalenko

Hello!

Could somebody tell what I'm doing wrong. I can't post a file in
django test.
My code is the following:

path = os.getcwd() + '\\fotogallery\\testfotos\\gfoto1.jpg'
gf = open(path)
response = self.client.post('/fotogallery/addgallery/', {'name': 'New
Gallery 1', 'annotation': 'This is New Gallery
1','galleryfilename':gf})
gf.close()

In urls.py I have:

(r'^addgallery/$', 'add_gallery'),

I've got following error:

ERROR: test_addMainGallery (shalamov.fotogallery.tests.SimpleTest)
--
Traceback (most recent call last):
  File "C:\Program Files\Apache Software Foundation\Apache2.2\www\docs
\shalamov\
..\shalamov\fotogallery\tests.py", line 56, in test_addMainGallery
response = self.client.post('/fotogallery/addgallery/', {'name':
'New Galler
y 1', 'annotation': 'This is New Gallery 1','galleryfilename':gf})
  File "C:\Python25\lib\site-packages\django\test\client.py", line
216, in post
return self.request(**r)
  File "C:\Python25\lib\site-packages\django\test\client.py", line
156, in reque
st
response = self.handler(environ)
  File "C:\Python25\lib\site-packages\django\test\client.py", line 34,
in __call
__
response = self.get_response(request)
  File "C:\Python25\lib\site-packages\django\core\handlers\base.py",
line 126, i
n get_response
return callback(request, **param_dict)
  File "C:\Python25\lib\site-packages\django\views\defaults.py", line
88, in ser
ver_error
t = loader.get_template(template_name) # You need to create a
500.html templ
ate.
  File "C:\Python25\lib\site-packages\django\template\loader.py", line
79, in ge
t_template
source, origin = find_template_source(template_name)
  File "C:\Python25\lib\site-packages\django\template\loader.py", line
72, in fi
nd_template_source
raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html

The code works fine without the file.
And the most interesting my view works fine with django-server - files
correctly are uploaded.
Only test doesn't work


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



IF YOU HAVE TIME then READ it once PLEASE

2007-10-27 Thread [EMAIL PROTECTED]

IF you want to meet your old school & college mate's of your life
there is a chance, just enter school or college details in the below
site

http://www.batchmates.com/MGMhome.asp?refid=1385582=30264

PLEASE REGISTER IN THIS SITE.

IF U LIKE THEN FORWARD THIS MAIL TO U R FRIENDS...


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Customize Admin Object elements

2007-10-27 Thread [EMAIL PROTECTED]

class MyModel(models.Model):
...

class Meta:
ordering = ['name']

/Gustaf

On Oct 27, 8:07 pm, Griffin <[EMAIL PROTECTED]> wrote:
> Is there any way to customize the drop down lists that appear when
> editing an object in the admin interface?  I would like to change the
> order that elements appear.  Instead of sorting by id, I would like to
> sort by another property such as name.
>
> I've already customized the Admin class within the model itself, but I
> can't find any option that allows me to customize how the fields are
> displayed.
>
> Is the only option a custom view?
>
> Thanks,
> Griffin


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Can't set request.method = 'POST'

2007-10-27 Thread Greg

Hello,
I've developed my application in the django developmental version and
everything works.  Here is my code view:

def traditional(request, styleid):
request.method = 'POST'
request.POST = {'style': styleid, 'color': '---'}
return searchresult(request)



However, now that I'm transferring my site to a production environment
I get the following error:

AttributeError at /search/5/
can't set attribute

The error is referring to the 'request.method = 'POST' line.  When I
take that line out it works.  However, I need to request.method to be
POST when I call searchresult.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Setting up your django project outside the document root

2007-10-27 Thread Adam D.

I see where you are doing the symlinking...

[EMAIL PROTECTED]:~$ cd /var/www
[EMAIL PROTECTED]:/var/www$  sudo ln -s  ~/Web/media media
[EMAIL PROTECTED]:/var/www$  sudo ln -s  ~/Web/django_src/django/contrib/
admin/media admin_media

Isn't this just symlinking to the media folders?

So if I do this symlink in my root (httpdocs) this will serve the
python project (/home/python-project)

Sorry, I'm still a bit confused... Trying to un-learn my PHP'ness

Thanks for the help!


On Oct 27, 2:33 pm, "Ian Lawrence" <[EMAIL PROTECTED]> wrote:
> Ola
> basically you sym link it...
> I recently did exactly this and wrote up the procedure 
> here:http://ianlawrence.info/random-stuff/set-up-django-apache-and-postgre...
>
> hope this helps
> Ian
>
> On 10/27/07, Adam D. <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I am a newbie.
>
> > Everywhere I read about django, it suggests to put your django project
> > outside of your servers document root.
>
> > My question is if my document root is '/var/www/vhosts/domain.com/
> > doc_root' and I put my project outside of that root, at '/var/www/
> > vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
> > when i go tohttp://www.domain.com, it serves my djano site?
>
> > Basic stuff... Just can't find a definitive answer anywhere...
>
> > Also, how would having the django code in your document_root, pose a
> > security problem, if it is all server-side code? I come from a PHP
> > background, so I am very used to just putting the entire site in the
> > root.
>
> > Thanks,
>
> --http://ianlawrence.info


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Setting up your django project outside the document root

2007-10-27 Thread Ian Lawrence

Ola
basically you sym link it...
I recently did exactly this and wrote up the procedure here:
http://ianlawrence.info/random-stuff/set-up-django-apache-and-postgresql-on-ubuntu-feisty

hope this helps
Ian

On 10/27/07, Adam D. <[EMAIL PROTECTED]> wrote:
>
> I am a newbie.
>
> Everywhere I read about django, it suggests to put your django project
> outside of your servers document root.
>
> My question is if my document root is '/var/www/vhosts/domain.com/
> doc_root' and I put my project outside of that root, at '/var/www/
> vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
> when i go to http://www.domain.com, it serves my djano site?
>
> Basic stuff... Just can't find a definitive answer anywhere...
>
> Also, how would having the django code in your document_root, pose a
> security problem, if it is all server-side code? I come from a PHP
> background, so I am very used to just putting the entire site in the
> root.
>
> Thanks,
>
>
> >
>


-- 
http://ianlawrence.info

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Customize Admin Object elements

2007-10-27 Thread Griffin

Is there any way to customize the drop down lists that appear when
editing an object in the admin interface?  I would like to change the
order that elements appear.  Instead of sorting by id, I would like to
sort by another property such as name.

I've already customized the Admin class within the model itself, but I
can't find any option that allows me to customize how the fields are
displayed.

Is the only option a custom view?

Thanks,
Griffin


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Setting up your django project outside the document root

2007-10-27 Thread Adam D.

I am a newbie.

Everywhere I read about django, it suggests to put your django project
outside of your servers document root.

My question is if my document root is '/var/www/vhosts/domain.com/
doc_root' and I put my project outside of that root, at '/var/www/
vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
when i go to http://www.domain.com, it serves my djano site?

Basic stuff... Just can't find a definitive answer anywhere...

Also, how would having the django code in your document_root, pose a
security problem, if it is all server-side code? I come from a PHP
background, so I am very used to just putting the entire site in the
root.

Thanks,


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Limiting foreign key choices

2007-10-27 Thread myahya

Thank you for the quick reply. Wouldn't something like this be
possible using 'limit_choices_to' argument in the ForeignKey
definition?

On Oct 27, 2:44 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-10-26 at 19:01 +, myahya wrote:
> > I have two models: products and catregories. A product can belong to
> > exactly one category. To make navigation easier, I use nested
> > categories. I want to limit the admin's ability to add a product only
> > to the leaf categories (those with no children). So if I the following
> > structure
> > Electronics > Mobile Phones > Nokia
> > Electronics > Cameras
> > The admin can add product to the Nokia or Cameras categories.
>
> By itself, the admin application isn't designed to handle this. You'll
> need to write some Javascript to control the options (and remember to
> re-validate them in the save() method of your model).
>
> Regards,
> Malcolm
>
> --
> I don't have a solution, but I admire your 
> problem.http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: testing filesystem operations in Django

2007-10-27 Thread Tom Badran
You could also just use a loopback filesystem (essentially a fixed size file
mounted as its own filesystem). Been years since i've used this, so cant
give any specific help, but should be simper than ramdisks.
Tom

On 27/10/2007, Faheem Mitha <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
> Here is a simple question about testing. I have a django file upload
> application which needs to operate on the filesystem as part of its
> functionality (create files/directories etc. under media root) I use
> Debian etch. So, I want a way to test filesystem operations, preferably
> without using an actual filesystem to avoid possible damage from a test
> run amuck.
>
> I was wondering how people are handling this in a test framework setup.
> Any ideas about this? I was thinking of possibly using a ramdisk
> (filesystem in RAM), but I don't know how easy or convenient it would be.
>
> Please cc me on any reply.
>Thanks, Faheem.
>
> >
>


-- 
Tom Badran
http://badrunner.net

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



testing filesystem operations in Django

2007-10-27 Thread Faheem Mitha


Hi,

Here is a simple question about testing. I have a django file upload 
application which needs to operate on the filesystem as part of its 
functionality (create files/directories etc. under media root) I use 
Debian etch. So, I want a way to test filesystem operations, preferably 
without using an actual filesystem to avoid possible damage from a test 
run amuck.

I was wondering how people are handling this in a test framework setup. 
Any ideas about this? I was thinking of possibly using a ramdisk 
(filesystem in RAM), but I don't know how easy or convenient it would be.

Please cc me on any reply.
   Thanks, Faheem.

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: problem with svn checkout

2007-10-27 Thread Kenneth Gonsalves


On 27-Oct-07, at 3:42 PM, Lars Stavholm wrote:

>> svn: REPORT request failed on '/svn/!svn/vcc/default'
>> svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http://
>> code.djangoproject.com)
>>
>> I have got this three times at the same place
>
> Just tested, works nicely for me.

working now

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic error reporting to admin email

2007-10-27 Thread Malcolm Tredinnick

On Sat, 2007-10-27 at 08:39 +, Daybreaker wrote:
> I'm developing & administrating a django-powered website.
> It's still in beta phase, so some errors are found by users.
> 
> I want to make an automatic error reporting system. How can I handle
> 500 internal server error or exceptions 'somewhere' in my code?

When DEBUG=False, 500 errors (the tracebacks) are automatically emailed
to everybody in the ADMINS setting.

When DEBUG=True, you will need to override the
django.views.debug.technical_500_response function. Write your own
function that takes the same parameters and which sends the mail. It
should probably call the existing method as its last step so that the
user sees something. Then, somewhere in your code (e.g. settings.py),
assign your new function to django.views.debug.technical_500_response

Regards,
Malcolm

-- 
Monday is an awful way to spend 1/7th of your life. 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Is it possible to debug a view using breakpoints in Eclipse?

2007-10-27 Thread Divan Roulant

Hello,

I would like to debug a view and even though I set breakpoints in it,
the debugger doesn't stop on them when the execution is required by
the Web browser. I'm using Eclipse with PyDev and everything seems
configured appropriately.

Since I'm pretty new to Web dev, maybe there's something I don't get
that makes it impossible. Is it the case? If not, how may I debug a
view?

Thanks a lot!

Divan


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: problem with svn checkout

2007-10-27 Thread Lars Stavholm

Kenneth Gonsalves wrote:
> hi,
> 
> I am having problems checking out the latest head (it could be due to  
> my present flaky internet connection). The failure message is:
> 
> svn: REPORT request failed on '/svn/!svn/vcc/default'
> svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http:// 
> code.djangoproject.com)
> 
> I have got this three times at the same place

Just tested, works nicely for me.
/L



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



problem with svn checkout

2007-10-27 Thread Kenneth Gonsalves

hi,

I am having problems checking out the latest head (it could be due to  
my present flaky internet connection). The failure message is:

svn: REPORT request failed on '/svn/!svn/vcc/default'
svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http:// 
code.djangoproject.com)

I have got this three times at the same place

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Automatic error reporting to admin email

2007-10-27 Thread Daybreaker

I'm developing & administrating a django-powered website.
It's still in beta phase, so some errors are found by users.

I want to make an automatic error reporting system. How can I handle
500 internal server error or exceptions 'somewhere' in my code?


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---