Understanding FloatFields

2006-04-13 Thread DavidA

I'm a little confused about FloatFields and I was hoping someone could
shed some light. They seem to be represented in the DB as 'numeric' but
exist in Python as strings:

class FundCapital(models.Model):
fund = models.ForeignKey(Fund)
date = models.DateField()
capital = models.FloatField(max_digits=14, decimal_places=2)

C:\Dev\Source\Web\plainfield>manage.py sql data
BEGIN;
CREATE TABLE `data_fundcapital` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`fund_id` integer NOT NULL REFERENCES `data_fund` (`id`),
`date` date NOT NULL,
`capital` numeric(14, 2) NOT NULL
);
COMMIT;

>>> from plainfield.data.models import FundCapital
>>> fc = FundCapital.objects.all()[0]
>>> fc.date
>>> fc.capital
'16200.00'
>>> type(fc.capital)

>>> fc.capital = 1000
>>> fc.capital
1000
>>> fc.save()
>>> fc = FundCapital.objects.all()[0]
>>> fc.capital
'1000.00'
>>> float(fc.capital)
1000.0

I ran into problems in my __repr__ method where I was trying to format
the field using %f which doesn't work.

Is a string used so it can represent the actual precision? I saw an old
posting referring to use of Decimal for FloatFields but I don't see
that in the code, the docs, or my example.

Is the convention to just use float() or Decimal()
whenever I need to use it as a number?

Thanks,
-Dave


--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread James Bennett

On 4/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> You have good friends, they are giving you great advice.  Rails is in
> it's second production release, has a huge following, and a number of
> books to help document it.  Django is still in a major development
> phase and is geared towards early adopters and framework developers at
> the moment.

Don't tell that to Scripps or to any of the other large, conservative
companies that are quietly deploying Django ;)

Seriously, though, I think this is a misconception. Rails has reached
a *public* 1.0, yes, but it was running in production environments
long before anyone outside of 37Signals knew about it. Similarly,
though Django hasn't reached a public 1.0 yet, it was running in
production environments long before anyone outside the newspaper
industry knew about it. What Django's going through right now is a
period of expansion and refinement, as people who are finally getting
a look at it come in with lots of smart ideas to make it even better.

>  Many developers have opted to start there new projects
> with the newest unstable development branch ("Magic Removal"/.92) so
> they can reduce the pain of a .91 migration.  This is fine, but you
> need to be prepared to change with it.  I would recommend doing the
> Django tutorial, but would really think long and hard about starting a
> new project with it until .92 or later is released.

I'm not sure what we need to be "prepared to change with"; all the
major changes which will be made are and have been documented for
quite some time. Anyone starting out on magic-removal should know by
now exactly what to expect.

> This is nice if you are not used to dealing with SQL directly, but
> really isn't that advantageous if you are already using SQL on a
> regular basis.  In fact, it does present some issues with an evolving
> schema.  However many of those issues are being addressed with new
> tools like syncdb in the mysterious .92 release.

'manage.py syncdb' in magic-removal has nothing to do with evolving
database schemas.

> Ajax is a large pill to swallow, and Django is way behind Rails at the
> moment in that department.

That depends on your philosophy with respect to how AJAX should be used.


--
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread [EMAIL PROTECTED]

Glenn Tenney wrote:
> Several friends have been pushing me to look at Rails, so I've been reading
> through "Agile Web Development with Rails".

You have good friends, they are giving you great advice.  Rails is in
it's second production release, has a huge following, and a number of
books to help document it.  Django is still in a major development
phase and is geared towards early adopters and framework developers at
the moment.  Many developers have opted to start there new projects
with the newest unstable development branch ("Magic Removal"/.92) so
they can reduce the pain of a .91 migration.  This is fine, but you
need to be prepared to change with it.  I would recommend doing the
Django tutorial, but would really think long and hard about starting a
new project with it until .92 or later is released.

> Some quick thoughts... with a couple of questions thrown in...
>
> 1. Ok, there IS the Ruby vs Python thing... I'll leave that to some
> *other* place for THAT flame fest as I do NOT want that here!

They are both good tools.  You could fight back and forth but why :)

