Re: Why is my Django template not displaying?

2016-06-03 Thread Luis Zárate
Use plays as a list in form. You are passing context_list as context object so all variable inside context_list are available in template but not context_list. Other option is return render(request,'live.html', {"context_list": context_list}) El viernes, 3 de junio de 2016, Dave N escribió: >

Re: Why is my Django template not displaying?

2016-06-03 Thread Dave N
That absolutely did it James - I thought I was accessing the instance, but what I needed was to access the template context contents of the instance. Also, great tip with the django debug toolbar - I've had it installed, but didn't know how much it actually shows! On Friday, June 3, 2016 at 8:5

Re: Why is my Django template not displaying?

2016-06-03 Thread James Schneider
On Jun 3, 2016 8:58 AM, "Dave N" wrote: > > Assuming my model contains data, I have myapp/views.py: > > from django.template import RequestContext > from django.shortcuts import render > from .models import History > import datetime > > def live_view(request): > context = RequestContext(reques

Why is my Django template not displaying?

2016-06-03 Thread Dave N
Assuming my model contains data, I have myapp/views.py: from django.template import RequestContextfrom django.shortcuts import renderfrom .models import Historyimport datetime def live_view(request): context = RequestContext(request) plays_list = History.objects.filter(date=datetime.date(

Re: Django template not displaying

2015-03-12 Thread john
OK the view.py functions are the way Django responds to a browser request. IOW the browser asks for a page to display and Django checks the URL (in the urls.py). In the urls.py you have to have an entry something like url(r'signup/$', 'signup.views.home', name ='signup') and then Django excute

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
from 'My templates just wouldn't load or show' , i mean that my base.html loads perfectly but signup.html doesn't show up. On Friday, March 13, 2015 at 12:20:26 AM UTC+5:30, sourav mohanty wrote: > > i have revised the views.py : > > from django.shortcuts import render, render_to_response, Reque

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
I thank you for your reply and time.. But please help me.. On Thursday, March 12, 2015 at 6:50:23 PM UTC+5:30, John Fabiani wrote: > > You have two 'home' functions in views.py. > You have an indent on the first line of the urls.py (could be the paste) > You did not provide the forms.py > > Johnf

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
i have revised the views.py : from django.shortcuts import render, render_to_response, RequestContext # from .forms import SignUpForm # Create your views here. from django.template import Context, Template def home(request): # form = SignUpForm(request.POST or None) # if form.is_valid(

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
i have changed the views.py: from django.shortcuts import render, render_to_response, RequestContext # from .forms import SignUpForm # Create your views here. from django.template import Context, Template def home(request): # form = SignUpForm(request.POST or None) # if form.is_valid()

Re: Django template not displaying

2015-03-12 Thread James Schneider
You also have two different URL's named 'home', which will lead to a bad time. Make sure that those are unique. >From what I can tell, none of your views render/reference 'signup.html', so I would never expect that template to be rendered. Configure a fields attribute on your form to get rid of t

Re: Django template not displaying

2015-03-12 Thread john
You have two 'home' functions in views.py. You have an indent on the first line of the urls.py (could be the paste) You did not provide the forms.py Johnf On 03/12/2015 01:31 AM, sourav mohanty wrote: I dont know why but i'm facing a strange problem.. My templates just wouldn't load or show. c

Django template not displaying

2015-03-12 Thread sourav mohanty
I dont know why but i'm facing a strange problem.. My templates just wouldn't load or show. can you please help me out. I'm using Django version 1.7 It shows the following warning as well in the cmd : C:\Users\Om Computers\PyDisco\venv\ddisco\signups\forms.py:5: RemovedInDjango18W arning: Cr

Re: Template not displaying validation errors [solved]

2010-05-05 Thread mhulse
Hi Karen! Thanks so much for your quick reply, I really appreciate it. :) > form.is_valid() is what annotates the existing form with error information > in the case where there are errrors. However, if form.is_valid() returns > False, the code here immediately overwrites the existing (now annotate

Re: Template not displaying validation errors

2010-05-05 Thread Karen Tracey
On Wed, May 5, 2010 at 6:04 PM, mhulse wrote: >if form.is_valid(): # All validation rules pass. > ># Q objects/pagination here... > >else: > >form = SearchForm() > form.is_valid() is what annotates the existing form

Template not displaying validation errors

2010-05-05 Thread mhulse
Hi, I have spent half the day googling and testing my code with no luck getting an error message to appear via my template. I am hoping ya'll could provide a little assistance. :) forms.py: class SearchForm(forms.Form): q = forms.CharField( max_length = 128,

Template not displaying

2009-11-10 Thread Denis Bahati
Hi all, am using xampp as webserver with django 1.1,when i access the browser the template does not work. The media is in c:/xampp/htdocs/adc/media/ where i put the css,img and js folders. I set admin_media_prefix='http:/127.0.0.1/adc/media/' the same to media_url. The template is at c:/xampp/htdo

Re: Template Not Displaying INPUT FIELD

2007-01-29 Thread johnny
Thank you. It worked. john On Jan 29, 2:58 pm, "Collin Grady" <[EMAIL PROTECTED]> wrote: > DateTimeFields have two inputs, not one. You need to use > {{ form.start_at_date }} and {{ form.start_at_time }} > > In addition, you cannot use the date or time filters on a form field. > > On Jan 28, 3:

Re: Template Not Displaying INPUT FIELD

2007-01-29 Thread Collin Grady
DateTimeFields have two inputs, not one. You need to use {{ form.start_at_date }} and {{ form.start_at_time }} In addition, you cannot use the date or time filters on a form field. On Jan 28, 3:16 pm, "johnny" <[EMAIL PROTECTED]> wrote: > In my template, I am not getting a input field for start

Template Not Displaying INPUT FIELD

2007-01-28 Thread johnny
In my template, I am not getting a input field for start_at. In my MySQL, I have the following: --+---+--+-+- ++ Field| Type | Null | Key | Default | Extra | --+---+--+

Re: datetime in template not displaying

2006-11-13 Thread [EMAIL PROTECTED]
actually, I came across this link that did the trick... http://groups.google.com/group/django-users/browse_thread/thread/b958a059b6dca44e/67cc4c2f05719a65?lnk=gst&q=datetimeshortcuts&rnum=6#67cc4c2f05719a65 thanks! --~--~-~--~~~---~--~~ You received this mess

Re: datetime in template not displaying

2006-11-13 Thread [EMAIL PROTECTED]
Thank you for the reponse. I tried that before, but I continue to get an error message... DateTimeShortcuts.calendars[num].drawCurrent is not a function I have this at the top of my code. and this in the middle of the web page. Today's Date: {{ form.todayDate_date}} {{ f

Re: datetime in template not displaying

2006-11-13 Thread Guillermo Fernandez Castellanos
Check this: http://www.djangoproject.com/documentation/forms/#c1576 I had the same error a few weeks ago :-) Hope it helps, G On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi! > > I have "models.DateTimeField defined in my model as "date_today". > > date_today

datetime in template not displaying

2006-11-13 Thread [EMAIL PROTECTED]
Hi! I have "models.DateTimeField defined in my model as "date_today". date_today = models.DateTimeField('todays date') On my form submission template page, i have... Today's Date: {{ form.date_today }} Whenever I try to load this page, it never displays a field,