Re: How To Create POST data without an actual POST?

2010-06-28 Thread Gabriel Gayan
Maybe trying with ajax?

jquery has some nice functions to deal with ajax post requests.

You can even send files via ajax.

>From the server side, you could return JSON objects and parse them on the
client (for validation).

Cheers

On Mon, Jun 28, 2010 at 4:22 PM, Margie Roginski
wrote:

> I'd like to find a way to let my users submit form data without
> submitting
> it via an actual web form. For example, I have users that would like
> to
> send their data via email, or perhaps provide it in an excel spread
> sheet,
>
> I'm trying to figure out how to do this and still leverage all the
> error
> checking associated with my forms (ie, via is_valid).
>
> I'm thinking that on the server side I could create a form with
> initial data,
> and then instead of rendering that form, I'd like to just convert it
> directly
> to a POST data dict, as if the user submitted the form without making
> any changes. Then I'd take that POST data, add a bit of additinal
> data
> that I've gotten from some other source (ie from email or excel), then
> run
> is_valid(), then do my standard save to my db object.
>
> Can anyone comment on if this seems like a good approach for doing
> this,
> and if so, if there is any django support for turning a form directly
> into a data dict?
>
> Thanks!
> Margie
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Gabriel Gayan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Tutorial problems

2010-06-27 Thread Gabriel Gayan
just rerun the server using


python manage.py runserver


Cheers

On Sun, Jun 27, 2010 at 10:49 AM, zippzom  wrote:

> How does one go about restarting the server?
>
> Thanks in advance!
>
> On Jun 25, 10:37 pm, Michael Schade  wrote:
> > As Gabriel mentioned, make sure you reran the server after making the
> > changes (though if using runserver, it should handle that for you). Also
> > make sure you did not miss this bit in the tutorial:
> >
> > "Wait a minute.  is, utterly, an unhelpful
> representation
> > of this object. Let's fix that by editing the polls model (in the
> > polls/models.py file) and adding a
> > __unicode__()<
> http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db>
> > method
> > to both Poll and Choice:"
> >
> > class Poll(models.Model):
> > # ...
> > def __unicode__(self):
> >     return self.question
> >
> > Sincerely,
> > Michael Schade
> > Spearhead Development LLC
> >
> > On Fri, Jun 25, 2010 at 5:54 PM, Gabriel Gayan  >wrote:
> >
> > > Have you tried re-running the server after saving the changes?
> > > the tutorial worked perfectly for me.
> >
> > > On Fri, Jun 25, 2010 at 1:16 PM, zippzom  wrote:
> >
> > >> So, i'm working through the tutorial, but i'm having a problem with
> > >> the unicode method in the part 1 writing your own apps. I've copied
> > >> the code to the letter, but it still only returns 
> > >> instead . Any ideas why this could be happening?
> >
> > >> Sorry if this is the wrong place to post this.
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Django users" group.
> > >> To post to this group, send email to django-us...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> django-users+unsubscr...@googlegroups.com
> 
> >
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/django-users?hl=en.
> >
> > > --
> > > Gabriel Gayan
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > 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 django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Gabriel Gayan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Tutorial problems

2010-06-25 Thread Gabriel Gayan
Have you tried re-running the server after saving the changes?
the tutorial worked perfectly for me.

On Fri, Jun 25, 2010 at 1:16 PM, zippzom  wrote:

> So, i'm working through the tutorial, but i'm having a problem with
> the unicode method in the part 1 writing your own apps. I've copied
> the code to the letter, but it still only returns 
> instead . Any ideas why this could be happening?
>
> Sorry if this is the wrong place to post this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Gabriel Gayan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.