Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Where do I put the code to fetch data not coming from a DB [RSS Feed]

#1 March 27, 2008 12:09:15

Rishabh M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where do I put the code to fetch data not coming from a DB


Hey guys,

I'm starting work on a project and for now, won't be using a db with
it. Instead, I'll be using a library which fetches all the data I need
from a local SVN store. I was wondering where should I access this
library from - the model (models.py) or the view (views.py)?? I don't
know if there are any restrictions built in for this case, but in
either case, I want to be doing things as are expected to be done in
Django. I'm inclined to just put all the code in views.py itself, but
I figured I'd ask what the community felt.

Thanks,

Rishabh

--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#2 March 27, 2008 14:31:24

Michael W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where do I put the code to fetch data not coming from a DB


good question.. I don't honestly know if you can configure django's models
to reference plain-text, or whatever this library-of-data is.

most likely you'll just have to disable database use and write your own
access routines.

On Thu, Mar 27, 2008 at 6:09 AM, Rishabh Manocha <> wrote:

>
> Hey guys,
>
> I'm starting work on a project and for now, won't be using a db with
> it. Instead, I'll be using a library which fetches all the data I need
> from a local SVN store. I was wondering where should I access this
> library from - the model (models.py) or the view (views.py)?? I don't
> know if there are any restrictions built in for this case, but in
> either case, I want to be doing things as are expected to be done in
> Django. I'm inclined to just put all the code in views.py itself, but
> I figured I'd ask what the community felt.
>
> Thanks,
>
> Rishabh
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#3 March 27, 2008 15:03:08

Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where do I put the code to fetch data not coming from a DB


So. If you aren't using a relational db, maybe you don't really want
to be using subclasses of django models to pull your data out of SVN.
My initial thought would be that you should do something like write an
abstract class that has the necessary methods for providing the CRUD
equivalent actions + any SVN specific ones (Revert) in SVN, and then
subclass that in your models.py as you define specific models. This
way you've at least created a bunch of objects that are hopefully
mostly using the same code to access your repo. I'm no expert though
and would love to hear what others think about this.

On Mar 27, 7:09 am, "Rishabh Manocha" <> wrote:
> Hey guys,
>
> I'm starting work on a project and for now, won't be using a db with
> it. Instead, I'll be using a library which fetches all the data I need
> from a local SVN store. I was wondering where should I access this
> library from - the model (models.py) or the view (views.py)?? I don't
> know if there are any restrictions built in for this case, but in
> either case, I want to be doing things as are expected to be done in
> Django. I'm inclined to just put all the code in views.py itself, but
> I figured I'd ask what the community felt.
>
> Thanks,
>
> Rishabh
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

  • Root
  • » Django
  • » Where do I put the code to fetch data not coming from a DB [RSS Feed]

Board footer

Moderator control

Enjoy the 11th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support