DateField and TimeField rendered as textfield in Django

2021-12-04 Thread Vishal Pandey
Hi everyone, Whenever we use DateField and TimeField, django renders its html input field type as text. I know it could be changed by customising the attributes in form class, but why is not by default. I am also aware of the fact that date and time are supported by almost all browsers but not d

Django 3.2 AttributeError: 'TextField' object has no attribute 'db_collation'

2021-04-07 Thread Asaduzzaman Sohel
I've an existing project on Django 3.1 and I upgraded my project to Django 3.2. I created an app called payment on my project. But When I make migrations. It trow an error ```AttributeError: 'TextField' object has no attribute 'db_collation'``` ``` from django.db impor

Re: Override value of a TextField class method.

2020-01-07 Thread Fabio da Silva Pedro
OK, thank's for this! Em ter., 7 de jan. de 2020 às 03:03, Mohamed A escreveu: > Hint:.. __init__ is a constructor not any method. > > Le lun. 6 jan. 2020 à 23:02, Fabio da Silva Pedro < > fabio.silvape...@gmail.com> a écrit : > >> Easy. You need to provide attrs as dict to the new object. >>> >

Re: Override value of a TextField class method.

2020-01-06 Thread Mohamed A
Hint:.. __init__ is a constructor not any method. Le lun. 6 jan. 2020 à 23:02, Fabio da Silva Pedro < fabio.silvape...@gmail.com> a écrit : > Easy. You need to provide attrs as dict to the new object. >> >> > Ok, I thought about that too, but I don't know how to do it, I copied the > whole method

Re: Override value of a TextField class method.

2020-01-06 Thread Fabio da Silva Pedro
> > Easy. You need to provide attrs as dict to the new object. > > Ok, I thought about that too, but I don't know how to do it, I copied the whole method and pasted it into my model and tried to access its superclass, but I didn't get it! Maybe I'm doing something wrong yet. Would you have any exa

Re: Override value of a TextField class method.

2020-01-06 Thread Mohamed A
erbose_name='Informações complementares') > > > How i do override a field type *TextField* and change your internal *class > value Textarea*, this is a widget from TextField Class and override this > method below: > > def __init__(self, attrs=None): > # Use slightl

Override value of a TextField class method.

2020-01-06 Thread Fabio da Silva Pedro
Hi everyone! this is an excerpt line from my model observacoes = models.TextField(null=True, blank=True, verbose_name='Informações complementares') How i do override a field type *TextField* and change your internal *class value Textarea*, this is a widget from TextField Class an

Re: TextField

2020-01-06 Thread אורי
Sorry, I didn't see that you already wrote that. אורי u...@speedy.net On Mon, Jan 6, 2020 at 6:43 AM Abu Yusuf wrote: > > No, there is no limit for textfield. But you can do the hack using this: > > from django.core.validators import MaxLengthValidator > class

Re: TextField

2020-01-06 Thread אורי
wrote: > > Django users, > > > > Is there a default max length for TextField which is enforced in the > > database? We are using PostgreSQL and I don't want users (hackers) to > > flood our database with megabytes of meaningless text. > > Uri > > In yo

Re: TextField

2020-01-05 Thread Abu Yusuf
No, there is no limit for textfield. But you can do the hack using this: from django.core.validators import MaxLengthValidator class Comment(models.Model): comment = models.TextField(validators=[MaxLengthValidator(200)]) -- You received this message because you are subscribed to the Google

Re: TextField

2020-01-05 Thread Abu Yusuf
No, there is no limit for textfield. But you can do the hack using this: from django.core.validators import MaxLengthValidator class Comment(models.Model): comment = models.TextField(validators=[MaxLengthValidator(200)]) On Mon, Jan 6, 2020 at 10:11 AM Mike Dewhirst wrote: > On 6/01/2

Re: TextField

2020-01-05 Thread Mike Dewhirst
On 6/01/2020 2:24 pm, אורי wrote: Django users, Is there a default max length for TextField which is enforced in the database? We are using PostgreSQL and I don't want users (hackers) to flood our database with megabytes of meaningless text. Uri In your model create a clean() method.

