Re: magick-removal: Suggestion

2006-03-20 Thread Max Battcher

Viktor Kerkez wrote:
> Glenn Tenney wrote:
>> As a friend of mine reminded me, part of your perception feeding that
>> conception is that you're still thinking of these as being columns in
>> a table... when in fact they are classes derived from FormField (and
>> you can derive your own classes from FormField or even from other
>> field types).
> 
> I think you didn't understood me... Classes from django.forms are 
> derived from django.forms.FormField, but classes in 
> django.db.models.fields aren't. They are derived from 
> django.db.models.fields.Field, and they are conceptually different but 
> still haveing the same naming convention *Field...

This is fairly common in various languages that you should always treat 
things in different namespaces (django.forms vs. 
django.db.models.fields), regardless of naming scheme, as being 
conceptually different.  In most cases you should keep in mind that the 
entire namespace is just as much a part of the naming scheme as the 
class name itself.  There's no reason to add verbosity to your class 
names that is already in your namespace name(s).

-- 
--Max Battcher--
http://www.worldmaker.net/
"I'm gonna win, trust in me / I have come to save this world / and in 
the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track)

--~--~-~--~~~---~--~~
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: magick-removal: Suggestion

2006-03-20 Thread Viktor Kerkez

Glenn Tenney wrote:
> As a friend of mine reminded me, part of your perception feeding that
> conception is that you're still thinking of these as being columns in
> a table... when in fact they are classes derived from FormField (and
> you can derive your own classes from FormField or even from other
> field types).

I think you didn't understood me... Classes from django.forms are 
derived from django.forms.FormField, but classes in 
django.db.models.fields aren't. They are derived from 
django.db.models.fields.Field, and they are conceptually different but 
still haveing the same naming convention *Field...

I was just talking about naming convetion. It doesn't metter if they are 
columns in tables or pigeons on trees :) (IntegerColumn... was just a 
dumb suggestion) I was taling about them beeing apples and pears but 
still beeing named same...

Sorry, for continuing closed topic :(

I'll get used to Django... Eventually... :)

--~--~-~--~~~---~--~~
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: magick-removal: Suggestion

2006-03-20 Thread Glenn Tenney

On Mon, Mar 20, 2006 at 08:57:53PM +0100, Viktor Kerkez wrote:
> Ok, I still think that its conceptually wrong to have two completely 
> different sorts of objects shareing the same name... 

As a friend of mine reminded me, part of your perception feeding that
conception is that you're still thinking of these as being columns in
a table... when in fact they are classes derived from FormField (and
you can derive your own classes from FormField or even from other
field types).

So, you need to change your perspective to think of these as being
objects, in an object-oriented sense, that happen to map onto tables
and columns, rather than as columns and tables that happen to map onto
field names.

-- 
Glenn Tenney

--~--~-~--~~~---~--~~
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: magick-removal: Suggestion

2006-03-20 Thread Viktor Kerkez

Ok, I still think that its conceptually wrong to have two completely 
different sorts of objects shareing the same name... But You're the 
bosses ;)

Thanks for the time.



--~--~-~--~~~---~--~~
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: magick-removal: Suggestion

2006-03-20 Thread Adrian Holovaty

On 3/20/06, Viktor Kerkez <[EMAIL PROTECTED]> wrote:
> The suggestion is to rename the classes from django/db/models/fields to,
> for example: IntegerColumn, TextColumn or IntegerCol, CharCol... (thats
> what they really are... columns in tables...)

Hey Viktor,

Thanks for taking the time to make the suggestion. I don't think this
would be a change worth making, though, because it's not worth the
hassle of backwards incompatibility and (as James mentioned) they
don't necessarily map to database columns.

My suggestion for you is to exploit Python's elegant importing system
and do things like "from django.db.models import IntegerField as
IntegerCol" if you're really concerned about the names. You could even
create your own module of renamed field classes and import from there.

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: magick-removal: Suggestion

2006-03-20 Thread James Bennett

On 3/20/06, Viktor Kerkez <[EMAIL PROTECTED]> wrote:
> The suggestion is to rename the classes from django/db/models/fields to,
> for example: IntegerColumn, TextColumn or IntegerCol, CharCol... (thats
> what they really are... columns in tables...)

I'd be against it conceptually, because they don't all map to actual
column types.

--
"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: magick-removal: Suggestion

2006-03-20 Thread Ivan Sagalaev

Viktor Kerkez wrote:

>The suggestion is to rename the classes from django/db/models/fields to, 
>for example: IntegerColumn, TextColumn or IntegerCol, CharCol... (thats 
>what they really are... columns in tables...)
>  
>
I'd rather rename form field classes to *FormField. They are used less 
frequently and there would be less people forced to change their code.

But actually I think that it's not worth it. It's in fact good idea to 
define models and form fields in different places.

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



magick-removal: Suggestion

2006-03-20 Thread Viktor Kerkez

Hi everyone,

Before starting I want to give one Hip Hip Hooray for the m-r branch :)

Now to start ;).

There is one thing that bugs me with the naming convention in Django.

All classes in the django/forms have the same *Field* ending, which is 
100% OK because they really are fields.

But also all classes in the django/db/models/fields have the same 
ending... In fact, they have absolutly same names :-/, which is pritty 
confusing and error prone (especially if you want to write your own 
fields (because of this naming convention you can't even put your 
classes in the same file :-/ ))

The suggestion is to rename the classes from django/db/models/fields to, 
for example: IntegerColumn, TextColumn or IntegerCol, CharCol... (thats 
what they really are... columns in tables...)


Please don't lynch me :), this is just a thought, because of the 
problems I had... (How to name them so I can put them in the same file? 
Whats this?! A forms field or a models field? and so on... )

Thanks for Your time.

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