On Sun, 9 Sep 2007, Xan wrote:
> Well, first of all, thank you for django. I'm not programmer and I
> just wanted to code some web app easier as I can do. I tried rails but
> there is no free documentation (almost all doc are books and books)

I wasn't charged anything before being allowed to access any of these:

http://railsmanual.org/
http://api.rubyonrails.com/
http://wiki.rubyonrails.com/rails/pages/Howtos

> and there is no have easy way for writing models.

`script/generate model foo` seems very easy to me.

> With django I found
> the easier way for doing it.

If you say so.  I find the models in Django to be very lacking compared
to Rails ActiveRecord models.

> Well, secondly I have one question: I have a model A that have a field
> "year" that means the year that A was made. I just want to know if
> it's best (for performance) to code as:
>
> class A(models.Model):
>      year = models.CharField(maxlength=4)
> [...]
>
> or
> class A(models.Model):
>      year = models.PossitiveIntegerField()
> [...]
>
> what it's the best for database performance (I use mysql)

For performance an unsigned smallint beats a varchar(4) any day of the week.


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to