Python quit unexpectedly
Hi, Anyone got this problem? I try to run grappelli on django 1.3. and run this command : #python manage.py runserver Server running. Withouth grappeli, I can go to django admin page. But after install grappelli, and try to access http://127.0.0.1/admin/ error appear 'Python quite unexpectedly'. I try both on python 2.5 and python 2.6, got the same error. For additional info, below is my url.py === url.py = from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^grappelli/', include('grappelli.urls')), ) === -- 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.
Free Blog built on Django and run in AppEngine
Hi, I just released a source code of my own blog as open source (called 'MeBlog'). Built the blog in django 1.2.3 and run in appengine. This blog has common features for blog, such as manage posts, manage pages, and manage media file. This is the first release, hope anyone enjoy. Feel free to write me any comment, sugggestion, bug report, or feature request. Source code available at http://bitbucket.org/hudarsono/meblog Preview and Real site : http://blog.hudarsono.me (my own blog) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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: Django form show initial prepopulate on edit
Hi, Yes, because i use appengine, so django model not supported. Btw i fixed the problem , by using {{ postForm.category }} instead, and put the css class by define category = forms.CharField(widget = forms.TextInput(attrs={'class':'somecssclass'}) instead of wrote it in html. Thanks. On Oct 28, 12:26 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Oct 27, 3:25 pm, Hudar <hudars...@gmail.com> wrote: > > > > > Hi, > > > Just wondering, how we could show initial value on the edit form. Let > > say we have code like this to retrive the data ; > > > if request.method == 'GET': > > post = models.Post.get_by_key_name(key_name) > > editPostForm = postform.PostForm(initial={ > > 'title': post.title, > > 'body': post.body, > > 'category': post.category, > > 'tags': ' '.join(post.tags)}) > > > return render_to_response('admin/newpost.html', { > > 'postForm':editPostForm, > > 'action':post.get_edit_url(),}) > > > but when i code the form like this : > > > name="category" max_length="30" > > value="{% if postForm.category.data %}{{ postForm.category.data }}{% > > endif %}"> > > > it doesnt show up the initial category in the textfield. Please help, > > thanks > > You probably need to use post.category.id in your initial dictionary. > > However, you would be better off using a ModelForm, and passing > 'instance' rather than 'initial'. > -- > 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-us...@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.
Django form show initial prepopulate on edit
Hi, Just wondering, how we could show initial value on the edit form. Let say we have code like this to retrive the data ; if request.method == 'GET': post = models.Post.get_by_key_name(key_name) editPostForm = postform.PostForm(initial={ 'title': post.title, 'body': post.body, 'category': post.category, 'tags': ' '.join(post.tags)}) return render_to_response('admin/newpost.html', { 'postForm':editPostForm, 'action':post.get_edit_url(),}) but when i code the form like this : it doesnt show up the initial category in the textfield. Please help, 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-us...@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.
Serve static file from cdn
Hi, Just wondering how we could server static file if we have our files hosted in cdn. I been trying several way, but nothings work. I have the files in let say ; http://commondatastorage.googleapis.com/static/media/node.js As far as I know, all the example out there use static files reside in the same server. Any help will be much appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Django User Registration tutorial
Hello, I am new to django and still go through the tutorial. Just made a simple registration form using django and found this error : http://dpaste.com/168746/ Below are the register function I wrote : def register(request): if request.method == "POST": form = UserCreationForm(request.POST) if form.is_valid(): new_user = form.save() return render_to_response('index.html', {'message': 'Your account has saved'}) else: form = UserCreationForm() return render_to_response('users/register.html', { 'form': form, }) Please advice. 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-us...@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.