ManyToManyField problem?

2007-12-12 Thread Young Gyu Park
class Entry(models.Model): blog = models.ForeignKey(Blog,related_name='entries') Title = models.CharField(maxlength=250, blank=False, null=False) Slug = models.SlugField(maxlength=250, blank=False, null=False, prepopulate_from=('Title',)) Content = models.TextField(blank=False, null

__init__() got an unexpected keyword argument 'max_length'

2007-12-12 Thread DjangoFett
I get the above error when running an application via apache2. not when i use the built in 'python mange.py runserver' command. I've done a svn update with the current trunk both directly into my site-packages directory and to another directory with an 'ln' link inside the site-packages directory

Re: GeoDjango: Invalid spatial reference pointer returned from "OGR_L_GetSpatialRef"

2007-12-12 Thread Justin Bronn
> Should the example still work with the latest svn revision of > GeoDjango? The IPython session is pasted below. Yes, it should work. You found a bug -- I just fixed it in r6916. There have been some significant changes to GeoDjango since FOSS4G (e.g., GEOS & GDAL refactors, distance queries,

Re: Accessing Multiple Databases

2007-12-12 Thread Ben Ford
Hi folks, I was going to keep quiet on this until I was a bit further along... I've just started work on re-hashing multiple-db support to make it a bit more flexible. The existing code is quite hard to update with trunk as it makes a lot of changes to django's core codebase. I've also found it a

GeoDjango: Invalid spatial reference pointer returned from "OGR_L_GetSpatialRef"

2007-12-12 Thread Joe
I'm following along with the GeoDjango_Presentation.pdf at [1] from the FOSS4G 2007 presentation at [2], using the shapefile 'st99_d00.shp' from [3]. When trying the example code listed on the bottom slide of page 11 in the pdf , I get an error: SRSException: Invalid spatial reference pointer

Re: newforms / modelform save

2007-12-12 Thread l5x
OMG, call it "3:15AM syndrome" Thank you J. --~--~-~--~~~---~--~~ 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, sen

Re: newforms / modelform save

2007-12-12 Thread Joseph Kocherhans
On 12/12/07, l5x <[EMAIL PROTECTED]> wrote: > > Unfortunately, it creates second record, when using your solution, > instead of updating. Well then instead of instantiating a new object will 'Full()', why aren't you getting an existing object and passing it into the form instead of a new object?

Re: #6189: IntegrityError: Field "may not be NULL" even though blank=True

2007-12-12 Thread Karen Tracey
On Dec 11, 2007 11:55 PM, Tyson Tate <[EMAIL PROTECTED]> wrote: > > I submitted bug #6189 [1], but I thought I should ping django-users to > see if anyone has encountered this before or knows of a workaround. > > In summary, despite adding "blank=True" to my fields, many of them > throw IntegrityE

Re: newforms / modelform save

2007-12-12 Thread l5x
Unfortunately, it creates second record, when using your solution, instead of updating. --~--~-~--~~~---~--~~ 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@googlegro

Re: FileField upload directory

2007-12-12 Thread Malcolm Tredinnick
On Thu, 2007-12-13 at 11:49 +1000, Tristan King wrote: > Hi, > > Is there a way to point the FileField upload directory to somewhere that > isn't under the MEDIA_ROOT ? This type of question has been asked very frequently on the list in the past. A number of solutions have been proposed on the

Re: newforms / modelform save

2007-12-12 Thread Joseph Kocherhans
On 12/12/07, l5x <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a model with two ForeignKeys (User and another model). I cannot > set them to editable=False, because Admin needs to see them and > modify. > > So I've created ModelForm and excluded those two fields. And now: > > 1) when I'm tryin

FileField upload directory

2007-12-12 Thread Tristan King
Hi, Is there a way to point the FileField upload directory to somewhere that isn't under the MEDIA_ROOT ? I want this because i want to be able to upload files, but not have them accessible via the web. I've worked around this by making a new url to the upload directory and making a view which

newforms / modelform save

2007-12-12 Thread l5x
Hello, I have a model with two ForeignKeys (User and another model). I cannot set them to editable=False, because Admin needs to see them and modify. So I've created ModelForm and excluded those two fields. And now: 1) when I'm trying to *update* the content by MyModelForm.save() : there is er

Re: Stuck implementing editable ordered lists

2007-12-12 Thread toomim
ForiegnKey works great! Thanks so much man! The drop-menu of choices is a good idea too. I'll do that! On Dec 12, 2:19 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > However, after I have SAVED a pub, I cannot change the Person field of > > its PubAuthors from the inlined page on the P

PyAMF 0.1.0 alpha

2007-12-12 Thread Arnar
Hello folks, As a followup to previous posts on this list, some people might be interested in the following: We are pleased to announce the first alpha version of PyAMF. PyAMF [1] is a lightweight library that allows Flash and Python applications to communicate via Adobe's ActionScript Message

#6189: IntegrityError: Field "may not be NULL" even though blank=True

2007-12-12 Thread Tyson Tate
I submitted bug #6189 [1], but I thought I should ping django-users to see if anyone has encountered this before or knows of a workaround. In summary, despite adding "blank=True" to my fields, many of them throw IntegrityErrors when I try to save them with blank values in the admin interfac

Re: Accessing Multiple Databases

2007-12-12 Thread Russell Keith-Magee
On Dec 13, 2007 12:25 AM, Derek Steinkamp <[EMAIL PROTECTED]> wrote: > > As an aside, I think it is a real showstopper to not include this > feature in the main trunk... I can't believe the triage stage on the > feature request was recently changed to "Someday/Maybe". To me it seems > obvious that

Re: Tableless models?

2007-12-12 Thread Empty
Wouldn't it just involve creating a backend that has nothing to do with a database? Seems pretty straightforward to me. Michael blog.michaeltrier.com On Dec 12, 2007 1:52 PM, Nathan Fiedler <[EMAIL PROTECTED]> wrote: > > This topic has come up once or twice before, but it doesn't seem like > a

Re: readable object

2007-12-12 Thread IdNotFound
Hello, After you mentioned this on #django, I went on hacking something as I told you. I'm not sure what are the guidelines in this list for posting code, so I'll just paste below, since dpaste can vanish eventually. Please forgive me since this is my first post. Let me know and it won't happen

Re: django REST: update tables

2007-12-12 Thread Malcolm Tredinnick
On Tue, 2007-12-11 at 15:18 -0800, crybaby wrote: > I have a view which allows users to upload pictures and add tags, > description to them. I have to update two tables: post and img > > If I want to do this by REST, how do you do this? Is REST only suited > for manipulating one resource(one t

Re: Stuck implementing editable ordered lists

2007-12-12 Thread Rajesh Dhawan
Hi, > However, after I have SAVED a pub, I cannot change the Person field of > its PubAuthors from the inlined page on the Pub admin page! Here's a > screenshot:http://code.djangoproject.com/attachment/ticket/6118/badorderedmanyto... This is documented behaviour for the OneToOneField: http://www

Personal Development is Bringing Artificial Intelligence to the Internet

2007-12-12 Thread Naeem
Personal Development is Bringing Artificial Intelligence to the Internet It never ceases to amaze me... that the personal development industry is growing as rapidly as it is. When you see that self help is being used to raise money for charities, it doesn't come as much of a surprise. http://do

Re: Accessing Multiple Databases

2007-12-12 Thread koenb
Please also have a look at ticket #4747. It was/is an effort to bring multi db a little bit closer to trunk. Regrettably, I have not had the time (nor the need) to continue working on this. Good luck. Koen On 12 dec, 16:25, Derek Steinkamp <[EMAIL PROTECTED]> wrote: > Thanks for the link, it is

Re: readable object

2007-12-12 Thread Marty Alchin
You might look into databrowse[1], which is available in the SVN version of Django. There are some screenshots[2] available as well, so you can like to see what it's like. -Gul [1] http://www.djangoproject.com/documentation/databrowse/ [2] http://www.flickr.com/photos/ubernostrum/2010704987/in/

Re: Model advice, i18n and content

2007-12-12 Thread Antoni Aloy
Just an issue, I've lots of problems with Django i18n and cachés. So if you decide not to use different urls for the language and just take the page language from the browser or let the user to change it manually, be careful with per-view-cache as far as I know is not i18n friendly. -- Antoni Al

Re: readable object

2007-12-12 Thread Milan Andric
On Dec 12, 1:13 pm, Milan Andric <[EMAIL PROTECTED]> wrote: > Is there an easy way to print an object in html? Basically with > display names and manytomany relationships resolved. (just for > viewing) > > I was thinking to write something like model_to_dict(obj) that > resolves a bunch of st

Re: readable object

2007-12-12 Thread shaleh
>On Wed Dec 12 11:13 , Milan Andric <[EMAIL PROTECTED]> wrote: > Is there an easy way to print an object in html? Basically with display > names and manytomany relationships resolved. (just for viewing) > I was thinking to write something like model_to_dict(obj) that resolves a > bunch of stu

readable object

2007-12-12 Thread Milan Andric
Is there an easy way to print an object in html? Basically with display names and manytomany relationships resolved. (just for viewing) I was thinking to write something like model_to_dict(obj) that resolves a bunch of stuff and makes it more readable. But returns a big html string similar to

Tableless models?

2007-12-12 Thread Nathan Fiedler
This topic has come up once or twice before, but it doesn't seem like a solution exists. Basically I'm looking for a recommended pattern for creating Django models that have no association with a database (i.e. "tableless"). Curiously, ticket #419 has to do with enabling tableless models, but it

Re: multiplehiddeninput assigning to list

2007-12-12 Thread Milan Andric
Nevermind this one.. I just switched when I assign my request.session['foo'] value to the GET instead of the POST, seems to work fine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

2GB Free Online Storage !

2007-12-12 Thread marko osman
Diino enables you to Store, Share, Access & Protect your important files. Free online photo Album, Free online auto-matic Back-up, Free Access your MP3 music online, 2 GB For Free! That's right, we are happy to give you a whopping great 2GB of secure online storage where you can manage and share

Re: Model advice, i18n and content

2007-12-12 Thread yml
Hello Remco, A subset of what you are looking for is provided by this library: * http://code.google.com/p/django-multilingual/ I found it very easy to work with hand I was able to modify flatpage (since this was what I was looking) in a very small amount of time. What it will bring to you :

Re: Database

2007-12-12 Thread shaleh
>On Tue Dec 11 17:57 , Goldy <[EMAIL PROTECTED]> wrote: > My Django database was created using sqlite3 and therefore produced a file > called mydb.py. I was wondering if this file could be connected to and > examined interactively by sqlite3 as if i had inserted the tables myself? a very easy w

Re: Trying to reuse models and forms

2007-12-12 Thread Kirk Strauser
On Wednesday 12 December 2007, l5x wrote: > form_for_instance? Check: > http://www.djangoproject.com/documentation/newforms/#generating-forms-for >-models That's only in the SVN version, but if we have to move from .96 to SVN to get it then so be it. -- Kirk Strauser signature.asc Description:

multiplehiddeninput assigning to list

2007-12-12 Thread Milan Andric
Hello, I ran into a problem recently (after updating to latest svn) where I'm assigning a list to a widgets.MultipleHiddenInput field but the list is rendered as a string in the html form. How do I assign a list to a multipleinput form field so it's rendered appropriately? The problem is exhib

Re: Trying to reuse models and forms

2007-12-12 Thread l5x
form_for_instance? Check: http://www.djangoproject.com/documentation/newforms/#generating-forms-for-models --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Model advice, i18n and content

2007-12-12 Thread Rajesh Dhawan
Hi Remco, ... > Now, the question. I see two obvious way to model this. Say my blog has an > 'Article' model. > > Then: > > - Either two different versions are separate Articles, the article has a > language code, and it has optional fields 'this_article_in_dutch' and > 'this_article_in_english',

Trying to reuse models and forms

2007-12-12 Thread Kirk Strauser
I have a user profile model that gets accessed from the admin section of my site: class UserProfile(models.Model): MARKETS = [('B', 'Both'), ('D', 'Domestic'), ('I', 'International')] market = models.CharField(maxlength=1, choices=MARKETS, core=True) When v

Re: Accessing Multiple Databases

2007-12-12 Thread Derek Steinkamp
Thanks for the link, it is very helpful. I see the last attachments are the docs committed by you -- I'll be giving those a read here shortly. As an aside, I think it is a real showstopper to not include this feature in the main trunk... I can't believe the triage stage on the feature request

Re: How to set ForeignKey with generic create view?

2007-12-12 Thread Kellen
In your input form you need to pass the blog object id. You should rather look into using the contrib.comments app rather than reinventing the comments system. Kellen On Dec 10, 8:01 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > I have this model: > > class BlogComment(Model): >

Re: How to set ForeignKey with generic create view?

2007-12-12 Thread Florian Lindner
Am 10.12.2007 um 20:01 schrieb Florian Lindner: > > Hello, > I have this model: > > class BlogComment(Model): >blogEntry = ForeignKey(BlogEntry, edit_inline=STACKED, > num_in_admin=1) >author = CharField(max_length=100, core=True) >authorMail = EmailField(blank=True) >content = T

Re: about tagging app and tags cloud

2007-12-12 Thread Lic. José M. Rodriguez Bacallao
ok, it fix the problem of the font_size attr but the distribution of values is too spaced. For example, if I got two tags: politics, linux. the count for those tags are: politics: 6 linux: 4 when it generate the font_size attr, for "politics" the size is 6 and for "linux" the size is 0. It can't b

Re: Extra_context question

2007-12-12 Thread bjornkri
Ignore that question! That was a bit stupid, the Notes are passed with the pages as page.note_set.all()... or something to that effect. On Dec 12, 12:34 pm, bjornkri <[EMAIL PROTECTED]> wrote: > I've a feeling I'm going about this completely wrong... > > So I have a model called Page, and each P

Model advice, i18n and content

2007-12-12 Thread Remco Gerlich
Hi, Let's say I want to create yet another blog app, and I want to write articles in multiple languages - English and Dutch, in this case. Some articles will be English-only, some will be Dutch-only. Many articles will be available in both languages. People browsing in one language should see in

Re: File upload on external server

2007-12-12 Thread Jarek Zgoda
Julien napisał(a): > My Django project is served my a certain hosting company, and all the > static data (videos, images, etc.) is served by an external server in > another hosting company. The static data is access through an A ip > redirection for static.mydomain.com > > I'd like to allow user

Re: File upload on external server

2007-12-12 Thread David Reynolds
On 12 Dec 2007, at 11:55 am, Julien wrote: > My Django project is served my a certain hosting company, and all the > static data (videos, images, etc.) is served by an external server in > another hosting company. The static data is access through an A ip > redirection for static.mydomain.com >

File upload on external server

2007-12-12 Thread Julien
Hi there, My Django project is served my a certain hosting company, and all the static data (videos, images, etc.) is served by an external server in another hosting company. The static data is access through an A ip redirection for static.mydomain.com I'd like to allow users of the website to u

Extra_context question

2007-12-12 Thread bjornkri
I've a feeling I'm going about this completely wrong... So I have a model called Page, and each Page can have a number of Notes. Now, I'm displaying the pages with a generic view, and I thought I'd pass the Notes along as extra_context. It looks somewhat like this: (r'^pages/(?P\d+)/$', 'dj

Stuck implementing editable ordered lists

2007-12-12 Thread toomim
Hi, I'm having trouble. My model has publications and authors, and the order of authors matters and should be specified by users of the admin interface. To implement the ordered list, I made an intermediary model called "PubAuthor", where the user has to enter a number for each author to specify t

Re: Performance of a django website

2007-12-12 Thread Nic
"Karen Tracey" <[EMAIL PROTECTED]> writes: > On Dec 11, 2007 1:49 PM, Richard Coleman <[EMAIL PROTECTED]> wrote: > >> 1. Static content and dynamic are on the same server (that will change >> on production). But they are on different apache virtual. Mod_python >> is turned off for the static st

Re: docs for the new ModelForm() class

2007-12-12 Thread annacoder
For me, I 'happened' to see the modelforms doc page, and I love using it. I wish it were more prominently displayed. On Dec 12, 12:35 am, John M <[EMAIL PROTECTED]> wrote: > No, I don't need anything added, I'm just slow and didn't see the link > at the end of the newforms doc, dh. > > Thank

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-12 Thread eXt
VMWare is a very good suggestion. Another option is to use VirtualBox which is also free. On 11 Gru, 19:22, Joe <[EMAIL PROTECTED]> wrote: > To make things easy, you could download VMware Server - run that on > your windows box and install the prebuilt appliances. That'd make it > easy to try out

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-12 Thread Andreas Pfrengle
VMware seems to be a good idea - but I'll probably install win2k again from Ubuntu as main system ;-) My win-machine has gotten so bloated and slow that it is anyways time for a new installation. That's the reason why I wanted a new system at all. Arch also looks lean and fast, but the docs for U

Re: Catching 413 response

2007-12-12 Thread Jarek Zgoda
Jeremy Dunck napisał(a): > I think you want tramline. > Or you want ticket #2070 > > Sorry you've received no helpful response in the meantime. > > On Dec 7, 2007 8:58 AM, Jarek Zgoda <[EMAIL PROTECTED]> wrote: >> Did anybody manage to catch in Django 413 response (request entity too >> large),

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-12 Thread Ben Ford
I third it... except for the fact that this is a newby asking. Given that fact I'd have to say (k)ubuntu. Personally I love Arch!! Ben On 12/12/2007, Aspersieman <[EMAIL PROTECTED]> wrote: > > > Lic. José M. Rodriguez Bacallao wrote: > > I will recommend Arch, is simple and powerful. > > > > On De