Well... I'm not sure you need to mimic anything.
Let's take an example:
class Friend(models.Model):
name = models.CharField(maxlength=79)
Now suppose I do a function like this:
def names():
for friend in Friend.objects.all():
print friend.name
if '__main__'==__name__:
names()
Well... I will be able to use the database through python, and I will
not need any request nor http mimics.
What I will need, though, is something that sets my variables to the
correct values to use python. But I kind of remember Adrian announcing
in the mailing list a while ago that there's a function that allows to
automagically do this by adding it at the beginning of a program.
Hope it helps,
G
On 10/31/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I think the tricky part is what Guillermo is saying. All views take a
> request object and return a response object. You'd have something that
> would have to mimic HTTP requests and work with HTTP responses. At
> that point it seems like you should just create your MVC pattern-based
> app using an ORM (sqlalchemy?) and tie it to whatever front-end your
> going for. (Just giving examples of what might be attractive in Django
> to have in a non-web app.)
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---