> 2. In Rails you need to declare your SQL code *and* tell Rails about
> your schema, but in Django it's all very nicely put into an object
> oriented description in your model.  A big win, to me, for Django.

This is nice if you are not used to dealing with SQL directly, but
really isn't that advantageous if you are already using SQL on a
regular basis.  In fact, it does present some issues with an evolving
schema.  However many of those issues are being addressed with new
tools like syncdb in the mysterious .92 release.

> 3. Rails supports and integrates well with Ajax.  I know that this is
> "coming" for Django... sometime "real soon now"... how's it going?
> When might it be out?

Ajax is a large pill to swallow, and Django is way behind Rails at the
moment in that department.

> 4. Rails has built-in unit and functional testing support.  I don't
> know, but I'd venture a guess that few Rails apps actually USE the
> built-in testing capabilities, but it *IS* very nice... Is there
> anything like that planned for Django?
>
> 5. Rails has a book or two already out there -- and already out of
> sync with the version of Rails recently released.  Django's book is
> "in the pipeline" but I doubt it'll be out until 0.92 gets released.

There is only one Rails book that is in print at the moment(non pdf).
There are several others that are going to be released very soon
though.  It would be impossible to publish a meaningful book about
Django until .92 or > is out.  There are MAJOR changes in .92, you
should read this: http://code.djangoproject.com/wiki/RemovingTheMagic
if you haven't already.

> Any other major differences that I missed?

There are a number of differences, but you really need to test drive
both to get a better handle on them. 

--Nick


--~--~-~--~~~---~--~~
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: possible to filter ManyToMany results?

2006-04-13 Thread nkeric

Ivan Sagalaev wrote:
> nkeric wrote:
>
> >hello, could anybody pls help? I don't want to write dirty sql if I
> >could do it via django ORM...
> >
> >
> Well... The only thing I could work out is this:
>
> articles = [a for a in g.get_article_list() if a.article_type_id == 1]

Ivan, thanks a lot for your reply :)
well, I guess I have to take the "dirty" sql approach :p

Regards,

- Eric


--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread ZebZiggle

How about "Reinhardt"?

Django's last name.

-Z


--~--~-~--~~~---~--~~
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: Importing external modules/classes

2006-04-13 Thread arthur debert

Hi Cary.

that depends if you're using magic-removal or trunk. On the m-r branch
there are no "magic" modules, whatever is on your path can be imported
as usual.

