Django.June: a Django get-together in western Massachusetts USA

2007-05-12 Thread pbx

Hi all,

For those who don't follow the Django community aggregator I thought
I'd send this out to the lists. I'm arranging an informal get-together
of Django folks next month here in Northampton, MA.

 http://open.e-scribe.com/wiki/DjangoDotJune

Here's a condensed version of the info from that page:

Django.June - An informal meeting of Django web framework people
Northampton, Massachusetts, USA - June 16, 2007

Here in Northampton, there's a fun annual music festival called Django
in June. It's all about gypsy jazz -- performances, music clinics, and
jam sessions.

During the festival a small group of Django (web framework) developers
are planning to get together. We'll do it during the day on June 16,
with the evening free for gypsy jazz!

This is an informal event in the "unconference" vein. I'm hoping to
have several short talks and maybe even some collaborative coding. I'm
perfectly happy to have the content be driven by the desires of the
attendees.

Northampton is two hours' drive from Boston, 3.5 hours from New York
City. It's got a great pedestrian-friendly downtown, a vibrant music
scene, art everywhere, five colleges within ten miles, and beautiful
countryside all around. It's a liberal place. It's the kind of town
that's always getting those "best places to live" and "top arts
destination" awards. It might just be the Lawrence, Kansas of
Massachusetts.

--

For more, check out the website. Hope to see some of you there!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



thanks for the BadContent

2006-05-23 Thread pbx

Just wanted to offer my thanks to Adrian (and anybody else who worked
on this) for adding some spam defense to the Trac server. For those of
us who check the timeline often, it's a big relief.

pb
--
Paul Bissex 
http://e-scribe.com/news/ 
Northampton MA USA 01061-0847


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Having problems with inspectdb / introspection

2006-05-17 Thread pbx

> ValueError: year is out of range
>
> I'm not sure why "year is out of range" is a problem - maybe because
> the table has TIMESTAMP column types?

It's probably because you have invalid data (like -00-00) in those
columns. I encountered this on some of my legacy MySQL tables. In my
case I made the column nullable and then did something like this:

  UPDATE table SET col=NULL WHERE col='-00-00';

Also see this ticket for more discussion:

  http://code.djangoproject.com/ticket/443
  
Good luck,

pb
--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Best practice for separating Model and Control?

2006-05-12 Thread pbx

Ned, can you elaborate on what you dislike about combining the field
definitions and the helper functions together in one file?

As a practical matter I find that I need to have the model at hand to
write helper functions, so for that reason alone I've come to
appreciate having them all together, ActiveRecord style.  I may feel
differently after the models themselves have settled down (i.e. when
I'm no longer adding/changing fields weekly).

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: DSN useful for database settings?

2006-05-09 Thread pbx

Here's another way to look at it, given that we are still at 0.91+:
Besides inertia, what are the arguments in favor of the system Django
currently uses? The only person I've seen address this is Jacob, who
correctly noted in the ticket comments that some beginners would find
the separate settings easier to understand.

Imagine if the current situation were reversed -- Django supported DSNs
only, and a ticket were filed to abandon them and change to the
DATABASE_* style. How would that ticket fare?

pb
--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: order by m2m field?

2006-05-06 Thread pbx

> It looks impossible on the SQL side. I thought you coud join tables,
> order by a field in authors table and then get results with DISTINCT to
> eliminate duplication from joining. But it appears that DISTINCT
> requires you to select fields that you order by which ensures that
> duplication would stay.
>
> So the only way I see is to get everything on the client side and sort
> in memory retreiving author list for each entry and making it a
> string... Meaning that it would kill the DB right after first 10 users
> will make their first 10 records.

I've been banging my head against some similar problems recently,
mostly with legacy data that's poorly normalized. One optimization/hack
that was suggested to me was adding a field that's only used for
sorting (or selecting, as the case may be) -- like your hypothetical
concatenated string -- and generating it at creation/update time with a
pre-save hook.

pb
--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: use a dsn for database details in settings.py ?

2006-05-04 Thread pbx

> Hi, I'm still new to django and have googled high and low for a way to
> use a single dsn in the settings file instead of DATABASE_HOST,
> DATABASE_USER, DATABASE_NAME, etc.  No metion of it.  Is there built
> in support for this that I'm missing?
>
> If not, I am happy to submit a patch.

+1. I've wanted to do this for a while. Let me know if you want help
with the patch.

 pb
--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Suggestions wanted for keeping place in admin

2006-05-04 Thread pbx


> I haven't seen any patches that add this functionality. Here are a
> couple of stop-gap solutions:
> * She could bookmark the filtered change-list page and return to it
> after editing the object.
>
> * From the filtered change-list page, she could open the
> object-editing page in a new browser tab/window.
>
> Adrian

OK, thanks. I think I'll suggest the new-tab approach (after I teach
her about tabs!)

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Suggestions wanted for keeping place in admin