TextField

2020-01-05 Thread אורי
Django users, Is there a default max length for TextField which is enforced in the database? We are using PostgreSQL and I don't want users (hackers) to flood our database with megabytes of meaningless text. Thanks, Uri. אורי u...@speedy.net -- You received this message because yo

Re: How to get Label alignment to top of TextField in form

2015-09-14 Thread Dmitry Homenok
Hey Mike, Believe, you have to check the following methods of BaseForm class: - as_p - as_table - as_ul There you'll find templates for html output. - Dmitry On Monday, September 14, 2015 at 1:07:45 AM UTC+3, Mike wrote: > > Hi, > I have TextField in model. > story =

How to get Label alignment to top of TextField in form

2015-09-13 Thread joulu tervehdys
Hi, I have TextField in model. story = models.TextField() When it shows up in form label is aligned down beside big Textarea. Label should align top beside Textarea in order to get user see it first. How to implement it so? Thanks for help - be ginner -- You received this message because you

TextField in Oracle: any alternatives?

2015-07-10 Thread Robert Martin
Hi all, I have a question about best practices with storing strings in an Oracle DB. I've grown accustomed to using TextFields wherever possible, as I mainly work in Postgres and this seems to be recommended: http://stackoverflow.com/questions/7354588/django-charfield-vs-textfield Ho

django 1.6 how does the form.as_p decide the textfield rows and and cols?

2014-01-31 Thread 项楠
http://stackoverflow.com/questions/21481229/django-1-6-how-does-the-form-as-p-decide-the-textfield-rows-and-and-cols I have read the form.as_p method source code, still don't know.[image: enter image description here] #models.py class User(AbstractBaseUser): description = models.Text

Re: Inserting image alongwith text in django's TextField

2013-12-23 Thread Vijay Shanker
; http://goromlagche.in/ > > > On Mon, Dec 23, 2013 at 3:11 PM, vijay shanker wrote: > >> Hi >> I am trying to insert images in between of text (basically an article >> with images interspersed in between) with django's TextField so that i can >>

Re: Inserting image alongwith text in django's TextField

2013-12-23 Thread Mrinmoy Das
f text (basically an article with > images interspersed in between) with django's TextField so that i can add > and position the image in the TextField box in admin.I tried tinymce's > tinymce_models.HTMLField() for body field of my Article model but it did > not have any option t

Inserting image alongwith text in django's TextField

2013-12-23 Thread vijay shanker
Hi I am trying to insert images in between of text (basically an article with images interspersed in between) with django's TextField so that i can add and position the image in the TextField box in admin.I tried tinymce's tinymce_models.HTMLField() for body field of my Article model

Re: Retrieving json stored in TextField as json

2013-10-10 Thread Marc Aymerich
On Thu, Oct 10, 2013 at 6:02 PM, Daniel Roseman wrote: > On Thursday, 10 October 2013 10:08:18 UTC+1, Marc Aymerich wrote: >> >> Hi Rafael, thanks ! >> I forgot to mention that I was already using django-jsonfield >> https://github.com/bradjasper/django-jsonfield >> and now I've tried with django-

Re: Retrieving json stored in TextField as json

2013-10-10 Thread Daniel Roseman
On Thursday, 10 October 2013 10:08:18 UTC+1, Marc Aymerich wrote: > Hi Rafael, thanks ! > I forgot to mention that I was already using django-jsonfield > https://github.com/bradjasper/django-jsonfield > and now I've tried with django-json-field but with the same unfortunate > result: > > Time

Re: Retrieving json stored in TextField as json

2013-10-10 Thread Marc Aymerich
Hi Rafael, thanks ! I forgot to mention that I was already using django-jsonfield https://github.com/bradjasper/django-jsonfield and now I've tried with django-json-field but with the same unfortunate result: TimeSerie.objects.filter(type='cpu').values('value') [{'value': '{"scheduled":2,"total":8