if you're using trunk, you must import inside your models methods, or
user module_constants (
http://www.djangoproject.com/documentation/model_api/#meta-options )

see also this thread:
http://groups.google.com/group/django-users/browse_frm/thread/c3c4a1ff076ae357/a6a38c1e23f52ff6?q=imports+magic=1#a6a38c1e23f52ff6


--~--~-~--~~~---~--~~
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: Importing external modules/classes

2006-04-13 Thread Joseph Kocherhans

On 4/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've developed a library of code in python that I reuse across multiple
> projects, and I wanted to be able to use some of these classes/modules
> with Django but I've had some problems. I have defined the PYTHONPATH
> env variable (in my .bash_profile on OS X and Linux), but Django
> doesn't seem to recognize/acknowledge it as far as I can tell. What do
> I need to do to be able to import my own classes not located under the
> current Django project?

A couple of things that might bite you. If you have 2 modules with the
same name on your PYTHONPATH, you won't always get what you expect
(this one always takes me forever to figure out, the module imports
fine but it doesn' have the right classes, etc.) Also, you might want
to try this in python interpreter:

import sys
sys.path

Make sure the proper directory is in the list of paths.

Also, are you running django's builtin server, or running django under apache?

Joseph

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Importing external modules/classes

2006-04-13 Thread [EMAIL PROTECTED]

Hello,

I'm fairly new to Django, so apologize if this question is fairly
basic. (I did search for related topics but didn't find anything that
seemed to answer my exact question.)

I've developed a library of code in python that I reuse across multiple
projects, and I wanted to be able to use some of these classes/modules
with Django but I've had some problems. I have defined the PYTHONPATH
env variable (in my .bash_profile on OS X and Linux), but Django
doesn't seem to recognize/acknowledge it as far as I can tell. What do
I need to do to be able to import my own classes not located under the
current Django project?

Thanks,
Cary

P.S. Django looks really cool, keep up the good work!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django users meetup in Palo Alto on April 27th

2006-04-13 Thread Jacob Kaplan-Moss

Howdy folks --

I'm organizing a Django users meetup in Palo Alto (CA) on April 27th.

If you live in the area and want to meet up with other Djangonauts  
(over free food!), check out the details at http://www.jacobian.org/ 
2006/apr/12/django-meetup-palo-alto/ and let me know to expect you  
there.

I'm hoping to get a chance to meet a bunch of people from the  
community and talk about Django; I hope you can make it.

Jacob

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Chris Moffitt


> DesperateCodeHusbands?  No, wait...that just sounds bad


I like it.  However, it's probably a little limiting for future use.  One
question I have around the name Django.  I noticed on the website that
it's copyrighted so we probably couldn't use it in the name. Is that true?

Also, I like using dj in it.  It kind of goes with the music theme.

DJ Cart, PyDJ, Disco Cart, DJ Jazzy Commerce.  I'm reaching here..

Once we get a reasonable idea for a name, I will volunteer to setup a free
python-hosting.com account to start collating code, documents & ideas.  We
can always change the name later but you never know how these things can
stick.

-Chris

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread Adrian Holovaty

On 4/13/06, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote:
> The one thing I am slightly concerned about is the fact that the MR
> branch is lingering and lingering and diverging beyond simply the
> 'magic removal' goal that was set at first.
>
> How many more changes are expected before a new release or in other
> words: what's the schedule? :)

Look for an announcement on this soon...It's about time to get a
schedule set up.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Jeremy Jones

On Thu, 13 Apr 2006 14:02:26 -0500 (CDT)
"Chris Moffitt" <[EMAIL PROTECTED]> wrote:



> Any brilliant ideas?  DjangoCart,
> DjangoCommerce, DjangoSell, PyCommerce, PyCart,
> HusbandsSupportingWivesShops?
> 

DesperateCodeHusbands?  No, wait...that just sounds bad


- jmj

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Dave St.Germain
For what it's worth, I've written a python module that works with Authorize.net that I could contribute (after properly opensource-itizing...).On 4/13/06, 
arthur debert <[EMAIL PROTECTED]> wrote:
"Setup a free python project on python-hosting.com"+1 on this one. when getting started we better focus on the codingright away, and python hosting's capabilities (svn + trac ) setup with
no fuss will be very helpfull (it seems)." Any brilliant ideas?" not really...djell, djuy , djart

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread arthur debert

"Setup a free python project on python-hosting.com"

+1 on this one. when getting started we better focus on the coding
right away, and python hosting's capabilities (svn + trac ) setup with
no fuss will be very helpfull (it seems).

" Any brilliant ideas?" not really...

djell, djuy , djart


--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread gabor

tonemcd wrote:
> That's a really good screencast - the Java-based frameworks come out
> particularly badly (but the author is looking more at the rapid
> applications development model, where multiple XML configs and
> compiling certainly doesn't help matters)
> 
> I was surprised at how well Zope (Plone actually) comes out of it.

and i have the feeling that well... at the beginning Zope/Plone might 
seem perfect, but there are some shortcomings ...not really 
shortcomings, but different (from django) decisions that the zope 
creators made:

- zodb. they are using an object database, which is a mixed blessing.
- it's great because you can just store objects in it. there's no need 
to think in model-classes (simple classes). you just work with python 
objects, and they get persisted
- on the other hand, zodb is quite a blackbox. with django, your data 
are in a relational database, where a table is a table is a table. there 
are several tools (gui ones and also command-line ones) to access a 
relational db, to back them up, to dump/restore them etc. for zodb there 
aren't that many.

- the management "gui". (where he creates for example that 
python-script). it looks great, and it's great to play around with. but 
after some time problems start to arise:
- your scripts are now in the zodb. so, how do you version-control them?
- how will several developers work on the files?
- how will you migrate the changes from the development-instances to 
the release-servers?
- the usual answer to these questions on the forums is to not store 
your scripts in the zodb (you can also store them on the filesystem), 
and to not to rely on the gui stuff. but then what's the point of the gui?


yes, i had to work for some time with zope, and right now i think i 
enjoy much more the "thin" approach that django chose.

p.s: of course, i'm not bashing zope there. it's a different 
architecture, with different goals. and django's approach suits me 
better. that's all.


gabor

--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread Bill de hÓra

tonemcd wrote:

> I was surprised at how well Zope (Plone actually) comes out of it. I
> guess he was using Archetypes to do the heavy lifting - I've found
> plone to have a *very* steep learning curve.

I think he used ArchGenXML. Archetypes are cool (they're a slightly 
higher abstraction/dsl than Rails or Django db mappings). In an 
alternate universe, where there's time to do these things, I'd port 
Archetypes/CMF onto Django.

cheers
Bill

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Chris Moffitt

> I'm also working on an ecommerce site in Django for selling t-shirts, but
> it
> would be easily expandable to just about anything.  It will interact with
> Paypal's shopping cart system and USPS for shipping.  It's a pretty
> straight
> forward port from my old PHP system, but a lot more fun and easy.
>
> Mine is on m-r, btw.

My site was actually going to have a similar functionality but I was
planning to use Authorize.net for payment processing.  I also wanted to
extend some of the inventory mgmt functionality..  That's probably a
separate discussion.

It does seem like there's some interest in trying to get some sort of 
community around this application for Django.  If that's the case, how do
we want to get it set up?  I think there are 3 options:
- Someone host on an existing site
- Setup a sourceforge project
- Setup a free python project on python-hosting.com

I'm sure there are a couple of other options too.  Which brings us to
deciding how best to proceed.  I don't really care but it would be nice to
start getting something setup.  Anyone want to do it?  If there's not a
better idea (or more willing volunteer ;) I can setup something at
python-hosting.com.  The only outstanding question is the name of the
project.  Any brilliant ideas?  DjangoCart, DjangoCommerce, DjangoSell,
PyCommerce, PyCart, HusbandsSupportingWivesShops?

-Chris

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Clint Ecker
I'm also working on an ecommerce site in Django for selling t-shirts, but it would be easily expandable to just about anything.  It will interact with Paypal's shopping cart system and USPS for shipping.  It's a pretty straight forward port from my old PHP system, but a lot more fun and easy.
Mine is on m-r, btw.On 4/12/06, olive <[EMAIL PROTECTED]> wrote:
I'm currently working on rewriting a store (for my wife too;) I haveoriginaly wrote in OmniMark language (isn't it exotic ?).It is pretty straightforward with Django, I have already achieve theshopping cart management, user registration, shipping (Chronopost,
France), discounts.But the model is far from generic unless you want to sell CDs, DVDs,books, music and dance events and accessories.It is not yet plugable, has not been port to Magic Removal branch (this
is the next step before going on dev).I am wiilling to share my experience and participate to such a project.Olivier.-- ---Clint Ecker[EMAIL PROTECTED]http://phaedo.cx

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread bruno desthuilliers

Jeremy Jones wrote:
> On Thu, 13 Apr 2006 14:21:54 -
> "arthur debert" <[EMAIL PROTECTED]> wrote:
> 
> 
(snip)
>>
> 
> What is it with wives and websites?  Anybody out there (who's a male
> married to a female) not building a website for his wife?  I smell a
> support group forming - Husbands of Work at Home Moms: the
> Django Chapter. :-)  

Too bad :(

I was about to express some interest for this would-be project, but I
have *not* built an e-commerce site for my wife, so I'm afraid I won't
qualify ? Err, wait, I've actually done an online gallery for her, does
that count ?-)

-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread Jeroen Ruigrok van der Werven
On 4/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Depending on demand, we may release a final pre-magic-removal release
> of Django -- maybe 0.91.1 or something. Or maybe it'll be 0.92 and
> magic-removal will be 0.95, to signify it's a big leap. Thoughts?

The one thing I am slightly concerned about is the fact that the MR
branch is lingering and lingering and diverging beyond simply the
'magic removal' goal that was set at first.

How many more changes are expected before a new release or in other
words: what's the schedule? :)

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Jeremy Jones

On Thu, 13 Apr 2006 14:21:54 -
"arthur debert" <[EMAIL PROTECTED]> wrote:

> 
> hi folks...
> am I all for it.
> I've got no experience on e-commerce but there's a few things (I
> guess) I may help with... I guess this would be agreat project...
> 
> I just suppose some "liberal licensing" would be nice (such as BSD or
> the like)...
> 
> cheers
> arthur
> 
> 
> > 

What is it with wives and websites?  Anybody out there (who's a male
married to a female) not building a website for his wife?  I smell a
support group forming - Husbands of Work at Home Moms: the
Django Chapter. :-)  

