Re: django buildout trouble

2010-03-17 Thread andreas schmid
did you run ./bin/django syncdb? did you edit the cottagematic_com.urls to get the admin working? ViewDoesNotExist: Could not import cottagematic_com.django.contrib.auth.views. this one looks strange to me because cottagematic_com is your project dir (right?) and django is located in cottagematic_

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread Omer Barlas
Bobby Roberts @ 17-03-2010 06:15: anyone get this working? I've followed the instructions in the install docs for django-tiny and still have the ole ugly text box up there. why do you rely on django-tiny? use ckeditor, it's very simple to deploy, just add the js code to your and apply class=

Re: Many to Many...so many queries

2010-03-17 Thread bruno desthuilliers
On Mar 17, 4:24 am, TheIvIaxx wrote: > Hello all, i have a question about a certain query i have.  Here is my > model setup: > > class Term(): >     term = CharField() > > class Image(): >     image = FileField() >     terms = ForeignKey(Term) > > These have been abbreviated for simiplicity, ut yo

Re: Many to Many...so many queries

2010-03-17 Thread bruno desthuilliers
On Mar 17, 4:37 am, TheIvIaxx wrote: > i suppose i could, but that will be a last resort :)  What about > dropping down to raw SQL just to get the IDs: > > SELECT term_id FROM image_term WHERE image_id = %i > > or is that discouraged?  Can it be done with the ORM? You'd have the exact same result

Send e-mail with large files from form attached

2010-03-17 Thread tezro
Hello everyone. I need some help or advice. I've got a form with 20 ImageFields - such a form for sending photos to the site admin as a request for a new user. Well, Django certainly handles and uploads the, that's OK. But when it comes to sending all the files as an attachment - I got stuck. Her

Re: A bit of a modeling question

2010-03-17 Thread ALJ
Hi, Thanks. I can't see the wood for the trees at the moment. Neil On Mar 17, 2:57 am, aditya wrote: > ALJ, > In that case, I think you need multiple models, without inheritance... > > Aditya > > On Mar 16, 1:48 pm, ALJ wrote: > > > Hi aditya, > > > I wasn't aware of the editable parameter (wh

Re: django-weave needs contribution...

2010-03-17 Thread Jens Diemer
Am 07.03.2010 20:15, schrieb Jens: I started http://code.google.com/p/django-weave/ a Django reuseable Application witch implements a Firefox weave server. The Project is in planning/pre-alpha state. If anyone has interest to help, please contact me! Bookmark sync works now, since: http://cod

Re: passing more information with formsets

2010-03-17 Thread Alastair Campbell
On Tue, Mar 16, 2010 at 7:46 PM, Dennis Kaarsemaker wrote: > Each ModelForm has an instance attribute, so you can use > {{ form.instance.whatever }} Hi Dennis, Unfortunately it is not a model form. The form creates an "entry", which is de-normalised data taken from the person (member) details and

More tutorials and recipes?

2010-03-17 Thread ALJ
I've done the tutorial. This is great. It's practical. You can see how things fit together. But the application is quite simple. I've read the documentation. This tells you how the bits work. But it's quite detailed. What I am looking for is something that goes beyond the tutorials to bridge the

Re: More tutorials and recipes?

2010-03-17 Thread Jirka Vejrazka
> What I am looking for is something that goes beyond the tutorials to > bridge the gap to the detail of the modules. Are there any? Hi, how about checking out some existing applications to learn how those work? Many of them are small enough to get the useful tips and tricks from them in 10 m

Re: How to check if I installed Django well?

2010-03-17 Thread Archidjango
Alright! Works fine now!! Thanks a lot!!! :-) On Mar 16, 12:43 pm, Daniel Roseman wrote: > On Mar 16, 9:49 am, Archidjango wrote: > > > > > > > Hey all, > > > I'm a fresh Python/Django user and I'm experiencing a couple of > > problems to check if Django is correctly installed on my machine. We

Re: More tutorials and recipes?

