On 10/27/06, soundseeker <[EMAIL PROTECTED]> wrote:
>
> hi,
Minor note for future reference - this question should have been sent
to Django-Users, not Django-Developers. The developers list is for
discussing changes/modifications to Django itself, not 'how do I do X'
questions.
> assuming there is a former created database:
> 1. is there an easy way to acces database views -> no 'id' columns
When you specify your model, you can put a 'db_table' clause in the
Meta block to indicate to use a different table name; you can also use
a db_column parameter to each field definition to specify a column
name.
For example, the following model definition would describe a table
called my_table, with three columns: 'code' (the primary key),
'firstname' and 'lastname'.
class Person(models.Model):
employee_code = models.CharField(maxlength=10, primary_key=True,
db_column = 'code')
first_name = models.CharField(maxlength=30, db_column='firstname')
last_name = models.CharField(maxlength=30, db_column='last')
class Meta:
db_table = 'my_table'
> 2. how to sort the columns of a table in the web browser?
> I could'n find any handy (step by step) tutorial.
When you extract data, use an 'order_by' filter to pull out data in
the desired order, then render in that order.
Yours,
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---