I originally intended the store I've built for my wife to be released
as open source, so I really tried to keep it generic in its innards.
However, after a slew of feature requests (from her as well as me),
I've broken the genericity of it and pretty much killed its open
source suitability. That being said, I'm planning on creating an
ecommerce framework that would be generic that could have components
plug into it (such as shipping cost calculation, integration with a
payment system, package tracking, etc).  I'm more than willing to throw
my ideas and requirements on a wiki and post code there as we go along
and see how it evolves.  This could be a killer app for Django.

- jmj

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



additional class info on edit_inline

2006-04-13 Thread David S .

Anyone know of a neat way to add class info to the admin interface html for
fieldset that edit_inline generates?  

I actually want to see this inline stuff, but use a class to disable editing it.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[offtopic] question on django naming choices for models relationships

2006-04-13 Thread arthur debert

Ok. This one is more of a "philosophy" question on django naming from
someone who's learning django, webdev and databases at the same time.

If I understand right, one of django's aim at the ORM level is to
abstract the sql level, including naming. This makes a lot of sense,
and when you see :
ManyToMany
OneToOne

you can see that the name of these relationships between models is very
descriptive and non-sqlish. they describe the nature of the
relationship desregarding the underlying implementation (which feels
right).
Now, for the many-to-one relations the name chosen was
ForeignKey

