You can make one table and have date-time field in it corresponding to the
time when the
row is inserted. Then you can give a query to get for a day, days, month, or
a year.

On Wed, Dec 30, 2009 at 2:08 AM, Saravanan <[email protected]>wrote:

> Here I have an issue, I don't know how to proceed.
> Here what I have in models.py
> I have a base class: for example say class base_class(models.Model)
> In this base class I have definition for a db table, class Meta:
> abstract = True
> I have an manager class : class manager_class(models.Manager)
> In this derived class I coded return reverse functionality
>
> In view,
>       I am deriving a new class view_class(base_class)
>          Here I am setting Class Meta:db_table = my_table.
>
> In this scenario, my_table is dynamic. Its physical structure is same
> however, a new table created for every day.
>  Hence, there will be more than one table with same skeleton for every
> day.
>  When I search for based on date, it should search from corresponding
> date db table.
> It is doing it only for the first request. Successive requests it is
> searching from the same table. (Table name is part build using date
> which user dynamically enters).
> I manipulated the table name with user entered date however it is not
> recognized!!! in the consecutive search.
> When I restart my apache, it fetchs from the request table.
>
> How can I tell this code to search from different table for every
> request. (once again physical structures are
> the same just one table for every day). In one sentence, When I print
> the table name it prints correct table name however actual data is
> fetched from first requested table.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en.


Reply via email to