Skip to main content

All Questions

0 votes
1 answer
3k views

Adding placeholder to form field in Django

So I've seen a number of different ways to do this but none that fit how I'm set up. I would like to add placeholder for the text fields in my form ('user', 'title', 'comment') forms.py class ...
danibarstad's user avatar
0 votes
1 answer
6k views

Placeholder in django form dropdown field

I have a little problem with a dropdown field in django form. I want to add to this field placeholder (or not active first option as placeholder) and some other stuff as no label, class etc. I wrote ...
lukos06's user avatar
  • 312
0 votes
0 answers
438 views

How to use template tag to populate 'placeholder' on django form

I have an update form which updates a 'set' of content - I'd like for the 'set' to render almost exactly as the user expects to see it in the front end. So to render the title of the 'set' I'm trying ...
phil0s0pher's user avatar
0 votes
2 answers
103 views

How to use html form 'placeholder' property with standard view?

I am new to Django and am using Django's user auth package (django.contrib.auth) for user login, password reset, etc. Now, while everything works just fine, on the logon form, I'd like to use the ...
DevKing's user avatar
  • 231
1 vote
1 answer
813 views

"render_placeholder" not showing up in djangoCMS template

I have followed the instructions on the following site in order to render a placeholder field from a model, but I didn't manage. http://docs.django-cms.org/en/release-3.4.x/how_to/placeholders.html ...
user avatar
6 votes
4 answers
19k views

django add placeholder text to form field

In Django I have the below code which is creating a username and password form on an HTML Page: <div class="control-group"> {{ form.username }} </div> <div class="control-group">...
Jaron787's user avatar
  • 560
5 votes
3 answers
3k views

passing many arguments to one placeholder of django cursor (placeholer in IN)

I mean something like this: from django.db import connection cursor=connection.cursor() cursor.execute('SELECT * FROM mytable where id IN (%s)', [params]) Parameters can not be just iterable - it ...
Sławomir Lenart's user avatar
1 vote
2 answers
8k views

How to add a placeholder attribute in Django Form

I am having trouble in adding a placeholder attribute in my forms. I want to add a placeholder that will make my HTML look like: <input type="text" name="sample" placeholder="sample"> Right now ...
acknolodgia's user avatar
5 votes
3 answers
3k views

Form placeholder in django doesn't show properly

Like stated in title, the placeholder attribute in form widgets doesn't show properly. It's random, sometimes it works fine and sometimes i need to refresh the browser for them to show. I need them as ...
Khalil An's user avatar
  • 137
1 vote
1 answer
189 views

Adding a cms plugin to a placeholder from code

I'm trying to add a plugin to a PlaceholderField from code. I have a model (Question) with a few fields, one of them is a PlaceholderField. What I want to do is adding a TextPugin (or any other ...
GavinoGrifoni's user avatar
2 votes
1 answer
2k views

Adding a custom placeholder to django-cms

I'm trying to create a custom placeholder to add an admin-editable section on a website. Django-cms' documentation is really generic about what's to be done to add it. The placeholder lives in a ...
GavinoGrifoni's user avatar
1 vote
0 answers
137 views

Django-CMS throws error on 404 inside apphook

Django-cms throws an error when a 404 occurs inside an apphook: PlaceholderNotFound: "error-code" placeholder not found in an apphook application. Please use a static placeholder instead. 'error-code'...
florian's user avatar
  • 21
0 votes
1 answer
301 views

Get the value from a placeholder to send it in the form django

I was using a default value in the model constitucional_64 = models.CharField(max_length=500, null=True,blank=True,default='negado') The problem is the I need to delete the value from the input ...
GioBot's user avatar
  • 623
1 vote
2 answers
1k views

render cms page within another page

Im trying to render a cms page, within another page using a custom cms plugin. The this is my plugin class: class PageInDiv(CMSPlugin): page_div = models.ForeignKey(Page, verbose_name= "page") ...
Paulo's user avatar
  • 7,372