instance needs to have a primary key value before a many-to-many relationship can be used.

2008-07-14 Thread tom17
I have a model Like this, which I got after doing a inspectdb class Project(models.Model): id = models.IntegerField(primary_key=True) name = models.CharField(max_length=150, blank=True) description = models.TextField(blank=True) domainname = models.CharField(max_length=240) sh

Re: ANNOUNCE: Django search with Lucene.

2008-07-14 Thread vicalloy
2008/7/15, Spike^ekipS <[EMAIL PROTECTED]>: > > > Hi, django users and developers. > > I'm happy to let you know my django application, Django search with > Lucene(DSL). I try > to tighly integrate the Lucene with Django, so I find the way to use > lucene easily in Django. > > Django search with Lu

cant access non-django web page after deploy django on localhost

2008-07-14 Thread Pepsi330ml
Hi, I deployed my Django Application onto the localhost using Apache. Below are the changes i did in the httpd.conf ServerName localhost SetHandler python-program PythonHandler django.core.handlers.modpython PythonDebug On PythonPath "['/xxx/', '/xxx/yyy'] + sys.path"

Modules Imported Multiple Times

2008-07-14 Thread django-m712
Hi, I'm having a problem where Python modules are being imported multiple times and I cannot figure out why. I have a simple, standard set up created with the following commands: django-admin.py startproject mytest cd mytest manage.py startapp app1 I would like to run some initialization code b

ANNOUNCE: Django search with Lucene.

2008-07-14 Thread Spike^ekipS
Hi, django users and developers. I'm happy to let you know my django application, Django search with Lucene(DSL). I try to tighly integrate the Lucene with Django, so I find the way to use lucene easily in Django. Django search with Lucene(DSL) supports, * indexing object automatically when obj

Re: .pyc files not being created

2008-07-14 Thread Evert
> Hi Malcom, > > Thanks a lot for the detailed response. > > Sorry if these are basic questions but, what user would my web server > be run under (Apache2)? Would it be my username, root, or something > else like "apache"? Probably nobody or www. A simple way to try and find out is using 'ps axu

Multi-level template blocks

2008-07-14 Thread Gregg Lobdell
I'm new to Django, and I'm struggling with something that seems to be do-able. Maybe I'm thinking about the problem wrong. Help? I'm converting an application from hand-constructed Python that builds a large web site to Django templates. The site has multiple layers. All pages share the same b

Re: Very high com_admin_commands with django/mysql

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 6:12 PM, fordprefect <[EMAIL PROTECTED]> wrote: > > We have been optimizing our server (db and caching) since our recent > launch and one thing we've been looking at is our server status: > > Total queries: 4,307,827 > Com_admin_commands: 3,754,356 > Com_insert: 37,790 > Co

Thank you!

2008-07-14 Thread Bobby Roberts
Thanks to everyone for your pointers in the right direction and prompt answers to my questions. I was able to build the online bill payment system for a client. I hope to be able to contribute back to the group as I get my Django legs stronger. --~--~-~--~~~---~--~---

Re: newbie help

2008-07-14 Thread Joshua Jonah
Sorry, hadn't gotten new mail in a while :D Joshua Jonah wrote: > maxlength was changed in the trunk to max_length. You are probably > using an older version of Django, the tutorial you were following > refers to the latest version: > http://code.djangoproject.com/ticket/6457 > > As for the retu

Re: .pyc files not being created

2008-07-14 Thread Joshua Jonah
Didn't know that, will remember, thanx Malcolm Tredinnick wrote: > On Mon, 2008-07-14 at 16:09 -0700, Dana wrote: > >> Hi EAMiller, >> >> Im not seeing errors, Its just not compiling the python files (which >> it should be). >> >> I tried a few combinations, but I believe all I need to do is se

Re: newbie help

2008-07-14 Thread Joshua Jonah
maxlength was changed in the trunk to max_length. You are probably using an older version of Django, the tutorial you were following refers to the latest version: http://code.djangoproject.com/ticket/6457 As for the returning the text thing, same deal. If you go to this page: http://www.djangop

Re: newbie help

2008-07-14 Thread Matt McClanahan
On Jul 14, 3:46 pm, Mario Zorz <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm following the Django tutorial [1] I'm using windows xp, python 2.5 and > SQLite. For some reason I found these 2 things not being appropiate as > followed in the tutorial: > > 1) When tried "python manage.py sql polls

Re: writing unit tests for views?

2008-07-14 Thread Russell Keith-Magee
On Tue, Jul 15, 2008 at 8:28 AM, bshaurette <[EMAIL PROTECTED]> wrote: > > Writing tests for models has been a snap, but I'm having a lot harder > time with the views. ... > I'm not new to writing tests, just to unit testing in Django/Python - > what would *really* help is if I could see some othe

Cookie content string error

2008-07-14 Thread timjdavey
We've just switched production servers and broke them up into an app server, db etc... On the staging and my local, db sets the sessions fine, i.e. Name: sessionid Content: ded23886ca9fab500b0234a2671bd3ef Host: .domain.com Path: / Expires: Tue, 29-Jul-2008 00:52:14 GMT But on the new server it

Missing Records in Admin Interface [SOLVED]

2008-07-14 Thread Jashugan
I had an interesting problem today. I had some records that were missing in the auto-admin list of one of my models. The count was correct, but the records were simply not displayed. When I did a select query from the command line they all showed up just fine; some of them were simply missing fro

writing unit tests for views?

2008-07-14 Thread bshaurette
Writing tests for models has been a snap, but I'm having a lot harder time with the views. I'm trying to use the test client, something like this: from django.test import Client, TestCase class ViewTest(TestCase): def setUp(self): self.client = Client() def test_view_profile(s

newbie help

2008-07-14 Thread Mario Zorz
Hello all, I'm following the Django tutorial [1] I'm using windows xp, python 2.5 and SQLite. For some reason I found these 2 things not being appropiate as followed in the tutorial: 1) When tried "python manage.py sql polls" I got this TypeError: __init__() got an unexpected keyword argument

Very high com_admin_commands with django/mysql

2008-07-14 Thread fordprefect
We have been optimizing our server (db and caching) since our recent launch and one thing we've been looking at is our server status: Total queries: 4,307,827 Com_admin_commands: 3,754,356 Com_insert: 37,790 Com_select: 1,354,134 Com_set_option: 172,319 Com_update: 52,759 Com_commit: 88,107 (thi

Re: Seperate project in a subdirectory (Apache 2.2 & mod_python)

2008-07-14 Thread Graham Dumpleton
What order are you including them in the Apache configuration? Have you tried switching the order? Graham On Jul 15, 7:50 am, "Chris H." <[EMAIL PROTECTED]> wrote: > Trying to run a separate Django project in a sub-directory while the > main project runs in the root.  I'm using Apache 2.2 andmo

RE: Inquiry

2008-07-14 Thread Kadusale, Myles
I don't want to use cookies because they can be disabled by the user. -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Anderson Sent: Monday, July 14, 2008 11:10 PM To: django-users@googlegroups.com Subject: Re: Inquiry Kadusale, Myle

Re: .pyc files not being created