Re: Retrieving json stored in TextField as json

2013-10-09 Thread Rafael Durán Castañeda
I'm using django-json-field [1] for solving the same problem. [1] https://github.com/derek-schaefer/django-json-field HTH El 09/10/2013, a las 16:01, Marc Aymerich escribió: > Hi, > I'm storing large volumes of json data in a TextFields, Then I have a > view that converts this text data into JS

Retrieving json stored in TextField as json

2013-10-09 Thread Marc Aymerich
Hi, I'm storing large volumes of json data in a TextFields, Then I have a view that converts this text data into JSON, but this silly operation requires a considerable amount of resources for a large dataset. It would be nice if I'm able to retrieve native JSON directly from the database. As you

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-19 Thread Lauri Savolainen
On Saturday, April 13, 2013 7:54:43 PM UTC+3, Ian wrote: > > On Saturday, April 13, 2013 10:40:10 AM UTC-6, Ian wrote: >> >> On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: >>> >>> Thank you for the reply, >>> >>> The field is defined in the Django model as: >>> location_descr

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Saturday, April 13, 2013 10:40:10 AM UTC-6, Ian wrote: > > On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: >> >> Thank you for the reply, >> >> The field is defined in the Django model as: >> location_description = models.TextField(_('additional route >> information'), blank

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: > > Thank you for the reply, > > The field is defined in the Django model as: > location_description = models.TextField(_('additional route information'), > blank=True) > > Data length for the corresponding column in the database

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-12 Thread Lauri Savolainen
ent__observation_date__gte=2010-01-01 (supposed to show > > all routes that have been observed this decade) it raises an > > DatabaseError: ORA-00932: inconsistent datatypes: expected - got > > NCLOB-exception while using an Oracle database in production. The query > > see

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-10 Thread Jani Tiainen
. According to the general notes on databases the Oracle backend has limitations with TextField-related queries (https://docs.djangoproject.com/en/dev/ref/databases/#textfield-limitations) and this seems to be causing this as far as I can tell. As the queries are created by Django admin I have no id

Oracle database TextField limitations and Django admin interface queries

2013-04-10 Thread Lauri Savolainen
n databases the Oracle backend has limitations with TextField-related queries ( https://docs.djangoproject.com/en/dev/ref/databases/#textfield-limitations) and this seems to be causing this as far as I can tell. As the queries are created by Django admin I have no idea how I should proceed from

ORM Char/TextField substring

2013-03-30 Thread temp4746
Does Django provide a way to only get part of a text string at the ORM level? That means using SQL functions as to only download a substring. As in the substr,left sql functions? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

image browsing from a textfield

2013-01-28 Thread Wim Feijen
Hello, For an e-learning app in development, we want editors to be able to edit html (TextField) within our app (not the admin), and insert formatted text, images and (Vimeo) video in there. At the moment, I am looking into using TinyMCE (django-tinymce) combined with django-filebrowser

Re: How to extend the TextField in Django?

2012-09-20 Thread Scarl
Thanks Lachlan ! 在 2012年9月21日星期五UTC+8上午10时19分44秒,Scarl写道: > > > <https://lh5.googleusercontent.com/-PQC8Rzyq-v0/UFvOkohnABI/ACY/h60EHgp6_nE/s1600/textfield.jpg> > > I want to extend the textfield like this, could anyone help me? thx! > > -- You received t

Re: How to extend the TextField in Django?

2012-09-20 Thread Lachlan Musicman
://www.djangopackages.com/grids/g/wysiwyg/ Cheers L. On Fri, Sep 21, 2012 at 2:19 PM, Scarl wrote: > > <https://lh5.googleusercontent.com/-PQC8Rzyq-v0/UFvOkohnABI/ACY/h60EHgp6_nE/s1600/textfield.jpg> > > I want to extend the textfield like this, could anyone help me?

How to extend the TextField in Django?

2012-09-20 Thread Scarl
<https://lh5.googleusercontent.com/-PQC8Rzyq-v0/UFvOkohnABI/ACY/h60EHgp6_nE/s1600/textfield.jpg> I want to extend the textfield like this, could anyone help me? thx! -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Oracle error when filtering on one2many related TextField (nclob)

2012-07-13 Thread Ian
On Thursday, July 12, 2012 9:27:30 AM UTC-6, The Bear wrote: > > I get this error: > > *** DatabaseError: ORA-06502: PL/SQL: numeric or value error: character > string buffer too small > ORA-06512: at line 1 > > This is a database encoding issue; see: https://code.djangoproject.com/ticket/11580

Oracle error when filtering on one2many related TextField (nclob)

2012-07-12 Thread c.poll...@bangor.ac.uk
Hi All I hope someone can help with a really frustrating problem I'm having. I have the following models class Output(models.Model): title = models.CharField(u'Title', max_length=1024, db_index=True) ingest_time = models.DateTimeField(u'Ingest timestamp' , default=datetime.now())

Re: inspectdb() sees MSSQL varchar([n]) fields as type textfield

2012-06-13 Thread rico_suave
rd to solve it in a script.). I was hoping someone > > has some experience with this and can suggest a simple solution; > > > The database has some varchar([n]) fields, which inspectdb translates into > > textfield types, with no max_length. These fields have defined lengths, s

Re: inspectdb() sees MSSQL varchar([n]) fields as type textfield

2012-06-11 Thread Russell Keith-Magee
t is unable to solve (or at least > it would be relatively hard to solve it in a script.). I was hoping someone > has some experience with this and can suggest a simple solution; > > The database has some varchar([n]) fields, which inspectdb translates into > textfield types, with no m

inspectdb() sees MSSQL varchar([n]) fields as type textfield

2012-06-11 Thread rico_suave
someone has some experience with this and can suggest a simple solution; The database has some varchar([n]) fields, which inspectdb translates into textfield types, with no max_length. These fields have defined lengths, so a charfield with a max_length would be preferable.The strange thing is

Re: Editor de textfield

2011-07-22 Thread Jussiê Vieira Toledo
sorry forgot the rest of the query correcting: js = ('/static/grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js','/ static/grappelli/tinymce_setup/tinymce_setup.js',) On 21 jul, 23:08, Jussiê Vieira Toledo wrote: > Hello everybody! > > I am wanting to use the TinyMCEeditorautomatically in fields

Re: Editor de textfield

2011-07-22 Thread Jussiê Vieira Toledo
sorry forgot the rest of the query correcting: js = ('/static/grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js','/ static/grappelli/tinymce_setup/tinymce_setup.js',) On 21 jul, 23:08, Jussiê Vieira Toledo wrote: > Hello everybody! > > I am wanting to use the TinyMCEeditorautomatically in fields

Editor de textfield

2011-07-22 Thread Jussiê Vieira Toledo
Hello everybody! I am wanting to use the TinyMCE editor automatically in fields of type TextField. To know that it is necessary to add a supplement in the middle class which is the Admin: class Media: js = But where is this middle class physically admin? Not found at all. I'm using Grap

RE: multiline TextField

2011-03-31 Thread Chris Matthews
: Django users Subject: multiline TextField Hi. I write blog application. I want multiline TextField. Sample : paragraph or tab or return thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

multiline TextField

2011-03-30 Thread electrocoder
Hi. I write blog application. I want multiline TextField. Sample : paragraph or tab or return thanks. -- 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 u

Re: Django administration - Allow full HTML for a TextField form

2011-02-19 Thread NewNumOrder
Thanks for the help! -- 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 django-users+unsubscr...@googlegroups.com. For more options,

Re: Django administration - Allow full HTML for a TextField form

2011-02-19 Thread Daniel Roseman
On Saturday, February 19, 2011 3:04:27 PM UTC, NewNumOrder wrote: > > I've tried enabling 'allow_tags' for a TextField, but the admin tools > still encode the text when inserting or updating rows. > > Is the following code correct? > some_field = models.Tex

Django administration - Allow full HTML for a TextField form

2011-02-19 Thread NewNumOrder
I've tried enabling 'allow_tags' for a TextField, but the admin tools still encode the text when inserting or updating rows. Is the following code correct? some_field = models.TextField() some_field.allow_tags = True I can't even edit the HTML with phpPgAdmin because it doe

Re: How to save links in the TextField

2010-05-24 Thread nameless
> On 22 Mag, 20:11, Rolando Espinoza La Fuente > > wrote: > > > On Fri, May 21, 2010 at 6:12 PM, nameless wrote: > > > > > I have a simple Blog model with a TextField. What is the best way to > > > > save links in the TextField ? > > > > > 1)

Re: How to save links in the TextField

2010-05-24 Thread Marcus Carlsson
m 2 textfields for the same information ? > Is this a good approach ? > > > -- > > On 22 Mag, 20:11, Rolando Espinoza La Fuente > wrote: > > On Fri, May 21, 2010 at 6:12 PM, nameless wrote: > > > > > I have a simple Blog model with a TextField. Wh

Re: How to save links in the TextField

2010-05-24 Thread nameless
mmm 2 textfields for the same information ? Is this a good approach ? -- On 22 Mag, 20:11, Rolando Espinoza La Fuente wrote: > On Fri, May 21, 2010 at 6:12 PM, nameless wrote: > > > I have a simple Blog model with a TextField. What is the best way to > > save link

Re: How to save links in the TextField

2010-05-22 Thread Rolando Espinoza La Fuente
On Fri, May 21, 2010 at 6:12 PM, nameless wrote: > > > I have a simple Blog model with a TextField. What is the best way to > save links in the TextField ? > > 1) Saving link in the database in this form: http://www.example.com > and then using some filter in the template t