why is that? Isn't ForeignKey very sqlish and little descriptive?
Doesn't it points too much on the implementation?


--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread arthur debert

hi folks...
am I all for it.
I've got no experience on e-commerce but there's a few things (I guess)
I may help with... I guess this would be agreat project...

I just suppose some "liberal licensing" would be nice (such as BSD or
the like)...

cheers
arthur


--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread David S .

Glenn Tenney  think.org> writes:

> 

> 2. In Rails you need to declare your SQL code *and* tell Rails about
> your schema, but in Django it's all very nicely put into an object
> oriented description in your model.  A big win, to me, for Django.

Rails has something called migrations (see
http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations). 


--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread yi huang
I study django with magic-removal svn,because the magic in 0.91 is so ugly, and i'm developing a real-world application, and so far i don't meet any serious problem. I think magic-removal is stable enough to release. and i think everyone should turn to 
0.92(pre-magic-removal).On 4/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
On 4/13/06, David S. <[EMAIL PROTECTED]> wrote:> I am finishing up a project built on 0.91 and I am wondering about the various> patches that have been made to trunk in the meantime.  Since magic-removal will
> be too backwards-incompatible to use in this project, should I be applying> important patches (like http://code.djangoproject.com/ticket/1442), expect a
> 0.91.1, or grab  the last pre-magic-removal version from svn when that exists?Depending on demand, we may release a final pre-magic-removal releaseof Django -- maybe 0.91.1 or something. Or maybe it'll be 
0.92 andmagic-removal will be 0.95, to signify it's a big leap. Thoughts?For your immediate concern, I'd urge you to use Django's trunk.Adrian--Adrian Holovaty
holovaty.com | djangoproject.com-- http://codeplayer.blogbus.com/
--~--~-~--~~~---~--~~
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: Ecommerce & Django

2006-04-13 Thread Chris Moffitt


> fairly trivial to translate the php example to python - i have done
> it in one case, although the processing company said it wouldnt
> work, it worked

I agree.  I've looked at the PHP code for Authorize.NET and it definitely
looks pretty straightforward.  I can't imagine it would take long at all
to get that coded into Python.

The main issue is that it would be nice to start getting some "synergy"
with all these apps in this space.  I don't think I have the talent to
build a grand solution but I can do some of the pieces to help out along
the way.  Maybe we can just start entering some of the code snippets and
modules into the wiki.  If it grows into something more then we can try to
make it a project.

Just my 2 cents.

-Chris

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread David S .

The 0.92/0.95 idea or some variation is good.  Today's trunk is quite competant
and should have it's own label before the significant changes the M-R
development will introduce. 

With more thanks for all the hard work,
David S.


--~--~-~--~~~---~--~~
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: Django vs Rails

2006-04-13 Thread tonemcd

That's a really good screencast - the Java-based frameworks come out
particularly badly (but the author is looking more at the rapid
applications development model, where multiple XML configs and
compiling certainly doesn't help matters)

I was surprised at how well Zope (Plone actually) comes out of it. I
guess he was using Archetypes to do the heavy lifting - I've found
plone to have a *very* steep learning curve.

Django comes out well, with the caveat that Simon mentions re: i18N.

Recommended - it's 37" long though and 300+ megabytes...

Cheers,
Tone


--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread Michael Radziej

David S. schrieb:
> I am finishing up a project built on 0.91 and I am wondering about the various
> patches that have been made to trunk in the meantime.  Since magic-removal 
> will
> be too backwards-incompatible to use in this project, should I be applying
> important patches (like http://code.djangoproject.com/ticket/1442), expect a
> 0.91.1, or grab  the last pre-magic-removal version from svn when that exists?

I can still see important fixes for trunk in the svn, so you're probably 
well off using the svn trunk.

Michael

--~--~-~--~~~---~--~~
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: Model that has more options

2006-04-13 Thread yi huang
maybe you have to write a custom FormFieldOn 4/13/06, beewee <[EMAIL PROTECTED]> wrote:
Hm, if you don't understand me, I'll try to explain it more clearly:I've a blog-like news site where some users can publish news using thedjango admin panel. They can enter thome things, for example subject,
introduction, text etc (and this works finde already). But now I wantthat it is possible to declare an icon for the messages: The usersshould be able either to upload a new image or to enter an url to animage or to choose an image using a combobox.
When submitting django should select the filled field and insert itinto the database.Thank you for your help,Benjamin Wiegand-- http://codeplayer.blogbus.com/
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---



Fate of 0.91 projects

2006-04-13 Thread David S .

I am finishing up a project built on 0.91 and I am wondering about the various
patches that have been made to trunk in the meantime.  Since magic-removal will
be too backwards-incompatible to use in this project, should I be applying
important patches (like http://code.djangoproject.com/ticket/1442), expect a
0.91.1, or grab  the last pre-magic-removal version from svn when that exists?

Thanks for the advice.

Peace, David S.


--~--~-~--~~~---~--~~
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: Model that has more options

2006-04-13 Thread beewee

Hm, if you don't understand me, I'll try to explain it more clearly:
I've a blog-like news site where some users can publish news using the
django admin panel. They can enter thome things, for example subject,
introduction, text etc (and this works finde already). But now I want
that it is possible to declare an icon for the messages: The users
should be able either to upload a new image or to enter an url to an
image or to choose an image using a combobox.
When submitting django should select the filled field and insert it
into the database.

Thank you for your help,

Benjamin Wiegand


--~--~-~--~~~---~--~~
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: check for none

2006-04-13 Thread Tom Tobin
On 4/12/06, Jiri Barton <[EMAIL PROTECTED]> wrote:
>
> how do I check if a variable is None in a template?
>
> I want to be able to discern among None, empty list, and non-empty
> list; then, I want to tell the user - say nothing, "nothing found",
> "found the following:" resp.

This is likely a sign that you're trying to cram too much "programmer"
logic into the template.  :-)  Pass in a search_was_performed variable
or whatnot into the template's context:

{% if search_was_performed %}
{% if search_results %}
{% for item in search_results %}
 ... do stuff ...
{% endfor %}
{% else %}
"No search results were found."
{% endif %}
{% endif %}

--~--~-~--~~~---~--~~
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: web hosting

2006-04-13 Thread PythonistL

I use Dreamhost and it works OK.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---