On Oct 6, 3:40 am, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Oct 6, 5:48 am, KillaBee <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > I have been trying to add date to my template, but for the life of me
> > have not.
>
> > I have a field in the MYSQL db, and In my models class but when I put
> > the text box it doesn't post to the db.  No field does. And the
> > calendar does show anything to debug.
>
> > <h1>{{ poll.question }}</h1>Time Sheet
>
> > {% if error_message %}<p><strong>{{ error_message }}</strong></p>{%
> > endif %}
>
> > <table class="cal_month_calendar">
>
> > <tr>
>
> > {% for day in headers %}
>
> > <th>{{ day|date:"D"|slice:":2" }}</hd>
>
> > {% endfor %}
>
> > </tr>
>
> > {% for week in calendar %}
>
> > <tr>
>
> > {% for day in week %}
>
> > <td{% if not day.in_month %} class="cal_not_in_month"{% endif %}>{% if
> > day.event %}<a href="/calendar/{{ day.day|date:"Y/m" }}/">{{ day.day|
> > date:"j" }}</a>{% else %}{{ day.day|date:"j" }}{% endif %}</td>
>
> > {% endfor %}
>
> > </tr>
>
> > {% endfor %}
>
> > </table>
>
> > <form action="/timesheets/{{ poll.id }}/vote/" method="post">
>
> >   {% for choice in poll.choice_set.all %}
>
> >   <label for="choice{{ forloop.counter }}"></label>
>
> >   Worked
>
> >   <input type="radio" name="choice" value="choice">
>
> >   Fedtime
>
> >   <input name="fedtime" type="text" id="fedtime">
>
> >   <select name="select">
>
> >   </select>
>
> >   <input type="text" name="textfield">
>
> >   <br />
>
> > {% endfor %}
>
> > <input type="submit" value="submit time" />
>
> > </form>
>
> > <p>
>
> >   <label for="choice{{ forloop.counter }}">{{ choice.choice }}</label>
>
> > </p>
>
> There's not *nearly* enough information here to even begin answering
> the question.
>
> Where's your view code? And your models? Please post them somewhere
> like dpaste.com so we can actually read them.
> What date field are you referring to - is it fedtime? Tell us, rather
> than expecting us to guess.
>
> Why aren't you using Django's form handling, rather than defining the
> fields yourself in HTML?
> The way the code is at the moment, you will have multiple input fields
> with exactly the same names - choice and fedtime. Is this really what
> you want?
> --
> DR.

I didn't know about dpaste.com thanks.  I am a newbie and I am getting
to the making new fields part and posting data from forms.

http://dpaste.com/82752/ view.py

http://dpaste.com/82753/ models.py

http://dpaste.com/82755/ detail.html

--~--~---------~--~----~------------~-------~--~----~
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