Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 228013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:38:48+00:00 2026-05-11T19:38:48+00:00

I am using FCKEditor within a Django app served by Apache/mod-wsgi. I don’t want

  • 0

I am using FCKEditor within a Django app served by Apache/mod-wsgi. I don’t want to install php just for FCKEditor andI see FCKEditor offers image uploading and image browsing through Python. I just haven’t found good instructions on how to set this all up.

So currently Django is running through a wsgi interface using this setup:

import os, sys

DIRNAME = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-3])
sys.path.append(DIRNAME)
os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

In fckeditor in the editor->filemanager->connectors->py directory there is a file called wsgi.py:

from connector import FCKeditorConnector
from upload import FCKeditorQuickUpload

import cgitb
from cStringIO import StringIO

# Running from WSGI capable server (recomended)
def App(environ, start_response):
    "WSGI entry point. Run the connector"
    if environ['SCRIPT_NAME'].endswith("connector.py"):
        conn = FCKeditorConnector(environ)
    elif environ['SCRIPT_NAME'].endswith("upload.py"):
        conn = FCKeditorQuickUpload(environ)
    else:
        start_response ("200 Ok", [('Content-Type','text/html')])
        yield "Unknown page requested: "
        yield environ['SCRIPT_NAME']
        return
    try:
        # run the connector
        data = conn.doResponse()
        # Start WSGI response:
        start_response ("200 Ok", conn.headers)
        # Send response text
        yield data
    except:
        start_response("500 Internal Server Error",[("Content-type","text/html")])
        file = StringIO()
        cgitb.Hook(file = file).handle()
    yield file.getvalue()

I need these two things two work together by means of modifying my django wsgi file to serve the fckeditor parts correctly or make apache serve both django and fckeditor correctly on a single domain.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:38:48+00:00Added an answer on May 11, 2026 at 7:38 pm

    Edit: Ultimately I was unhappy with this solution also so I made a Django app that takes care of the file uploads and browsing.

    This is the solution I finally hacked together after reading the fckeditor code:

    import os, sys
    
    def fck_handler(environ, start_response):
        path = environ['PATH_INFO']
        if path.endswith(('upload.py', 'connector.py')):
            sys.path.append('/#correct_path_to#/fckeditor/editor/filemanager/connectors/py/')
            if path.endswith('upload.py'):
                from upload import FCKeditorQuickUpload
                conn = FCKeditorQuickUpload(environ)
            else:
                from connector import FCKeditorConnector
                conn = FCKeditorConnector(environ)
            try:
                data = conn.doResponse()
                start_response('200 Ok', conn.headers)
                return data
            except:
                start_response("500 Internal Server Error",[("Content-type","text/html")])
                return "There was an error"
        else:
            sys.path.append('/path_to_your_django_site/')
            os.environ['DJANGO_SETTINGS_MODULE'] = 'your_django_site.settings'
            import django.core.handlers.wsgi
            handler = django.core.handlers.wsgi.WSGIHandler()
            return handler(environ, start_response)
    
    application = fck_handler
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's a run time thing. There are a bunch of… May 12, 2026 at 11:19 am
  • Editorial Team
    Editorial Team added an answer Silly me- I was in fact using a 3.0 API.… May 12, 2026 at 11:19 am
  • Editorial Team
    Editorial Team added an answer Twisted -- the best async framework for Python -- would… May 12, 2026 at 11:19 am

Related Questions

I am using FCKEditor within a Django app served by Apache/mod-wsgi. I don't want
I am using FCKEditor with CakePHP and when I save data sent from the
I am using FckEditor in Create.aspx page in asp.net mvc application. Since I need
I am currently playing around with the FCKEditor, and I am trying to replicate
I am developing a forms app (not web) for Windows Mobile, using .NET CF

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.