Re: id IntegrityError with create_update.create_object

2007-04-23 Thread Steve Hershman
Never mind. I had somehow destroyed my DB. I destroyed and remade it and the problem went away. On Apr 24, 12:10 am, Steve Hershman <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a Django noob, but I don't think this question has been asked > before. > > I'm trying to use

Re: audit trail support

2007-04-23 Thread robin_percy
What about doing both? Write a pre_save record indicating the operation about to be attempted. And a post_save indicating the success of the operation, using a unique identifier to identify the pair. Then if the post_save gets out of sync, you have a record of transactions that may be at

PLEASE(!) search before posting "dead link" tickets

2007-04-23 Thread Malcolm Tredinnick
We are getting a lot of Trac tickets reported about dead links in the archived documentation (the docs for 0.96, 0.95), etc. These will be fixed shortly, once one of the people with access to the website has a few minutes to devote to the problem, and it's trivial to work around the problem in

Re: Select widget choices

2007-04-23 Thread Malcolm Tredinnick
On Mon, 2007-04-23 at 17:26 +0100, Christian Markwart Hoeppner wrote: > El lun, 23-04-2007 a las 21:22 +1000, Malcolm Tredinnick escribió: > > On Mon, 2007-04-23 at 12:17 +0100, Christian Markwart Hoeppner wrote: > > > Hi there! > > > > > > When explicitly defining a field to use a Select

Re: Multi-column Index

2007-04-23 Thread Malcolm Tredinnick
On Mon, 2007-04-23 at 19:14 -0700, Patrick Lin wrote: > Hi all, > >I would like to leverage the mysql multiple-column index to speed > up the query performance. I thought the “unique-together” might do > the trick, but it’s not. Do anybody have a model example which could > create

Re: Cannot resolve keyword into field

2007-04-23 Thread Malcolm Tredinnick
On Mon, 2007-04-23 at 16:45 -0400, Jason McVetta wrote: > On 4/21/07, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > TypeError: Cannot resolve keyword 'book' into field > > > This is a long-standing, well-known bug that apparently no one > (including me) knows how to fix. Actually

Re: why there is no something like HttpResponseRedirect but status is 303

2007-04-23 Thread Gilbert Fine
I read the source code a little. I know it is very easy. Because it is too easy (but still not done till now), and I think 303 status should be very common, I suspect that maybe I misunderstand something, or may 303 status is not so suitable in common cases. As the standard says: Many

Re: FileField, ImageField silently fail

2007-04-23 Thread andalucien
More information: this problem only seems to occur if I'm trying to upload the images inline, taking advantage of the edit_inline parameter. I can upload images fine one at a time using the normal form. That's not very user friendly for this app though... -Matt On Apr 24, 12:05 am,

id IntegrityError with create_update.create_object

2007-04-23 Thread Steve Hershman
Hi, I'm a Django noob, but I don't think this question has been asked before. I'm trying to use django.views.generic.create_update.create_object and when the form gets submitted, I get an IntegrityError - null value in column "id" violates not-null constraint. I'm a little confused about how

FileField, ImageField silently fail

2007-04-23 Thread andalucien
Hi, I'm having trouble getting a FileField or ImageField to work. The admin interface successfully validates the field, ensures that it's an image if I use ImageField, etc. It even shows the normal confirmation message upon a successful form submission. However, no record appears in the