2006-05-04 Thread pbx

I have a request from one of my admin users which seems reasonable, but
I don't know how to satisfy it.

She would like to have the admin "remember its place" when she edits
individual records. That is, if she filters by X and Y criteria, then
goes to the second page of results, then edits a single record there,
she would like to *return to that same page in the same set of selected
records* rather than being dumped back to the default view.

A reasonable request from her perspective -- for example, her Filemaker
database (which this system is replacing) does this.

Are there any fixes available for this that I've missed?

thanks

pb

--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ordering by fields in related objects

2006-05-01 Thread pbx

> plugging the FK field into the ordering clause produces an
> OpertationalError, "Unknown table
> 'RELATED_TABLE_THAT_MOST_CERTAINLY_IS_KNOWN' in order clause."

Sorry, I meant to say specifically that this happens when I search in
the admin.

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



ordering by fields in related objects

2006-05-01 Thread pbx

This may be a dumb question but I've been banging my head against it
for a while. Two questions, actually.

(I'm using the M-R branch.)

1) How can I use a field in a related model in a Meta.ordering clause?
E.g. I want my Articles sorted by Reporter.lastname

2) How can I use a computed value in a Meta.ordering clause? E.g. I
want my Reporters sorted by Reporter.number_of_articles_this_week()

BTW, plugging the FK field into the ordering clause produces an
OpertationalError, "Unknown table
'RELATED_TABLE_THAT_MOST_CERTAINLY_IS_KNOWN' in order clause." If the
answer to my above questions is "you can't, sorry," then I hereby
volunteer to at least try making that error message more useful.

Thanks in advance for any advice.

pb
--
http://e-scribe.com/news/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



applying strip() to submitted formfield values, especially numerics

2006-03-30 Thread pbx

I had a frustrated user today whose seemingly valid input into an
IntegerField was getting rejected at the validation step (using my
model's default manipulator). We eventually discovered a stray space at
the end of his input.

Is there a reason that formfield values destined for numeric Django
model fields shouldn't just have whitespace stripped automaticaly?
Seems like it would be a Good Thing, though I'm not sure where the best
place is for it to happen. For the moment I'm considering the following
in my view code:

  new_data = dict([(k, v.strip()) for k, v in request.POST.items()])

(I have no fields where leading or trailing whitespace is significant.)

Any comments? I can't be the first person grappling with this, but I
wasn't able to locate any prior discussion or tickets.

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Overthinking urls.py?

2006-03-28 Thread pbx

I think rolling functionality similar to ABSOLUTE_URL_OVERRIDES into
URLconfs is the way to go. As others have pointed out,
get_absolute_url() doesn't cover enough ground and creates unnecessary
coupling.

Simon expresses it well here:

  http://groups.google.com/group/django-developers/msg/98ee1a543c40e123


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



display_inline=True?

2006-03-27 Thread pbx

When viewing one object in the admin (say, a Landlord) I'd like to be
able to display a list of related objects (say, Properties). The
edit_inline feature is overkill, because the Properties don't need to
be edited in place -- and they have too many fields to fit comfortably
inline anyway.

Basically I'm looking for a way to display a list of related objects
(simple obj.__str__() values, or perhaps a few fields named in a
Meta.inline_display tuple) that could be clicked on for detailed
editing.

(A nice refinement would be a JS checkpoint to make sure people weren't
abandoning changes made to, e.g., the Landlord object.)

Does anything like this exist?

thanks

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Dreamhost - agh!

2006-03-03 Thread pbx

Adrian said:
> I've never used Dreamhost, but I'll just toss in my two cents that
> having a dedicated server, with root access, is well worth it.
> ... it's still kinda-sorta affordable in the grand scheme
> of things if you're serious about making Web apps.

I totally agree. It's great to have root. If a dedicated server is too
spendy there's also the virtual private server (VPS) option -- I've
used Johncompanies.com's FreeBSD VPS service for the past two years,
and it's been great. They offer modest discounts for open source
developers, too.

pb


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---