Re: Firefox search plugin for Django documents

2009-09-25 Thread taijirobot

I feel happy that it can you:)

On Sep 25, 2:47 am, dimitri pater - serpia 
wrote:
> 2009/9/24 玉东 :
>
>
>
> > Hi, guys,
>
> > I've made afirefoxsearch plugin for django documents. It can save your
> > time if you often search the official django documents because you don't
> > have to visit the djangoproject.com first. Just type in the search box,
> > press enter and you'll see the page of the results.
>
> > It is useful to me because I often need to search the documents and that's
> > the reason why I made it. And I think it might be useful to you if you have
> > the same demand, too.
>
> > You can check it here:
> >https://addons.mozilla.org/en-US/firefox/addon/14474
>
> > It is experimental right now but it can work perfectly under common windows
> > and linux distributions. If you meet problems, please tell me.
>
> > Thank you.
> > --
> > 来自 广玉东
> > from Guang Yudong / Dennis
> > BUAA
> > guangyudongb...@gmail.com
> > cellphone: (+86)138-1174-5701
>
> Thank you very much, nice work!
>
>
>
> --
> ---
> You can't have everything. Where would you put it? -- Steven Wright
> ---
> please visitwww.serpia.org
--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: About using django-tinymce

2009-09-21 Thread taijirobot

well, guys, I've solved this problem, but in a bad way.

Since I'm running the site locally with the default django server, the
MEDIA_URL became a confusing thing to me. Luckily I have an Apache
server running on my machine, so I just set the MEDIA_URL to 'http://
localhost/media/' and copied the files needed in to it.

I think it's a bad way, even no way worse. But it works :)

On Sep 21, 12:22 pm, taijirobot  wrote:
> Hi, guys,
>
> I'm learning django recently and I am trying to add a rich text editor
> to the places where long formated text like blog post are needed (the
> site is running on local machine with the default django server).
>
> I tried to use django-tinymce :http://code.google.com/p/django-tinymce/
> and all the things I did was:
>
> 1. download the django-tinymce package, extract, and run 'sudo python
> setup.py install'
>
> 2. get a tinymce distribution(new enough) and copy the jscripts/
> tiny_mce to the media root of my local machine.
>
> my config:
> MEDIA_ROOT = '/home/taijirobot/mysite/media/'
> MEDIA_URL = ''
>
> 3. add 'tinymce' to INSTALLED_APPS in settings
>
> 4. Change the definition of the BlogForm (a form defined to generate
> form for blog mode), like this:
> ..
> class BlogPost(models.Model):
>     title = models.CharField(max_length=150)
>     body = models.TextField()
>     timestamp = models.DateTimeField(default=datetime.datetime.now)
>     class Meta:
>         ordering = ('-timestamp',)
> ..
> class BlogForm(ModelForm):
>     body = forms.CharField(widget=TinyMCE(attrs={'cols':80, 'rows':
> 30}))
>     class Meta:
>         model = BlogPost
>         exclude = ['timestamp']
> ..
>
> The document says we can get a tinymce editor in the admin site after
> this. But nothing different shows with mine.
>
> What might be the problem?
> Is it because the wrong MEDIA_URL setting? Or I've missed something
> when installing or using?
>
> Thank you.
--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: About using django-tinymce

2009-09-21 Thread taijirobot

thank you, I missed the line 'form = BlogForm' in admin class, but
after I added this, the tinymce editor still doesn't show, except that
the body textarea is bigger than it used to be.

On Sep 22, 1:42 am, brad  wrote:
> > The document says we can get a tinymce editor in the admin site after
> > this. But nothing different shows with mine.
>
> Just to clarify, are you trying to get tinymce displaying in your
> django admin?  If so, you have to tell the admin for your BlogPost
> model to use the BlogForm.  So do you have an admin.py with something
> like the following?
>
> class BlogPostAdmin(ModelAdmin):
>     form = BlogForm
--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: About using django-tinymce

2009-09-21 Thread taijirobot

Yes, I am very unconfident about my MEDIA_URL settings too. But I
don't know how to set it in my case that I am running the site on the
localhost.

On Sep 21, 4:37 pm, Daniel Roseman  wrote:
>
> Well, I would assume that MEDIA_URL is wrong - it's very unlikely you
> want it to be blank. But more to the point, what is serving the media
> and what URL is it serving it on? That's the value you should use for
> MEDIA_URL.
> --
> DR.
--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



About using django-tinymce

2009-09-20 Thread taijirobot

Hi, guys,

I'm learning django recently and I am trying to add a rich text editor
to the places where long formated text like blog post are needed (the
site is running on local machine with the default django server).

I tried to use django-tinymce : http://code.google.com/p/django-tinymce/
and all the things I did was:

1. download the django-tinymce package, extract, and run 'sudo python
setup.py install'

2. get a tinymce distribution(new enough) and copy the jscripts/
tiny_mce to the media root of my local machine.

my config:
MEDIA_ROOT = '/home/taijirobot/mysite/media/'
MEDIA_URL = ''

3. add 'tinymce' to INSTALLED_APPS in settings

4. Change the definition of the BlogForm (a form defined to generate
form for blog mode), like this:
..
class BlogPost(models.Model):
title = models.CharField(max_length=150)
body = models.TextField()
timestamp = models.DateTimeField(default=datetime.datetime.now)
class Meta:
ordering = ('-timestamp',)
..
class BlogForm(ModelForm):
body = forms.CharField(widget=TinyMCE(attrs={'cols':80, 'rows':
30}))
class Meta:
model = BlogPost
exclude = ['timestamp']
..

The document says we can get a tinymce editor in the admin site after
this. But nothing different shows with mine.

What might be the problem?
Is it because the wrong MEDIA_URL setting? Or I've missed something
when installing or using?

Thank you.

--~--~-~--~~~---~--~~
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, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---