Thank you so much for the clarification!
On Friday, July 13, 2012 5:24:18 PM UTC-4, Jani Tiainen wrote:
>
> You still need to call result.is_valid() since it actually runs actual
> validation rules.
>
> Very basic form processing is usually done like this:
>
> so in case of GET you return empty f
You still need to call result.is_valid() since it actually runs actual
validation rules.
Very basic form processing is usually done like this:
so in case of GET you return empty form. in case of invalid POST you return
form with values and error messages.
After successful POST you do redirect-af
I was able to make it work!
from django.core.context_processors import csrf
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django.shortcuts import render_to_response
from MadTrak.manageabout.models import AboutMadtr
I was able to make it work!
from django.core.context_processors import csrf
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django.shortcuts import render_to_response
from MadTrak.manageabout.models import AboutMadtr
I was able to make it work!
from django.core.context_processors import csrf
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django.shortcuts import render_to_response
from MadTrak.manageabout.models import AboutMadtr
Django makes always (at least currently) full record update (iow: there is
no dirty flag for fields).
Example given is "poor" in the sense that it uses directly POST data. I
strongly would suggest leveraging modelforms when ever possible - it saves
time and nerves. You get all the validation and o
>
> Hey,
>>
>
yeah, it basicly is. Just a very, very basic example (And sorry if i could
highlight this as code, i didnt find something in the format-menu :/ ).
Of course you should validate your input first. And if you just want to
edit a Model within a form, you should check on the ModelForm-C
I guess on Part 4 is what I need...
So hmmm.
def vote(request, poll_id):
p = get_object_or_404(Poll, pk=poll_id)
try:
selected_choice = p.choice_set.get(pk=request.POST['choice'])
except (KeyError, Choice.DoesNotExist):
# Redisplay the poll voting form.
return
That's great and everything except I've done all that already.
I've generated my URLconf, template, and model. Registered the model with
the admin site. Created the table from the model in my postgresql database
and set up the settings file and used syncdb to connect and make sure I
have access
On Jul 10, 2012, at 8:48 PM, JJ Zolper wrote:
> I honestly just have a general question.
>
> If I have one database set in my settings file in settings.py and I try to
> execute a simple HTML Form using 'POST' how do I get that data into my
> PostgreSQL database?
>
> In my view do I have to i
I honestly just have a general question.
If I have one database set in my settings file in settings.py and I try to
execute a simple HTML Form using 'POST' how do I get that data into my
PostgreSQL database?
In my view do I have to interface with my model and thus the model takes
care of the r
11 matches
Mail list logo