2010-03-17 Thread ALJ
Hi Jirka, Cheers for that. I like the cookbook (http://code.djangoproject.com/ wiki/CookBook) ALJ On Mar 17, 11:23 am, Jirka Vejrazka wrote: > > What I am looking for is something that goes beyond the tutorials to > > bridge the gap to the detail of the modules. Are there any? > >   Hi, > >   h

Re: More tutorials and recipes?

2010-03-17 Thread Alastair Campbell
> On Mar 17, 11:23 am, Jirka Vejrazka wrote: >> > What I am looking for is something that goes beyond the tutorials to >> > bridge the gap to the detail of the modules. Are there any? I found the best next step was the "Practical Django Projects" book: http://apress.com/book/view/1430219386 (I n

No required field indication in TabularInline

2010-03-17 Thread Dirk Eschler
Hello, in StackedInline the label of a required field gets the class required. In TabularInline (and GenericTabularInline) however, the corresponding table head cell gets no class, so there is no indication if a field is required or not. You have to save to know what fields are required. Is thi

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread tchendrix
i'll check it out Omer Barlas wrote: Bobby Roberts @ 17-03-2010 06:15: anyone get this working? I've followed the instructions in the install docs for django-tiny and still have the ole ugly text box up there. why do you rely on django-tiny? use ckeditor, it's very simple to deploy, just

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread tchendrix
do you by chance have instructions on how to get that installed with django so it works properly? They don't say anything in their install docs about what javascript to call. Omer Barlas wrote: Bobby Roberts @ 17-03-2010 06:15: anyone get this working? I've followed the instructions in the

Re: What validation tests are applied to ImageField?

2010-03-17 Thread pjrhar...@gmail.com
> What constitutes a 'valid' image? > The documentation states "ImageField... Like FileField, but validates > that the uploaded object is a valid image." I haven't read through the code, but the error must be caught somewhere because I just tested it out. Trying to upload in the admin a random fi

Re: What validation tests are applied to ImageField?

2010-03-17 Thread Karen Tracey
On Wed, Mar 17, 2010 at 1:51 AM, john2095 wrote: > Maybe I should post this on the developers list? > No. The topic for django-developers is the development of Django itself. Questions about the use of Django are off-topic and will be directed elsewhere. Validation of image fields is done at th

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread Omer Barlas
tchendrix @ 17-03-2010 14:31: do you by chance have instructions on how to get that installed with django so it works properly? They don't say anything in their install docs about what javascript to call. you don't install it over django. put the javascript files in your /media folder, and loa

Re: What validation tests are applied to ImageField?

2010-03-17 Thread thanos
DJango's ImageFields uses the PIL verify to check the image. trial_image = Image.open(file) trial_image.verify() See: http://www.pythonware.com/library/pil/handbook/image.htm On Mar 15, 10:56 pm, john2095 wrote: > The documentation states about the ImageField > > "Like FileField, but validate

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread chris hendrix
ok thanks for pointing me in the right direction. doesn't sound too hard. On Wed, Mar 17, 2010 at 8:59 AM, Omer Barlas wrote: > tchendrix @ 17-03-2010 14:31: > > do you by chance have instructions on how to get that installed with >> django so it works properly? They don't say anything in th

Re: how to run a given project

2010-03-17 Thread hk
it was exactly that thanks :D! On Mar 17, 2:39 am, Jeremy Sandell wrote: > On Mar 16, 4:58 am, hk wrote: > > > hi > > > Ive just started experiencing DJango i am an undergrad student i was > > given a Django project on which to extend functionality but after > > installing all the necessary apps

Re: Django With Google App Engine

2010-03-17 Thread Waldemar Kornewald
On Mar 17, 4:27 am, TheIvIaxx wrote: > it works pretty well, however i couldn't get m2m to work.  i guess > that doesnt translate well to BigTable It's not yet supported (it depends on JOIN emulation), but we will eventually add it. Currently (and for the next few months), we have lots of other s

Re: Modifying admin to filter choices

2010-03-17 Thread derek
On Mar 16, 8:35 pm, Nick wrote: > I am working on a project that has a portion of the admin with three > different "choices" options.  The section of the model that this > thread is concerned with looks like this: > > Department_Choices = ( > ('Advertising', 'Advertisinf'), > ('NIC', 'NIC'), > ('P

Re: mr.developer

2010-03-17 Thread Bill Freeman
I'm of two minds as to what you are asking. 1. For components that don't have a version sepcification, buildout *normally) checks to see if there is a newer version available, and, if there is installs it in place of the existing version (doesn't necessarily delete the files for the old version,

Django leaves opened connections

2010-03-17 Thread cleg
I'm using Django ORM with Postgres. After any operations with models (e.g. simple select) in postgres appears new opened connection in state. I've tried all possible transaction manipulations, I've tried calling connection.close() manually. All useless. And sooner or later, I'm recieveing "FATAL

Multiple Primary Keys

2010-03-17 Thread ojayred
Hello Users, I am new to using Django and so far, I like it. I have installed Django and want to use it with a pre-existing database. Several tables have multiple primary keys. How do I create the multiple primary keys in the model? I did use the inspectdb command to help me create the model becau

Re: django buildout trouble

2010-03-17 Thread John Griessen
andreas schmid wrote: did you run ./bin/django syncdb? Yes. did you edit the cottagematic_com.urls to get the admin working? I edited, but it does not work. ViewDoesNotExist: Could not import cottagematic_com.django.contrib.auth.views. this one looks strange to me because cottagematic_com is

Re: mr.developer and buildout (newbie questions)

2010-03-17 Thread John Griessen
Bill Freeman wrote: I'm of two minds as to what you are asking. Thanks very much for the time writing back about my problem. 1. For components that don't have a version specification, buildout *normally) checks to see if there is a newer version available, and, if there is installs it in pla

Re: Multiple Primary Keys

2010-03-17 Thread Ramiro Morales
On Wed, Mar 17, 2010 at 12:21 PM, ojayred wrote: > Hello Users, > > I am new to using Django and so far, I like it. I have installed > Django and want to use it with a pre-existing database. Several tables > have multiple primary keys. How do I create the multiple primary keys > in the model? I di

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread Bobby Roberts
hey i've uploaded the ckeditor folder to my /static/admin/js directory. I'm trying to get the text areas to use it but i'm not having any luck so I don't think i'm putting code in the right place. can you help? On Mar 17, 9:18 am, chris hendrix wrote: > ok thanks for pointing me in the right

Python unicode issues when running in django environment

2010-03-17 Thread Tom Evans
Hi all I have a weird problem with unicode conversion whilst running in the django environment. I'm not convinced django is the cause, but hopefully someone will have seen something like this and can point me in the right direction.. The original code was an XML-RPC call from one django server to

Re: Python unicode issues when running in django environment

2010-03-17 Thread Karen Tracey
On Wed, Mar 17, 2010 at 12:14 PM, Tom Evans wrote: > Any pointers? http://bugs.python.org/issue1288615 It's fixed in current Python 2.6, I believe. However, this is a shell-only issue, so I'm not sure it will explain your original problem. Karen -- You received this message because you are

Re: Python unicode issues when running in django environment

2010-03-17 Thread Tom Evans
On Wed, Mar 17, 2010 at 4:33 PM, Karen Tracey wrote: > On Wed, Mar 17, 2010 at 12:14 PM, Tom Evans > wrote: >> >> Any pointers? > > http://bugs.python.org/issue1288615 > > It's fixed in current Python 2.6, I believe. > > However, this is a shell-only issue, so I'm not sure it will explain your >

Re: Python unicode issues when running in django environment

2010-03-17 Thread Karen Tracey
On Wed, Mar 17, 2010 at 1:08 PM, Tom Evans wrote: > Hmm, still a bit confused why it doesn't exhibit the issue under a > regular python 2.5 shell if it is a python 2.5 issue. Something > definitely 'tweaks' the environment going through the django shell > rather than the python shell. Must only b

Re: Many to Many...so many queries

2010-03-17 Thread TheIvIaxx
I made a mistake in my model definitions above. The Term field on Image is a ManyToMany() not ForeignKey(). Anyhow I did look into value_list, however it didn't add much, if any, performance gain. But the select_related did! That was exactly what I needed. Thanks Bruno for the tip. On Mar 17

Re: passing more information with formsets

2010-03-17 Thread Dennis Kaarsemaker
On wo, 2010-03-17 at 09:34 +, Alastair Campbell wrote: > On Tue, Mar 16, 2010 at 7:46 PM, Dennis Kaarsemaker wrote: > > Each ModelForm has an instance attribute, so you can use > > {{ form.instance.whatever }} > > Hi Dennis, > > Unfortunately it is not a model form. The form creates an "entry

ProgrammingError: relation "project_webproject" does not exist

2010-03-17 Thread neridaj
Hello, I've been working on a portfolio website that includes an app called projects. Within this app are the models WebProject and ScreenShot for project info and related screenshots for display on the portfolio page. Everything has been working fine up until now, when I try to add another projec

Re: ProgrammingError: relation "project_webproject" does not exist

2010-03-17 Thread neridaj
I restarted my server and the images now display. I don't understand why I need to do that for the images to show up. On Mar 17, 12:30 pm, neridaj wrote: > Hello, > > I've been working on a portfolio website that includes an app called > projects. Within this app are the models WebProject and Scr

Conflict between django csrf and credit card clearing?

2010-03-17 Thread Joakim Hove
Hello, I am using Django to write a sort of web-shop site. For reading credit card information, and reserving the money we use a third part company called DIBS. The flow of the application is roughly like this: 1. The customer peeks around at our site and selects product(s) to buy. 2. When the c

Using a many-to-many through with users

2010-03-17 Thread Charlie L
I'm running into some trouble adding a custom many-to-many field to the User model. http://dpaste.com/173041/ I am modelling social relationships, and to do this I have a relationship model with 2 foreign keys to users, a 'from_user' and a 'to_user' -- in essence, this looks like a Many-to-many t

Re: Using a many-to-many through with users

2010-03-17 Thread Charlie L
I guess I should have made this more clear what my question was: Anybody know how to fix the WHERE clause? Is there a better way to achieve this functionality? On Mar 17, 3:44 pm, Charlie L wrote: > I'm running into some trouble adding a custom many-to-many field to > the User model. > > http:/

Re: More tutorials and recipes?

2010-03-17 Thread ALJ
Thanks Alastair ... I'll check it out. On Mar 17, 12:57 pm, Alastair Campbell wrote: > > On Mar 17, 11:23 am, Jirka Vejrazka wrote: > >> > What I am looking for is something that goes beyond the tutorials to > >> > bridge the gap to the detail of the modules. Are there any? > > I found the best

Re: Conflict between django csrf and credit card clearing?

2010-03-17 Thread pjrhar...@gmail.com
On Mar 17, 7:37 pm, Joakim Hove wrote: > Summary of redirections: > >       Form at my site --> DIBS --> simple view at my site. > > Any tips? > > Joakim My best guess is that the user must be getting posted back to that address when they click a button on the external website. You can probably

dev server cannot access javascript files in template

2010-03-17 Thread Igor Ganapolsky
Hi, I am running a django dev server. I have a template where I'm calling a javascript function from a an external .js file (residing in the same directory as the template). However, I get the following error: "ReferenceError: al is not defined". Nevertheless, when I just open this html page wit

Re: dev server cannot access javascript files in template

2010-03-17 Thread Daniel Roseman
On Mar 17, 9:30 pm, Igor Ganapolsky wrote: > Hi, > I am running a django dev server.  I have a template where I'm calling > a javascript function from a an external .js file (residing in the > same directory as the template).  However, I get the following error: > "ReferenceError: al is not define

admin delete action

2010-03-17 Thread SlafS
Hi there! Anyone else can't delete objects on admin change list with newest Django (12801)? When the list has list_editable fields it raises Validation Error Is there a ticket already for this ? Regards --- stack: Environment: Request Method: POST Request URL: http://127.0.0.1:8000/admi

Re: admin delete action

2010-03-17 Thread Karen Tracey
On Wed, Mar 17, 2010 at 6:14 PM, SlafS wrote: > Is there a ticket already for this ? Yes. http://code.djangoproject.com/ticket/12962 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Re: dev server cannot access javascript files in template

2010-03-17 Thread Igor Ganapolsky
I have since then moved my javascript file to a site_media/scripts directory. My project structure looks like this: webservice/ |-- first/ -- site_media/ -- scripts/ -- templates/ -- urlss/ What I have done is: 1) In urls.py I added (r'^site_media/(?P.*)$', 'django.views.static.

Re: dev server cannot access javascript files in template

2010-03-17 Thread Igor Ganapolsky
I should add that I still have the problem... On Mar 17, 6:24 pm, Igor Ganapolsky wrote: > I have since then moved my javascript file to a site_media/scripts > directory.  My project structure looks like this: > webservice/ >  |-- first/ >     -- site_media/ >        -- scripts/ >     -- template

Re: Conflict between django csrf and credit card clearing?

2010-03-17 Thread Joakim Hove
Hello Peter, thank you very much for your answer. The exception did the job :-) Joakim -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send ema

Re: django buildout trouble

2010-03-17 Thread Kevin Teague
> > I think it is a path problem, since the /polls/ part of the running site > can't find views and the /admin part can't find views. > > I'm looking into why buildout would leave the pythonpath incomplete > and think it is just a buildout.cfg problem.  The same site structure worked > in a non-bu

Re: passing more information with formsets

2010-03-17 Thread Alastair Campbell
On Wed, Mar 17, 2010 at 7:02 PM, Dennis Kaarsemaker wrote: > In the view function, you could add an attribute (say, instance :-)) to > each form in the formset. That to me is a better way than doing weird > magic in a template. You're probably right, but I couldn't work that out for formsets: htt