Re: How to save links in the TextField

2010-05-22 Thread nameless
help please :D On 22 Mag, 00:12, nameless wrote: > I have a simple Blog model with a TextField. What is the best way to > save links in the TextField ? > > 1) Saving link in the database in this form:http://www.example.com > and then using some filter in the template to

How to save links in the TextField

2010-05-21 Thread nameless
I have a simple Blog model with a TextField. What is the best way to save links in the TextField ? 1) Saving link in the database in this form: http://www.example.com and then using some filter in the template to trasform it in form: http://www.example.com>http://www.example.com 2) Sav

Re: character , HTML textfield, sqlite3

2010-03-12 Thread Daniel Roseman
On Mar 12, 2:07 pm, gintare wrote: > If somebody knows how to answer my questions please let me know. It is > very urgent. I did let you know. Django takes care of this sort of thing for you, as long as you don't deliberately cripple it. > I will modify code by advice of Daniel as fast as i have

Re: character , HTML textfield, sqlite3

2010-03-12 Thread gintare
gt; How to save special characters: å , ö, ä... > > > I tried to write them in browsers input field in several ways: > > å , ö, ä... > > \xc3\xa5 ,   \xc3\xa4,  \xc3\xb6 > > > I am using sqlite syntax for saving > > from HTML tetxtarea > > to the sqlite

Re: character , HTML textfield, sqlite3

2010-03-11 Thread Daniel Roseman
area > to the sqlite3 database textfield: >  models.CharField(max_length=500, blank=True, default=''). > >     for i in range(len(Ltitles)): stLtit=stLtit > +smart_unicode(Ltitles[i], encoding='utf-8', strings_only=False, > errors='strict')+' , &

character , HTML textfield, sqlite3

2010-03-11 Thread gintare
Hello, How to save special characters: å , ö, ä... I tried to write them in browsers input field in several ways: å , ö, ä... \xc3\xa5 , \xc3\xa4, \xc3\xb6 I am using sqlite syntax for saving from HTML tetxtarea to the sqlite3 database textfield: models.CharField(max_length=500, blank

entering text+images into a textfield

2010-03-10 Thread HARRY POTTRER
I have a project where I'm taking a bunch of articles originally written for a on a tripod page, and putting them into a database so they can be served up by django. Right now I have it all set up and working, but theres one problem. A lot of these articles are very image heave. Each one has an av

TextField in BaseCommentAbstractModel

2010-02-22 Thread kioopi
Hi, contrib.comments.models.BaseCommentAbstractModel's field object_pk is a TextField to allow for models without integer-ids to be commented. This manifests as a longtext field in the (mysql) DB. This leads to a lot of full-table-scans, which turn out to be a performance problem. So fa

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread Ian Kelly
ith a model and a Textfield) and > the limitation is 1316. > I'll continue to debug but it seems the limitation doesn't mean much. > It is odd... Are you using the same string in each case? Django uses UTF-8 internally, so different character strings of the same length may have

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
Ok if you change the NCLOB to CLOB in the django\db\backends\oracle \creation.py and re-run a clear syncdb it works. Now what are the limitation of CLOB vs NCLOB ? Will it affect other part of the TextField methods ? --~--~-~--~~~---~--~~ You received this message

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
I installed 9i at home and did some more test. With the same application running (and updating the same field) I discovered that the limit is not the same for my database. It is now 1246 Characters. I started a new application (a app with a model and a Textfield) and the limitation is 1316. I&#x

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
> > This sounds like a character set encoding problem.  The first thing I > > would try, if possible, is to 1) recompile cx_Oracle with the > > WITH_UNICODE option enabled and 2) switch to Django trunk (Django 1.1 > > does not support this option).  This allows Django to send unicode > > strings r

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-09-30 Thread alphacc
Hello Ian, > This sounds like a character set encoding problem.  The first thing I > would try, if possible, is to 1) recompile cx_Oracle with the > WITH_UNICODE option enabled and 2) switch to Django trunk (Django 1.1 > does not support this option).  This allows Django to send unicode > strings

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-09-30 Thread Ian Kelly
On Sep 30, 11:35 am, Thomas wrote: > Hello, > > OS : windows > Python : 2.6.2 > > I have an issue with Textfield in django models. > The textfield are created as NCLOB in the Oracle 9i DB. > When I try to save a textfield from the django admin it works fine if > the

Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-09-30 Thread Thomas
Hello, OS : windows Python : 2.6.2 I have an issue with Textfield in django models. The textfield are created as NCLOB in the Oracle 9i DB. When I try to save a textfield from the django admin it works fine if the limit of 1128 character is kept. If I try to insert a bigger text the characters

Re: Advice on Subclassing a TextField

2009-08-30 Thread Mark (Nosrednakram)
I had at one time included the following and ended up putting it back so that syncdb would actually create the columns. Without it the table is created with the column being made. I am assuming this is correct but am not sure. def db_type(self): return TextField().db_type() Thanks

Re: Advice on Subclassing a TextField

2009-08-30 Thread Alex Robbins
Alex (Robbins) On Aug 30, 12:53 am, Mark Anderson wrote: > Hello, > > I wanted a field that would render in a rich text editor and store the data > in a TextField so I created a field type of HtmlField and custom HtmlWidge. > It works but I was wondering is anyone would be willing to g

Re: Advice on Subclassing a TextField

2009-08-29 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 1:53 AM, Mark Anderson wrote: > Hello, > > I wanted a field that would render in a rich text editor and store the data > in a TextField so I created a field type of HtmlField and custom HtmlWidge. > It works but I was wondering is anyone would be wil

Advice on Subclassing a TextField

2009-08-29 Thread Mark Anderson
Hello, I wanted a field that would render in a rich text editor and store the data in a TextField so I created a field type of HtmlField and custom HtmlWidge. It works but I was wondering is anyone would be willing to give me feedback on best practices etc, This is my first attempt at subclassing

Re: Pass template tags through TextField?

2009-07-22 Thread Ogre
Perfect. Thanks, Dan. On Jul 22, 10:23 am, Dan Harris wrote: > That shouldn't be a problem, after all templates are just strings as > are textfields. > > If you have a model with your textfield in it as so: > > class MyModel(models.Model): >    template = models.Text

Re: Pass template tags through TextField?

2009-07-22 Thread Dan Harris
That shouldn't be a problem, after all templates are just strings as are textfields. If you have a model with your textfield in it as so: class MyModel(models.Model): template = models.TextField() and you have a view which renders the template defined in the next field def my_view(re

Pass template tags through TextField?

2009-07-22 Thread Ogre
I have a model where I need to be able to insert template tags into a TextField in the admin as part of the content and then have them rendered properly on the front-end. Can this be done? And if so, can someone recommend a method? I understand the security concerns of opening that field up to

Re: Problems when searching acute or tilde letters in a textfield under tiny_mce.js

2008-12-23 Thread Vizcayno
I want to share the solution to my problem. I appreciate the kindness of Malcolm for the suggestions. After some searching in tinyMCE site, I found a note that recommends to explicitly leave option "entities" to empty, I show you a sample: tinyMCE.init({ // General options

Problems when searching acute or tilde letters in a textfield under tiny_mce.js

2008-12-21 Thread Vizcayno
Hello: Using tiny_mce.js into django Admin (change_form.html) is nice, but when you include into a textField letters such as á or ñ and try to find them using the django search engine, no results are obtained because internally the á is represented by á and ñ is represented by ñ. Is there a way

Re: Problems when searching acute or tilde letters in a textfield under tiny_mce.js

2008-12-21 Thread Malcolm Tredinnick
On Sun, 2008-12-21 at 16:41 -0800, Vizcayno wrote: > Hello: > Using tiny_mce.js into django Admin (change_form.html) is nice, but > when you include into a textField letters such as á or ñ and try to > find them using the django search engine, no results are obtained > because inte

Re: max_length for TextField is not respected

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 11:26 AM, omat <[EMAIL PROTECTED]> wrote: > > Thanks for the reply Karen. > > Accepted but not used? Neither in the model nor in the forms? This is > not how I would expect it to be. Yes, that's the way it is. max_length is specified as a possible keyword argument in dja

Re: max_length for TextField is not respected

2008-10-24 Thread Matías Costa
Any reason? Seems pretty basic and easy to limit TextField length. On code and db level. On Fri, Oct 24, 2008 at 5:09 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I ha

Re: max_length for TextField is not respected

2008-10-24 Thread omat
ECTED]> wrote: > On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have a form class derived from a model using ModelForm. > > > The model has a TextField(max_length=300) field, but length limit is > > not taken into accoun

Re: max_length for TextField is not respected

2008-10-24 Thread Karen Tracey
On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a form class derived from a model using ModelForm. > > The model has a TextField(max_length=300) field, but length limit is > not taken into account and the form passes validation

max_length for TextField is not respected

2008-10-24 Thread omat
Hi, I have a form class derived from a model using ModelForm. The model has a TextField(max_length=300) field, but length limit is not taken into account and the form passes validation when texts > 300 char are submitted. Same when submitting through admin. Is max_length not used for TextFi

Re: How to show up tiny mce in admin textfield

2008-09-03 Thread lingrlongr
.js', > > '/app_media/textareas.js', > > ) > > > On Sep 3, 10:50 am, bin <[EMAIL PROTECTED]> wrote: > > > > Hi all > > > > i wanna embed a richtext field in my admin textfield. > > > today, i try to

Re: How to show up tiny mce in admin textfield

2008-09-03 Thread lingrlongr
the order to: > > > > > js = ( > > > > '/app_media/tiny_mce/tiny_mce.js', > > > > '/app_media/textareas.js', > > > > ) > > > > > On Sep 3, 10:50 am, bin <[EMAIL

Re: How to show up tiny mce in admin textfield

2008-09-03 Thread bin
'/app_media/textareas.js', > > > ) > > > > On Sep 3, 10:50 am, bin <[EMAIL PROTECTED]> wrote: > > > > > Hi all > > > > > i wanna embed a richtext field in my admin textfield. > > > > today, i try t

Re: How to show up tiny mce in admin textfield

2008-09-03 Thread bin
x27;, > '/app_media/textareas.js', > ) > > On Sep 3, 10:50 am, bin <[EMAIL PROTECTED]> wrote: > > > Hi all > > > i wanna embed a richtext field in my admin textfield. > > today, i try to use tiny mce. but no matter whatever i did, it

Re: How to show up tiny mce in admin textfield

2008-09-03 Thread lingrlongr
> > i wanna embed a richtext field in my admin textfield. > today, i try to use tiny mce. but no matter whatever i did, it didnt > show up. > > i created a directory in my project folder, named appmedia, and copied > the tiny mce files and textareas.js into

How to show up tiny mce in admin textfield

2008-09-03 Thread bin
Hi all i wanna embed a richtext field in my admin textfield. today, i try to use tiny mce. but no matter whatever i did, it didnt show up. i created a directory in my project folder, named appmedia, and copied the tiny mce files and textareas.js into it. this is my urls.py (r'^app_

Re: html and TextField

2008-06-29 Thread Malcolm Tredinnick
On Sun, 2008-06-29 at 14:12 -0700, greg wrote: [...] > > I could use the fields defined above and just allow text in the actual > body, possible with a link to attachments (I have an "Attachments" > table that links to announcements). This would limit what could be > displayed on the screen but

Re: html and TextField

2008-06-29 Thread greg
On Jun 28, 6:31 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2008-06-28 at 18:05 -0500, Greg Lindstrom wrote: > > I would like to store text with html markup in a table to be displayed > > to the screen.  When I created a TextField and placed html markup in &g

Re: html and TextField

2008-06-29 Thread Daniel Roseman
On Jun 29, 12:05 am, "Greg Lindstrom" <[EMAIL PROTECTED]> wrote: > I would like to store text with html markup in a table to be displayed > to the screen. When I created a TextField and placed html markup in > it, all of the tags were escaped automatically. It there a s

Re: html and TextField

2008-06-29 Thread Ross Dakin
Could you just un-escape the string before you pass it to your template? I haven't tried this, just guessing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: html and TextField

2008-06-28 Thread Malcolm Tredinnick
On Sat, 2008-06-28 at 18:05 -0500, Greg Lindstrom wrote: > I would like to store text with html markup in a table to be displayed > to the screen. When I created a TextField and placed html markup in > it, all of the tags were escaped automatically. It there a setting to > turn

html and TextField

2008-06-28 Thread Greg Lindstrom
I would like to store text with html markup in a table to be displayed to the screen. When I created a TextField and placed html markup in it, all of the tags were escaped automatically. It there a setting to turn this off (I didn't see it in the online documentation), or is there another

Re: TextField default String problem

2008-06-18 Thread Florencio Cano
ld) and a description > (TextField). I'm trying to set the default description to be something > simple like: > > default="hello, I'm the description of the %s" % name > > (To my surprise) this validates, but the description includes a > reference to the name fi

TextField default String problem

2008-06-17 Thread redmonkey
I have two fields in a model, a name (CharField) and a description (TextField). I'm trying to set the default description to be something simple like: default="hello, I'm the description of the %s" % name (To my surprise) this validates, but the description includes a r

Re: Data too long for column error using textfield

2008-06-05 Thread emy_66
I'm not sure if this is a bug or an error on my part. Any ideas will be appreciated. I am able to input the first three lines of this into the database before I get this error message so I'm guessing it's not any special characters nor the line breaks - this is the same with other similar data. Al

Data too long for column error using textfield

2008-06-03 Thread emy_66
Hi All, I have a problem with a DataError at /admin/polls/poll/5/ (1406, "Data too long for column 'choice' at row 1"), even though the model field is set as a textfield which is taking longtext. The data I'm trying to input is this below, as you can see it's no

How to Create a TextField and read data from it

2008-05-09 Thread João Rodrigues
Hello all. I'm new to Django, and to web development, so feel free to point me to the manual if you need to :) I am having a small problem developing a web interface for an application (100% written in Python) I built. At first, I tried to use Ruby on Rails, as advised by a friend, but since I was

  1   2   >