2008-07-14 Thread Dana
Hi Malcom, Thanks a lot for the detailed response. Sorry if these are basic questions but, what user would my web server be run under (Apache2)? Would it be my username, root, or something else like "apache"? Would I have to run compileall.py every time I change a source file (it seems like I w

Re: no more mail for ADMINS

2008-07-14 Thread Rajesh Dhawan
On Jul 14, 7:02 pm, EAMiller <[EMAIL PROTECTED]> wrote: > On Jul 14, 11:57 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > Drop into a shell (python manage.py shell) and send yourself a test > > message using: > > > from django.core.mail import send_mail > > > send_mail('Subject test', 'Messa

Re: .pyc files not being created

2008-07-14 Thread Malcolm Tredinnick
On Mon, 2008-07-14 at 16:09 -0700, Dana wrote: > Hi EAMiller, > > Im not seeing errors, Its just not compiling the python files (which > it should be). > > I tried a few combinations, but I believe all I need to do is set the > chmod to 775 for the source folder (in this case "src")? Permissio

Re: no more mail for ADMINS

2008-07-14 Thread Malcolm Tredinnick
On Mon, 2008-07-14 at 16:02 -0700, EAMiller wrote: [...] > Not sure what this really means. Doesn't the fact that I can use > 'mail' to send mail from the CLI mean my postfix setup is basically > OK? I will keep working on it. There are two ways that mail can be delivered to an MTA (sendmail, po

Re: .pyc files not being created

2008-07-14 Thread Dana
Hi EAMiller, Im not seeing errors, Its just not compiling the python files (which it should be). I tried a few combinations, but I believe all I need to do is set the chmod to 775 for the source folder (in this case "src")? Thanks, Dana On Jul 14, 4:07 pm, EAMiller <[EMAIL PROTECTED]> wrote: >

Re: .pyc files not being created

2008-07-14 Thread EAMiller
Hello... What error message are you seeing? Or, what is failing as a result of this problem? Also, you've set all files to 775? Or specific ones? On Jul 14, 3:29 pm, blis102 <[EMAIL PROTECTED]> wrote: > Hey all, > > On my Ubuntu server with Apache2 + mod_python, I cant seem to get > the .py files

Re: no more mail for ADMINS

2008-07-14 Thread EAMiller
On Jul 14, 11:57 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Drop into a shell (python manage.py shell) and send yourself a test > message using: > > from django.core.mail import send_mail > > send_mail('Subject test', 'Message test', '[EMAIL PROTECTED]', >     ['your_email_address_here'], fai

Re: Model inheritance problem in admin

2008-07-14 Thread David
Thanks, Malcolm. It was great to see inheritance in the first place, and we'll just wait for newforms-admin to use an admin interface to it. On Jul 14, 5:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-14 at 14:46 -0700, David wrote: > > When I save objects from the admin p

Re: Setting the time on a datetimefield

2008-07-14 Thread Rajesh Dhawan
On Jul 14, 5:40 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > On Monday 14 Jul 2008, Rajesh Dhawan wrote: > > > The replace method here returns a new instance of a datetime object -- > > it's not an in-place replace. This should work: > > > self.datetime = self.datetime.replace(hour=23, minute=59)

.pyc files not being created

2008-07-14 Thread blis102
Hey all, On my Ubuntu server with Apache2 + mod_python, I cant seem to get the .py files to compile like they should (I see no .pyc files in my "src" folder like I do locally). I believe I have proper permissions set (775), but am by no means an expert in this matter. What would cause .pyc files

Re: Left Outer Join

2008-07-14 Thread Malcolm Tredinnick
On Sun, 2008-07-13 at 20:38 +0800, Russell Keith-Magee wrote: > On Sun, Jul 13, 2008 at 1:37 PM, Chris <[EMAIL PROTECTED]> wrote: > > > > I'm reasonably fluent in SQL, and while I've found Django's ORM is > > great for basic CRUD operations, I'm having trouble creating joins. > > > > For example,

Re: Standalone script + get_absolute_url with urlresolvers

2008-07-14 Thread Rajesh Dhawan
> > Is it syntactically correct to have a views.py which is empty but > exists? I'm not really sure of the process Django will use to validate > the view. Django will look for all view functions that your project's various urls point to. So those functions need to exist. From that point of view,

Re: Standalone script + get_absolute_url with urlresolvers

2008-07-14 Thread MikeHowarth
Think I may have found the issue. My .pth file was pointing to an old directory which didn't have the relevant module. For anyone wondering, its permissable not to have a views.py providing you have the __init__.py and models.py On Jul 14, 10:28 pm, MikeHowarth <[EMAIL PROTECTED]> wrote: > Yeah

newforms-admin: Interaction between pre_save signals and form validation

2008-07-14 Thread Martin Diers
I am currently trying to use django-mptt in a CMS project. (More about django-mptt here: http://code.google.com/p/django-mptt/) django-mptt manages the implementation of an MPTT tree in a nearly transparent way. You register your model with the django-mptt application, and it will automatic

Re: Model inheritance problem in admin

2008-07-14 Thread Malcolm Tredinnick
On Mon, 2008-07-14 at 14:46 -0700, David wrote: > When I save objects from the admin pages, I get COPIES of what I'm > saving. When I save them through the API, I don't get the duplicates. > I'd like to know if I'm doing something wrong or misunderstanding > something. You're assuming that model

Seperate project in a subdirectory (Apache 2.2 & mod_python)

2008-07-14 Thread Chris H.
Trying to run a separate Django project in a sub-directory while the main project runs in the root. I'm using Apache 2.2 and mod_python on Windows. If my apache httpd.conf includes just the subdirectory I get things working correctly: SetHandler python-program PythonPath "['C:/django-p

Model inheritance problem in admin

2008-07-14 Thread David
When I save objects from the admin pages, I get COPIES of what I'm saving. When I save them through the API, I don't get the duplicates. I'd like to know if I'm doing something wrong or misunderstanding something. Model: from django.db import models class Process(models.Model): process_name

Re: Setting the time on a datetimefield

2008-07-14 Thread Tim Sawyer
On Monday 14 Jul 2008, Rajesh Dhawan wrote: > The replace method here returns a new instance of a datetime object -- > it's not an in-place replace. This should work: > > self.datetime = self.datetime.replace(hour=23, minute=59) Hmm, that seemed to make sense to me too, though with my Java backgr

Re: Standalone script + get_absolute_url with urlresolvers

2008-07-14 Thread MikeHowarth
Yeah. I did think that. As far as I'm aware there aren't any errors in any of the views, however the views.py file for scripts it is an empty file. I'm guessing this is the problem in itself. Is it syntactically correct to have a views.py which is empty but exists? I'm not really sure of the pro

Re: Root Access

2008-07-14 Thread Jeff Gentry
> I don't think that is true, the only time I needed root was when I was > symlinking django into /usr/lib/python2.5/site-packages/ but since you I've run Django on machines w/ no root access and nothing special installed for me. Granted I've been running off of non-standard ports, but ... --~

Re: auto_id after validation

2008-07-14 Thread tosh
On Jul 14, 2:40 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > On Jul 14, 3:32 pm, tosh <[EMAIL PROTECTED]> wrote: > > > i'm using newforms admin branch. i have a form and auto_id="%s". > > everything works fine on the initial load. However, If there is a > > validation error when the form

Re: Change form - populating selected item from a ForeignKey field?

2008-07-14 Thread Rajesh Dhawan
Hi Martin, On Jul 14, 12:14 pm, mbdtsmh <[EMAIL PROTECTED]> wrote: > Hi everyone - wondering if someone could point me in the right > direction with this one? > > I am trying to populate fields in a form with data from the database > (i.e., a change form rather than an add new form). It works fin

Re: auto_id after validation

2008-07-14 Thread Rajesh Dhawan
Hi, On Jul 14, 3:32 pm, tosh <[EMAIL PROTECTED]> wrote: > i'm using newforms admin branch. i have a form and auto_id="%s". > everything works fine on the initial load. However, If there is a > validation error when the form is redisplayed i get id_ prepended to > my form ids. is there some way to

Re: Standalone script + get_absolute_url with urlresolvers

2008-07-14 Thread Rajesh Dhawan
Hi Mike, > > I'm running a standalone script outside of the web server to do some > maintainence tasks. > > In particular I need to return the absolute url from one of my models, > however when I call the get_absolute_url() method, I'm getting a > ViewDoesNotExist exception raised. A view exists

auto_id after validation

2008-07-14 Thread tosh
i'm using newforms admin branch. i have a form and auto_id="%s". everything works fine on the initial load. However, If there is a validation error when the form is redisplayed i get id_ prepended to my form ids. is there some way to control this or am i missing something? thanks --~--~-~-

Re: Setting the time on a datetimefield

2008-07-14 Thread Rajesh Dhawan
Hi Tim, > I have an object with a model.DateTimeField on it. For various reasons, I > need to set the time portion of this field to 23:59 when I populate it from a > form. > > datetime = models.DateTimeField() > > How can I do this? I've tried > > self.datetime = pForm.cleaned_d

Standalone script + get_absolute_url with urlresolvers

2008-07-14 Thread MikeHowarth
I was wondering whether anyone can help me with a problem I'm having. I'm running a standalone script outside of the web server to do some maintainence tasks. In particular I need to return the absolute url from one of my models, however when I call the get_absolute_url() method, I'm getting a V

Re: no more mail for ADMINS

2008-07-14 Thread Rajesh Dhawan
Hi, EAMiller wrote: > The first few lines of settings.py: > > DEBUG = False > TEMPLATE_DEBUG = DEBUG > > ADMINS = ( > ('E Miller', '[EMAIL PROTECTED]'), > ('E Miller', '[EMAIL PROTECTED]') > ) > > MANAGERS = ADMINS > SEND_BROKEN_LINK_EMAILS = True > SERVER_EMAIL = '[EMAIL PROTECTED]' > >

Re: how to parse results from a URL post

2008-07-14 Thread Rajesh Dhawan
Hi Bobby, Bobby Roberts wrote: > I'm getting a response back from my ongoing saga with https posting: > The response is as follows: > > UMversion=2.9&UMstatus=Declined&UMauthCode=&UMrefNum=70994924&UMavsResult=No > %20AVS%20response%20%28Typically%20no%20AVS%20data%20sent%20or%20swiped > %20trans

Re: how to parse results from a URL post

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 2:05 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > I'm getting a response back from my ongoing saga with https posting: > The response is as follows: > > > UMversion=2.9&UMstatus=Declined&UMauthCode=&UMrefNum=70994924&UMavsResult=No > %20AVS%20response%20%28Typically%20n

Re: URLs question

2008-07-14 Thread EAMiller
Bobby - I've used urllib in a django view for grabbing a json feed. You'll have to figure out how to handle the format you get your response in. I would suggest firing up an interactive prompt and trying it out... it's as simple as: >>> import urllib >>> response = urllib.urlopen('https://etc...'

how to parse results from a URL post

2008-07-14 Thread Bobby Roberts
I'm getting a response back from my ongoing saga with https posting: The response is as follows: UMversion=2.9&UMstatus=Declined&UMauthCode=&UMrefNum=70994924&UMavsResult=No %20AVS%20response%20%28Typically%20no%20AVS%20data%20sent%20or%20swiped %20transaction%29&UMavsResultCode=&UMcvv2Result=No%

Re: URLs question

2008-07-14 Thread Bobby Roberts
ok disregard this post. I dropped sending the accept/decline urls and i'm getting a direct post back to my url now. On Jul 14, 12:52 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > greetings. > > I'm using the urllib to post data to another site.  In the data, I > have to pass back a url for a

no more mail for ADMINS

2008-07-14 Thread EAMiller
The first few lines of settings.py: DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( ('E Miller', '[EMAIL PROTECTED]'), ('E Miller', '[EMAIL PROTECTED]') ) MANAGERS = ADMINS SEND_BROKEN_LINK_EMAILS = True SERVER_EMAIL = '[EMAIL PROTECTED]' Up until a few months ago this was fine - I mos

Re: SMS code examples

2008-07-14 Thread [EMAIL PROTECTED]
Remember, django is just python, so you can use httplib or urllib to do whatever http work you need to. On Jul 14, 12:00 pm, "John Handelaar" <[EMAIL PROTECTED]> wrote: > Hola > > I'm looking to use an SMS service provider to allow users to 'register' > their cell phones to receive updates.  The

Re: modify select widget

2008-07-14 Thread [EMAIL PROTECTED]
Sounds like you are looking for this: http://code.djangoproject.com/ticket/4412 On Jul 14, 12:18 pm, rskm1 <[EMAIL PROTECTED]> wrote: > On Jul 13, 9:58 am, "Nikolay Panov" <[EMAIL PROTECTED]> wrote: > > > You should create your custom widget for this. > > Also see the thread from a couple weeks a

Re: modify select widget

2008-07-14 Thread rskm1
On Jul 13, 9:58 am, "Nikolay Panov" <[EMAIL PROTECTED]> wrote: > You should create your custom widget for this. Also see the thread from a couple weeks ago titled "choices", http://groups.google.com/group/django-users/browse_thread/thread/d373794afef19e39/0009b671ebd91ac1 --~--~-~--~

SMS code examples

2008-07-14 Thread John Handelaar
Hola I'm looking to use an SMS service provider to allow users to 'register' their cell phones to receive updates. The registration is necessary in the same way that email confirmation is necessary. Available gateways here (UK and Ireland) all seem to have HTTP POST gateways for this sort of th

Setting the time on a datetimefield

2008-07-14 Thread Tim Sawyer
Hi Folks, I have an object with a model.DateTimeField on it. For various reasons, I need to set the time portion of this field to 23:59 when I populate it from a form. datetime = models.DateTimeField() How can I do this? I've tried self.datetime = pForm.cleaned_d

URLs question

2008-07-14 Thread Bobby Roberts
greetings. I'm using the urllib to post data to another site. In the data, I have to pass back a url for an "accept" page and url for a "decline" page. Now my very limited understanding of https posting is to allow you to send data to a website and get a response without leaving the url you are

Re: Accessing Components of a MultipleChoiceField

2008-07-14 Thread Tim
Thanks Malcolm - I will give this a shot - and if I understand J's self-described hack this is similar to what he is doing. If I end up successful, I'll post here. - Tim On Jul 11, 10:19 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-07-11 at 14:57 -0700, Tim wrote: > > I woul

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread Ramiro Morales
On Mon, Jul 14, 2008 at 1:19 PM, tom <[EMAIL PROTECTED]> wrote: > > I am running on this version: > Revision: 7920 > Node Kind: directory > Schedule: normal > Last Changed Author: russellm > Last Changed Rev: 7917 > Try applying the [1]tempfile3.diff patch attached to ticket [2]7658 but it is a b

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread tom
I am running on this version: Revision: 7920 Node Kind: directory Schedule: normal Last Changed Author: russellm Last Changed Rev: 7917 On 14 Jul., 16:14, "Ramiro Morales" <[EMAIL PROTECTED]> wrote: > On Sun, Jul 13, 2008 at 10:48 PM, tom <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have a probl

Change form - populating selected item from a ForeignKey field?

2008-07-14 Thread mbdtsmh
Hi everyone - wondering if someone could point me in the right direction with this one? I am trying to populate fields in a form with data from the database (i.e., a change form rather than an add new form). It works fine for populating Char/Date Fields but when I do the same for ForeignKey or m2

Re: Images in MySQL

2008-07-14 Thread lukeqsee
Thanks Oliver, hadn't researched that yet I have decided to use lighttpd to serve up the images now, looks to be much more reliable. On Jul 14, 11:48 am, Oliver Andrich <[EMAIL PROTECTED]> wrote: > Hi Luke, > > I have tried this in an asset management system I am currently   > implementing for my

Re: Images in MySQL

2008-07-14 Thread Oliver Andrich
Hi Luke, I have tried this in an asset management system I am currently implementing for my company, which is ment to store a lots of images (round about 300.000+). Generally it is a very bad idea, at least this is what I have found. I ignored this article http://mysqldump.azundris.com/arc

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 11:02 AM, Rudolph <[EMAIL PROTECTED]> wrote: > Ticket 5361 provides a way to accomplish this by writing a custom > backend: > http://code.djangoproject.com/ticket/5361 > > The ticket is on the "maybe" list for 1.0! I was afraid someone would bring up that ticket on this th

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Thanks, Karen, for pointing out. The admin is yet a secret for me :) -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 11:46 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jul 14, 2008 at 6:53 AM, rui <[EMAIL PROTECTED]> wrote: >> >> I meant the code that is called when you ac

Re: Inquiry

2008-07-14 Thread Jeff Anderson
Kadusale, Myles wrote: Good Day to All! I am new to Django and I was wondering if there is a sample application that deals with sessions that is not using cookies. Django's session framework uses cookies. I don't know why you wouldn't want to do sessions without cookies, and I don't know of

Re: Images in MySQL

2008-07-14 Thread Rudolph
Ticket 5361 provides a way to accomplish this by writing a custom backend: http://code.djangoproject.com/ticket/5361 The ticket is on the "maybe" list for 1.0! Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: admin doesn't catch IntegrityErrors?

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 5:23 AM, Alex Rades <[EMAIL PROTECTED]> wrote: > > Hi, > I'm using latest newforms-admin and I have a simple model which is: > > class Backend(models.Model): >name = models.CharField(unique=True, max_length=255) >address = models.IPAddressField() > >class Meta:

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 10:41 AM, lukeqsee <[EMAIL PROTECTED]> wrote: > I know you can store images in a BLOB field in mysql, but is it > possible with Django models? Not out of the box, but you're free to create your own custom field[1] to do that for you. If you look hard enough, you can probab

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 6:53 AM, rui <[EMAIL PROTECTED]> wrote: > I meant the code that is called when you access: > '"admin/amyprot/sequence/add/" :) > Cheers. > Rui: Well, that'd be the admin app, so likely not the poster's code at all. Allison: I assume you are using MyISAM tables? They all

Images in MySQL

2008-07-14 Thread lukeqsee
I know you can store images in a BLOB field in mysql, but is it possible with Django models? Thanks, Luke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: AuthenticationMiddleware question

2008-07-14 Thread alex finn
Thank you so much Marty, that's what I need. --~--~-~--~~~---~--~~ 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, se

Re: How to display the images in the template page under the django development server

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 6:06 AM, rui <[EMAIL PROTECTED]> wrote: > Hi Eric, > > There is a bit about it in this excerpt: > > """ > MEDIA_ROOT > > Default: '' (Empty string) > > Absolute path to the directory that holds media for this installation. > Example: "/home/media/media.lawrence.com/" See al

Re: AuthenticationMiddleware question

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 10:12 AM, alex finn <[EMAIL PROTECTED]> wrote: > Can anybody explain me why django's AuthenticationMiddleware is > setting user attribute of request.__class__ and not of request itself? > What's the point of setting it on a class level rather then on the > instance level?

Re: Python PATH question

2008-07-14 Thread phillc
> > The runserver stuff is a bit too magic. It puts 'root' on sys.path but > > only long enough to import 'mysite' package root. um, i have never experienced this behavior. plug: http://www.wtflab.com/tech/2008/jul/01/developed-directory-structure/ --~--~-~--~~~---

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread Ramiro Morales
On Sun, Jul 13, 2008 at 10:48 PM, tom <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a problem with file uploads which are bigger than 2.5 MBs. When > I use files which are smaller than 2.5 MBs, the files save as > expected. As soon as they are bigger than that, I get an IOError (see > traceback fu

AuthenticationMiddleware question

2008-07-14 Thread alex finn
Can anybody explain me why django's AuthenticationMiddleware is setting user attribute of request.__class__ and not of request itself? What's the point of setting it on a class level rather then on the instance level? --~--~-~--~~~---~--~~ You received this message

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread tom
Yes, I get the same error message. I tried it with a different directory within the homedir of the user who is running the server and also with the temp directory and even without any setting. Either on Linux or on Max OSX. I also tried to run the server with sudo and I also tried to write into th

Re: templates: additional forloop variable?

2008-07-14 Thread Scott Moonen
(Tim - thanks for the suggestion.) Russ, I'm considering adding a forloop.previous (or somesuch) variable to the >> supplemental variables produced by the for tag. If forloop.first is true, >> this value would always be None, but otherwise it would reference the >> actual >> loop item from the p

Re: templates: additional forloop variable?

2008-07-14 Thread Russell Keith-Magee
On Mon, Jul 14, 2008 at 7:46 AM, Scott Moonen <[EMAIL PROTECTED]> wrote: > I'm considering adding a forloop.previous (or somesuch) variable to the > supplemental variables produced by the for tag. If forloop.first is true, > this value would always be None, but otherwise it would reference the ac

Re: admin doesn't catch IntegrityErrors?

2008-07-14 Thread Alex Rades
My problem is specifically with the admin site Thanks On Mon, Jul 14, 2008 at 11:55 AM, rui <[EMAIL PROTECTED]> wrote: > I had to come around this doing in the start of the code: > > from django.db import transaction > > And after the IntegrityError is catched (with a try/except block): > > tran

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
I meant the code that is called when you access: '"admin/amyprot/sequence/add/" :) Cheers. -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 7:42 AM, allisongardner <[EMAIL PROTECTED]> wrote: > > Okay, that is my gut instinct too, a broken relationship. What gets me > though is that is

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Hi Allison, Which database are you using ? SQLite ? The Protein.objects.all() return the desired object ? Does it returns something ? Cheers :) -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 6:04 AM, allisongardner <[EMAIL PROTECTED]> wrote: > > I am stumped. Database worked fine

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread allisongardner
Okay, that is my gut instinct too, a broken relationship. What gets me though is that is worked last night no problem. Nothing was changed. Will have a fiddle around and see what I can do. By the way I do not understand what you mean by "could post your view code at "admin/amyprot/sequence/add/"?.

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Could post your view-code at "admin/amyprot/sequence/add/" ? Looks like that it is a ForeignKey broken relationship or something like this. -- Rui http://ruivaldo.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread allisongardner
My mistake, ran it from python interactive prompt after typing in python manage.py shell (you can tell I am a real newbie). I get all the objects returned that are there, no problem. By the way I have tried the classic turning my computer on and off again ...next stage will be a hammer! Allison O

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread allisongardner
Hi, Thank you for replying. I am using MySQL. I ran Protein.objects.all() (i typed in Python manage.py dbshell and the typed the query at the MySQL prompt). All I get is a -> prompt. Really stumped on this one and near to having a very big tantrum. Allison On Jul 14, 12:10 pm, rui <[EMAIL PROTECT

Re: How to display the images in the template page under the django development server

2008-07-14 Thread rui
Hi Eric, There is a bit about it in this excerpt: """ MEDIA_ROOT Default: '' (Empty string) Absolute path to the directory that holds media for this installation. Example: "/home/media/media.lawrence.com/" See also MEDIA_URL. MEDIA_URL Default: '' (Empty string) URL that handles the media ser

Re: admin doesn't catch IntegrityErrors?

2008-07-14 Thread rui
I had to come around this doing in the start of the code: from django.db import transaction And after the IntegrityError is catched (with a try/except block): transaction.rollback() Like: try: user.save() except IntegrityError, e: transaction.rollback() Sorry

Re: ForeignKey ordering on Models

2008-07-14 Thread Daniel Roseman
On Jul 14, 10:27 am, Darthmahon <[EMAIL PROTECTED]> wrote: > Hey, > > I want to have a field on one model link to another model as a > ForeignKey. Problem is, this field needs to be declared before the > second model has been defined. > > Example below - latest refers to Album, but Album is below

admin doesn't catch IntegrityErrors?

2008-07-14 Thread Alex Rades
Hi, I'm using latest newforms-admin and I have a simple model which is: class Backend(models.Model): name = models.CharField(unique=True, max_length=255) address = models.IPAddressField() class Meta: db_table = u'backend' ordering = ('name',) In the admin, when I try

ForeignKey ordering on Models

2008-07-14 Thread Darthmahon
Hey, I want to have a field on one model link to another model as a ForeignKey. Problem is, this field needs to be declared before the second model has been defined. Example below - latest refers to Album, but Album is below Musician so it won't let me do this? Is there a way of getting around t

Re: How can I delete the default sqlite3 db?

2008-07-14 Thread Evert
> What I need to know is where did django create the default one. > > I didn't create it. I just specified I wanted to use sqlite3 in the > settings.py file, and left the DATABASE_NAME intact. Probably in your tmp directory: /tmp on most unices, or /var/tmp on OS X (don't know about windows). Yo

worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread allisongardner
I am stumped. Database worked fine yesterday, adding new protein sequence quite happily. Start tryign to do the same today, having made no changes at all to my models or anything, and I get the error: DoesNotExist at /admin/amyprot/sequence/add/ Protein matching query does not exist. Request Metho

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread Julien Phalip
Do you also get a 'No such file or directory' error when using the FILE_UPLOAD_TEMP_DIR setting, or do you get a different error? On Jul 14, 5:34 pm, tom <[EMAIL PROTECTED]> wrote: > hi, > > i have done that. I am running the server with the runserver command. > I tried also different directories

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread tom
hi, i have done that. I am running the server with the runserver command. I tried also different directories using the FILE_UPLOAD_TEMP_DIR without any change. This behaviour is reproducable on different servers and come up with upgrading to the latest revision of the django branch. It has been w

  1   2   >