Re: More tutorials and recipes?

2010-03-17 Thread Continuation
Check out the online Django book: http://www.djangobook.com/ It's somewhat outdated but it covers all the basics. On Mar 17, 5:48 am, ALJ wrote: > I've done the tutorial. This is great. It's practical. You can see how > things fit together. But the application is quite simple. > > I've read the

UserCreationForm : is clean_username necessary?

2010-03-17 Thread Peyman
Hi all, In django.contrib.auth.UserCreationForm, there is clean_username that checks if the username already exist in the db. This should not be necessary because this form is a ModelForm and the associated model User has unique=True. Am I wrong? Thanks -- Peyman -- You received this messag

Re: django buildout trouble

2010-03-17 Thread John Griessen
Kevin Teague wrote: I'm looking into why buildout would leave the pythonpath incomplete and think it is just a buildout.cfg problem. The same site structure worked in a non-buildout form. Yes, this sounds like a simple library path problem. Did you provide a setup.py for your cottagematic_com

Email address in registration form

2010-03-17 Thread Wiiboy
Hi guys, I'm using a combination of the UserCreationForm and my own ModelForm of my Profile model to create a registration form. I want to get users' email addresses, however, that seems to be a field in contrib.auth.User, so it should be in UserCreationForm. I don't know whether to a. Add to the

Re: UserCreationForm : is clean_username necessary?

2010-03-17 Thread Karen Tracey
On Wed, Mar 17, 2010 at 9:41 PM, Peyman wrote: > In django.contrib.auth.UserCreationForm, there is clean_username > that checks if the username already exist in the db. This should not > be necessary because this form is a ModelForm and the associated model > User has unique=True. > Am I wrong?

Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-17 Thread robinne
I can save an uploaded image to a FileField like this (where "ProductFile" is a model) and "TempFile" is an ImageField: uploadedfile = request.FILES['uploadfile'] ProductFile.objects.create(FileName=UploadDate=datetime.datetime.now(), TempFile=uploadedfile) But, how do I manipulate the image size

content template loads at bottom of base template instead of top

2010-03-17 Thread timdude
Hiya all, My lovely django app is letting me down (or I'm letting it down). I am using a base template with a content template extending this base. Half of the time and on random pages, the content template loads at the bottom of the page/base template. Anyone know what's going on? Cheers, Tim