Re: n00b to Django - simple Django example crashes :-(

2007-04-23 Thread z0ltan
On Apr 23, 9:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-04-23 at 04:19 +, z0ltan wrote: > > [...] > > > and then navigate to the child directories from thence. > > Apparently it was using "/" as the root directory even though mine was > > a Windows box. So when I

Multi-column Index

2007-04-23 Thread Patrick Lin
Hi all, I would like to leverage the mysql multiple-column index to speed up the query performance. I thought the "unique-together" might do the trick, but it's not. Do anybody have a model example which could create multiple-column index? Thanks for the help! -Patrick

Re: Newforms and Hidden Fields - verifying POST data

2007-04-23 Thread queezy
Wow! Simon, thanks for the very specific code - I was having difficulty with pickle and your sample code brought everything together so perfectly. A big thanks to you! -Warren - Original Message - From: "Simon Willison" <[EMAIL PROTECTED]> To: "Django users"

Re: Implementing OpenID in your Django app

2007-04-23 Thread Jay Parlar
On 4/23/07, Simon Willison <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've just released the first version of an OpenID consumer package for > Django. The idea is to make it ridiculously easy to add OpenID > consumer support to any Django application - and hence allow users of > OpenID to sign in

AGLOCO

2007-04-23 Thread Rashde0958
Ladies and gentlemen, hello URGENT Signup and Promote. A February, 2007 start New Network Business. This business may become standard of Internet such as Google and Yahoo.Participation is free of charge.Let's signup and promote. This note is mainly to offer you a chance to help build AGLOCO ?

Re: Newforms and Hidden Fields - verifying POST data

2007-04-23 Thread Simon Willison
On Apr 23, 5:04 pm, Tipan <[EMAIL PROTECTED]> wrote: > I'm seeking advice on how to ensure my form data in hidden fields is > the same after the user has posted the form. Sign it. The easiest way to do this would be something like this: 1. Throw all of the data you want to persist in a pickle,

Implementing OpenID in your Django app

2007-04-23 Thread Simon Willison
Hi all, I've just released the first version of an OpenID consumer package for Django. The idea is to make it ridiculously easy to add OpenID consumer support to any Django application - and hence allow users of OpenID to sign in without having to set up a new username and password.

Debugging django applications with PyScripter

2007-04-23 Thread PyScripter
PyScripter is a free and open-source Python Integrated Development Environment (IDE). The recently released version 1.8.5 supports the debugging of django applications. You can download this version from http://pyscripter.googlepages.com/ and can read about django debugging at

Re: Newforms and Hidden Fields - verifying POST data

2007-04-23 Thread SmileyChris
On Apr 24, 4:04 am, Tipan <[EMAIL PROTECTED]> wrote: > I'm seeking advice on how to ensure my form data in hidden fields is > the same after the user has posted the form. If it's calculated data (somehow) then why do you need to pass it to the user? Couldn't you just calculate this data and add

Re: cache problem of new forms: make ChoicesField's choices list on fly

2007-04-23 Thread hoamon
thanks for dball's comments. i rewrite myproject/form.py in your way, and user can get the new Choices list. but when they submit to the server. they will get the error message: [Select a valid choice. That choice is not one of the available choices.] so i just move CancelForm from form.py to

Re: ./manage loaddata (fixtures) problem with postgresql

2007-04-23 Thread Russell Keith-Magee
On 4/24/07, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > > Translating the error: postgresql tells me that there is a syntax > error next or at character 1, if I try the erroneous line in the psql > console it works without errors, I think maybe is the lack of a ";" on > a previous

"News Feed" feature

2007-04-23 Thread Henrik Lied
Hi there, What would you say is the best way to implement a "news feed" feature, like the one in Facebook? Right now I have a model (ActivityMonitor) with fields for actions, paths and users. But I feel this method might not be scalable enough. I print the entire action into the database ("User

Re: Using get_FOO_display() in admin classes

2007-04-23 Thread oggie rob
The last I heard, choices only worked for CharFields. Probably it is trying to compare 600.0 with '600.0' and failing, so it resorts to the unmatched "-", or failing to save the value properly in the first place. Docs don't clarify, though - it might have changed recently. If so, your best

Re: audit trail support

2007-04-23 Thread Jason McVetta
On 4/23/07, David Larlet <[EMAIL PROTECTED]> wrote: > > It's a bit ugly to declare instance hidden variables (pre) but we need to > be > sure that the save/delete is effective (post) before logging it. > It's not beautiful, perhaps, but I may end up doing something very similar. However, one

Re: audit trail support

2007-04-23 Thread Jason McVetta
On 4/21/07, Tim Chase <[EMAIL PROTECTED]> wrote: > > Todd Schraml authored a good article in Dr. Dobb's Journal > (http://www.ddj.com/dept/database/184406340) titled _Table > Patterns & Changing Data_ where he discusses five patterns for > keeping historical data, and the requirements that would

Re: Cannot resolve keyword into field

2007-04-23 Thread Jason McVetta
On 4/21/07, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > > TypeError: Cannot resolve keyword 'book' into field This is a long-standing, well-known bug that apparently no one (including me) knows how to fix. Any time one defines a ManyToMany relationship, then calls all() on that

Re: Django and file uploads question

2007-04-23 Thread robin_percy
Craig, Not sure what would be causing your error. But to answer your second question, your files should automatically be uploaded by the FileField. As long as the web server has write access, the files should be uploaded to MEDIA_ROOT/upload_to where upload_to is the argument to your file

Re: audit trail support

2007-04-23 Thread Jason McVetta
On 4/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > In your descriptions below, you remove the ability for a developer to > use manual primary keys, by the sound of it, since one of your special > fields wants to be a single-column primary key. That's not invisible. Does Django

hello

2007-04-23 Thread moguiyingzi
Dear Sir or Madam, We are company mainly operating international trade with good reputation.Our products include mobile phones, TV, Xbox, etc. If you have any questions, please contact us without hesitation. We would like offer further information about our products and company. website:

hello

2007-04-23 Thread moguiyingzi
Dear Sir or Madam, We are company mainly operating international trade with good reputation.Our products include mobile phones, TV, Xbox, etc. If you have any questions, please contact us without hesitation. We would like offer further information about our products and company. website:

Django and file uploads question

2007-04-23 Thread Craig Kuhns
Hey every one. I am pretty new to Python and Django coming over from Ruby on Rails. I am creating an app where different ministries will have profiles on a site and each profile will have a logo or picture associated with it. The site is far from going live but I am working on getting the

Re: cache problem of new forms: make ChoicesField's choices list on fly

2007-04-23 Thread dballanc
Sorry, first post had an error. class CancelForm(forms.Form): name = forms.CharField(label="name", max_length=10) no = forms.CharField(label="personalid", max_length=10) unit = forms.ChoiceField(label="unitname", choices=[]) def __init__(self,*args,**kwargs):

./manage loaddata (fixtures) problem with postgresql

2007-04-23 Thread Michel Thadeu Sabchuk
Hi guys! I'm having troubles to load fixtures data to the database, first of all I try to dump the data: ./manage dumpdata noticias > noticias.json Then I try clear the database for the "noticias" (news) application and try to load the data: ... $ ./manage.py loaddata noticias.json Loading

Re: How-to django and regular CGI?

2007-04-23 Thread mamcxyz
Nevermind. The host only support perl cgi :(. I don't wanna do this in php! If only existed a php with python syntax ;) On 23 abr, 13:44, mamcxyz <[EMAIL PROTECTED]> wrote: > Yes,I know that but is not supported, only regular CGI --~--~-~--~~~---~--~~ You

"mpm-prefork" vs. "mpm-worker"

2007-04-23 Thread [EMAIL PROTECTED]
[english is not my language...] hi, i have a question about using mod_python with django. why you prefer "mpm-prefork" over "mpm-worker"? is there any problems like that php apache module have? django really act like that? is that mean django have some threads problems too? thanx, amirreza

Re: How-to django and regular CGI?

2007-04-23 Thread mamcxyz
Yes,I know that but is not supported, only regular CGI --~--~-~--~~~---~--~~ 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

Re: Redirect middleware

2007-04-23 Thread oggie rob
> > (r'^%s(?P[^?#]*)' % (root_url), 'apps.cms.views.render'), > Note that '?' is a special character, but more importantly your expression probably matches both the initial request and the redirected one. Check it out: >>> r = re.compile('/about/(?P[^?#]*)') >>> r.match('/about/?user1')

Re: Django Schema Migration

2007-04-23 Thread daev
It's very funny but couple of dayes ago I start to write some schema wvolution framework for django. I've read articles in django-code wiki about schema evolution and make some major decisions. I realized that the better way(for me) not to analize application model definition but to analize

Fwd: Ex Miss World >> Lara Dutha

2007-04-23 Thread Kooooool forwords
[image: [First]] [image: [Prev]] [image: [Index]] [image: [Next]]

Re: Preventing saving of objects in admin: how to send message back to the user?

2007-04-23 Thread evenrik
I have a project where I add a message that shows up in the admin interface: user.message_set.create(message="Your message") First you need to get the user using http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser. Hope this helps. Might be better in your case to use the custom

Re: Django performance and logging

2007-04-23 Thread Vinay Sajip
On Apr 8, 2:01 pm, "Deryck Hodge" <[EMAIL PROTECTED]> wrote: > On 4/8/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > I have a logger setup for use at work, and I control it via a > LOG_LEVEL setting in settings.py. I don't have logging statements > throughout my code, only in things like the

Re: How-to django and regular CGI?

2007-04-23 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 mamcxyz schrieb: > A customer need build a quick thing for their website. I wish to use > django but their current hosting only support python with cgi. Is > possible setup the things in this situation ? (Yes, I knwo cgi is more > slow but the site

Re: Redirect middleware

2007-04-23 Thread plungerman
well, here's the thing. for this application, we are using database templates and a CMS system we created to manage content. so basically we have all of our urls in the urls.py file for things like a blog, a portfolio manager, tags, authentication, etc listed first. the last item in the

How-to django and regular CGI?

2007-04-23 Thread mamcxyz
A customer need build a quick thing for their website. I wish to use django but their current hosting only support python with cgi. Is possible setup the things in this situation ? (Yes, I knwo cgi is more slow but the site is low-traffic so...)

Re: Select widget choices

2007-04-23 Thread Christian Markwart Hoeppner
El lun, 23-04-2007 a las 21:22 +1000, Malcolm Tredinnick escribió: > On Mon, 2007-04-23 at 12:17 +0100, Christian Markwart Hoeppner wrote: > > Hi there! > > > > When explicitly defining a field to use a Select widget, how do I assign > > choices to the dropdown? > > > > My last attempt: > > age

Re: Cannot resolve keyword into field

2007-04-23 Thread Ned Batchelder
FWIW, I just submitted a patch which makes that error message more helpful by showing the list of valid fields: http://code.djangoproject.com/ticket/4130 --Ned. [EMAIL PROTECTED] wrote: > Can you post the exact code throwing the error, and copy paste your > exact model code related to the

Re: Django Schema Migration

2007-04-23 Thread lcaamano
FYI, this is very similar to the approach we've used since 2001 when doing schema updates of our product, DynaCenter (http:// www.racemi.com). It has nothing to do with Django but the problem domain is the same. Our scripts are called "alter scripts" instead of migrators. We also added

Re: audit trail support

2007-04-23 Thread David Larlet
2007/4/20, Jason McVetta <[EMAIL PROTECTED]>: > I need to add real audit trail and change-notification support to an > existing Django app and to one that is under development. The best way to > do this, it seems to me, is to add audit support to the Django framework > itself. My requirements

Re: Application Developer Job Posting - TBO.com

2007-04-23 Thread [EMAIL PROTECTED]
> Yeah, me too. I found it by going here: > http://jobs.mediageneral.com/jobsearch.asp > and searching for JobID TBO-50 Thanks, Karen. I grabbed the URL that HR sent me, forgetting that the URL only works inside the firewall. (I can imagine what you are thinking - Come work with Scott! He

Re: Newforms edit with custom form

2007-04-23 Thread Robert
On 23 Kwi, 11:17, Ryan Kanno <[EMAIL PROTECTED]> wrote: > I've been playing around with newforms (with a custom form) and I was > just wondering if anyone else has run into the same situation and I'm > curious as to what solutions others have come up with. Basically, I > just want to edit an

Re: cache problem of new forms: make ChoicesField's choices list on fly

2007-04-23 Thread Robert
On 23 Kwi, 15:44, hoamon <[EMAIL PROTECTED]> wrote: > Hi there~ > > I have a ChoiceField() of [newforms] in CancelForm, > it's choices list is depending on database table sign2. > my source code is below. > > -- > from django import newforms as forms > class CancelForm(forms.Form): > U_hash =

Re: Application Developer Job Posting - TBO.com

2007-04-23 Thread Karen Tracey
On 4/23/07, Tim Chase <[EMAIL PROTECTED]> wrote: > > I tried going to the link to see if there were location-related > details: > > On Mon, 2007-04-23 at 14:45 +, [EMAIL PROTECTED] wrote: > >> Media General Job Posting Link: > >>

Re: Redirect middleware

2007-04-23 Thread Michael K
On Apr 23, 10:13 am, plungerman <[EMAIL PROTECTED]> wrote: > greetings, > > i am attempting to do a simple redirect using django's redirect > middleware. everything works fine if you want to redirect from one > distinct URI to another, for example, > > /big/ --->http://www.example.com/labowski/

Re: Application Developer Job Posting - TBO.com

2007-04-23 Thread [EMAIL PROTECTED]
> So this is a fairly good advertisement, except for one thing: it doesn't > say where in the world you are! :-) How embarrasing - thanks Malcom! The job is located in Tampa, Florida. We're just shy of downtown: http://maps.google.com/maps?f=q=en=200+south+parker+street,+tampa,+fl

Re: Application Developer Job Posting - TBO.com

2007-04-23 Thread Tim Chase
>> If you like to build data-driven web applications on deadline, TBO.com >> may be the place for you. We are looking for a developer to design, >> build, and maintain key web applications. > > So this is a fairly good advertisement, except for one thing: it doesn't > say where in the world you

Re: import problem

2007-04-23 Thread Michael K
On Apr 22, 4:38 pm, kamil <[EMAIL PROTECTED]> wrote: > Hi. I installed Django on Python 2.5 > and I receive following error on the built in server: > > Exception Type: ImportError > Exception Value:No module named utils.text > Exception Location:

Re: Application Developer Job Posting - TBO.com

2007-04-23 Thread Malcolm Tredinnick
On Mon, 2007-04-23 at 14:45 +, [EMAIL PROTECTED] wrote: > If you like to build data-driven web applications on deadline, TBO.com > may be the place for you. We are looking for a developer to design, > build, and maintain key web applications. So this is a fairly good advertisement, except

Application Developer Job Posting - TBO.com

2007-04-23 Thread [EMAIL PROTECTED]
If you like to build data-driven web applications on deadline, TBO.com may be the place for you. We are looking for a developer to design, build, and maintain key web applications. What would make you great for this job: You know Python. You know Django. You have experience with PostgreSQL.

form_for_model, unique=True

2007-04-23 Thread Dmitry Mukhin
Hi, Should form_for_model respect model's field 'unique=True' constraint? It doesn't now (5061). Or I should attach clean_xxx methods to the form myself? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Redirect middleware

2007-04-23 Thread plungerman
greetings, i am attempting to do a simple redirect using django's redirect middleware. everything works fine if you want to redirect from one distinct URI to another, for example, /big/ ---> http://www.example.com/labowski/ however, if you want to redirect to a child page in terms of the URI

cache problem of new forms: make ChoicesField's choices list on fly

2007-04-23 Thread hoamon
Hi there~ I have a ChoiceField() of [newforms] in CancelForm, it's choices list is depending on database table sign2. my source code is below. -- from django import newforms as forms class CancelForm(forms.Form): U_hash = {} for U in Sign2.objects.all(): U_hash[U.unit.id] =

Using get_FOO_display() in admin classes

2007-04-23 Thread Hancock, David (DHANCOCK)
Django-0.96. I've discovered the get_FOO_display() function that I get for free when I use a "choices=CHOICES" in a model, and I understand how to use it in a template or in the API. But the problem I'm having is that when I save something with a choices attribute, editing that object subsequently

Re: Select widget choices

2007-04-23 Thread Malcolm Tredinnick
On Mon, 2007-04-23 at 12:17 +0100, Christian Markwart Hoeppner wrote: > Hi there! > > When explicitly defining a field to use a Select widget, how do I assign > choices to the dropdown? > > My last attempt: > age = forms.IntegerField(label=_('Age'), widget=widgets.Select, >

Select widget choices

2007-04-23 Thread Christian Markwart Hoeppner
Hi there! When explicitly defining a field to use a Select widget, how do I assign choices to the dropdown? My last attempt: age = forms.IntegerField(label=_('Age'), widget=widgets.Select, choices=range(25,90)) --~--~-~--~~~---~--~~ You received this message

A Semantic Web CMS

2007-04-23 Thread Christoph Pingel
Am 19.04.2007 um 17:56 Uhr schrieb Nicola Larosa: > It looks like they are working mostly on the client side, but > something > tells me that the need for a server side will arise, sooner or > later. It > would be great exploring that side with Django. Interesting discussion. I'm just

Newforms edit with custom form

2007-04-23 Thread Ryan Kanno
I've been playing around with newforms (with a custom form) and I was just wondering if anyone else has run into the same situation and I'm curious as to what solutions others have come up with. Basically, I just want to edit an instance and I've been consistently writing the following piece of