Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

How do I install django-ckeditor? -


in stack overflow there's 2 questions this editor, , nobody answers!!!

so i'm asking how install django package project?? i've followed these steps already, have no errors, nothing, , still form stays same. why??

edit: heres model

from datetime import datetime  django.db                import models django.utils.translation import ugettext_lazy _, ugettext ckeditor.fields          import richtextfield  class newsletter(models.model):      title = models.charfield(         _(u'title'),         max_length=200,         help_text=_(u'newsletter title'),         )      body = richtextfield()      date = models.datefield(          _(u'date'),          help_text=_(u'set date when newsletter should send')      )          class meta:         ordering = ['title',] 

forms.py

from models import newsletter, mail class newsletterform(forms.modelform):     class meta:        model = newsletter 

view:

from newsletter.models import newsletter, mail newsletter.forms  import newsletterform, mailform  def newsletters_add(request):     form = newsletterform()     tpl  = "form_newsletter.html"      return render_to_response(tpl, requestcontext(request, {         'form': form,     })) 

all form outputed succesfully {{ form }} tag

settings.py (of project)

ckeditor_media_prefix  = "/media/ckeditor/" ckeditor_upload_path   = "/www/vhosts/sender/media/newsletter/uploads/" ckeditor_upload_prefix = "http://******/media/newsletter/uploads/" ckeditor_restrict_by_user = true  ckeditor_configs = {     'default': {         'toolbar': 'basic',     }, }   installed_apps = (     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.sites',     'django.contrib.messages',     # uncomment next line enable admin documentation:     # 'django.contrib.admindocs',     'django.contrib.admin',     #'tagging',     'debug_toolbar',     'ckeditor',     'mailer',     'newsletter'  ) 

the media needed display widget correctly should stored in form's media object. can output tag needed js in template {{ form.media }}. admin should automatically, while in custom views have yourself... see django documentation on form media more information!


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -