We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
How do I get field types to work? So far I cant get the html5 date type to work.
Here is my code:
-- listingform.py --- from django.db import models from django.forms import ModelForm from listings.models import Listing
from django.db import models
from django.forms import ModelForm
from listings.models import Listing
class ListingForm(ModelForm): class Meta: model = Listing fields = ['title', 'description', 'reward', 'contact', 'duration','conditions', 'expires', 'published']
class ListingForm(ModelForm):
class Meta:
model = Listing
fields = ['title', 'description', 'reward', 'contact', 'duration','conditions', 'expires', 'published']
---Models.py--- eg expires = models.DateField('date expires') ...others... but the renderer doesn't seem to be picking up on that?
expires = models.DateField('date expires')
...others...
-- views.py -- def researchers(request): form = ListingForm() return render(request, 'listings/list.html', {'form': form })
def researchers(request):
form = ListingForm()
return render(request, 'listings/list.html', {'form': form })
Please help? Do I need to do more in the html file? currently just `{{ form|bootrap}} Do I need to do more in the form class?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
How do I get field types to work? So far I cant get the html5 date type to work.
Here is my code:
-- listingform.py ---
from django.db import models
from django.forms import ModelForm
from listings.models import Listing
class ListingForm(ModelForm):
class Meta:
model = Listing
fields = ['title', 'description', 'reward', 'contact', 'duration','conditions', 'expires', 'published']
---Models.py---
eg
expires = models.DateField('date expires')
...others...
but the renderer doesn't seem to be picking up on that?
-- views.py --
def researchers(request):
form = ListingForm()
return render(request, 'listings/list.html', {'form': form })
Please help? Do I need to do more in the html file? currently just `{{ form|bootrap}}
Do I need to do more in the form class?
The text was updated successfully, but these errors were encountered: