Character limit and other such things

2 views
Skip to first unread message

Alec

unread,
Oct 23, 2009, 12:26:15 PM10/23/09
to jaikuengine-discuss
I just got the source not too long ago so maybe the answer is really
obvious, but I was just wondering how the restriction on the character
limit is implemented? At what level is it enforced? Would it be
nontrivial to get rid of the character limit? I was thinking of
changing the property of the content to a text property instead of a
string property, would it break anything? If it's relatively trivial
how should I go about changing the model for the entry?

Would it also be nontrivial to change the system so that any posts
made to a channel will still show up in a user's overview, just
categorized and denoted as such, even if the viewer isn't a member of
that channel? Also, is there a limit to the length that the channel
name can be?

Thanks in advance.

Faried Nawaz

unread,
Oct 27, 2009, 2:39:05 PM10/27/09
to jaikuengine-discuss
It's trivial to get rid of the 140 character limit. I think it took
me about 15 minutes from the time I checked out jaiku's code, found
and changed the 140 character limit in a couple of places, reads the
docs, and uploaded to create http://tl2tweet.appspot.com/ (it's not a
real service).

I don't have the code near me, but I can send you a diff tomorrow.
Just search the source for both 140 and 141, and you'll find three or
four files to edit. That's all there is to it.

Faried Nawaz

unread,
Oct 28, 2009, 8:30:29 AM10/28/09
to jaikuengine-discuss
http://gist.github.com/220451
That should be everything you need to change.

Adewale Oshineye

unread,
Oct 29, 2009, 7:43:25 AM10/29/09
to jaikuengi...@googlegroups.com
2009/10/28 Faried Nawaz <far...@gmail.com>:

>
> http://gist.github.com/220451
> That should be everything you need to change.
Faried: Any chance you could work out a way to make all 3 places use
the same constant?
If so it would make a great first patch for you to contribute to the project.

Faried Nawaz

unread,
Oct 29, 2009, 3:42:02 PM10/29/09
to jaikuengine-discuss
On Oct 29, 5:43 pm, Adewale Oshineye <adew...@gmail.com> wrote:

> Faried: Any chance you could work out a way to make all 3 places use
> the same constant?

I suppose that could be done. The HTML template could pull in the
value from django. The Javascript is more work: I'm guessing it's
served as a static file, not parsed as a template. I'll look into it
tomorrow.

> If so it would make a great first patch for you to contribute to the project.

That would be this silly patch! http://code.google.com/p/jaikuengine/issues/detail?id=138

Adewale Oshineye

unread,
Oct 29, 2009, 7:49:32 PM10/29/09
to jaikuengi...@googlegroups.com
2009/10/29 Faried Nawaz <far...@gmail.com>:
Somehow I missed that. I've committed it in r117:
http://code.google.com/p/jaikuengine/source/detail?r=117 and closed
the issue.

Thanks

Faried Nawaz

unread,
Oct 30, 2009, 8:52:34 AM10/30/09
to jaikuengine-discuss
On Oct 29, 5:43 pm, Adewale Oshineye <adew...@gmail.com> wrote:
> Faried: Any chance you could work out a way to make all 3 places use
> the same constant?

I'm not all that happy about the js part, but it works:

http://gist.github.com/222313

I moved the MAX_POST_LENGTH setting to settings.py so that it can be
overridden in local_settings.py. message_form.html creates some
javascript on the fly to set a variable with the post length.

I don't know django idioms, but perhaps creating a file in common/
templatetags for custom js of this type is a cleaner way to do it.


Faried.
Reply all
Reply to author
Forward
0 new messages