hey -

I'm new to Django so bear with me and thank you in advance for any
help you can lend.  I can't seem to get my hands around the model/form/
view/template thing.  I LOVE the idea but you have to understand i'm a
MS ASP programmer who is switching over to python.

Now with that being said here is my understanding in a nutshell:

1.  models - show the db table structure which is used by the views.

2.  templates - allow you to separate html and code - at least for the
most part

3.  views  - contain the functions which interact with the models and
templates to perform some sort of interaction.

4.  forms - allow data to be input into the website etc....

I understand the basics but can't for the life of me figure out how to
make it all work together in a land of joy and joyness (ie Charlie the
Unicorn vid)

I'm building a UPS rate lookup service.  I am including my template
and form below.

when i visit the page below, only the input button shows... no other
form elements


[template.html]

{% extends "ups_rates/ups_lookup_base.html" %}
{% load i18n %}

{% block content %}
   <div class="ups_rate_lookup_back"></div>
    <div class="ups_rate_lookup_header">
       <span id="upsheader">{% trans "Estimate UPS Shipping Rates" %}</
span><br />
        <div class="upsqueryblock">
           <form method="post" action=".">
            <table>
                 {{ form.as_table }}
            </table>
             <input type="submit" name="submit" value="Get Estimate*">
            </form>
       </div>
   </div>

  <div class="upsratedata">
       this is a place holder for my rates table
  </div>


   <div class="upsdisclaimerbase"></div>
    <div class="upsdisclaimer">
        {% trans "* UPS rates presented on this page are estimates
only based solely on the provided zip-code and not your full shipping
address.  Your final shipping rates will be displayed on the payment
page when you submit your credit card information." %}
    </div>
    <div class="upscloser"><form><input type=button value="Close
Window" onClick="myPopup()"></form></div>
{% endblock %}



[forms.py]

from django import newforms as forms
class ziplookup(forms.Form):
    zipcode=forms.CharField(max_length=15, required=True,
help_text='Please enter your zipcode')




Is there anyone out there who can take me to Candy Mountain (another
Charlie the Unicorn reference)




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

Reply via email to