6 pm, Daniel Roseman
wrote:
> On Dec 31, 12:18 am, Chuck22 wrote:
>
>
>
>
>
> > class ContactForm(forms.Form):
> > email = forms.EmailField(required=True,
> > widget=forms.TextInput(attrs=
> > {'size
that required field did not validate and
block the form submission. User is able to submit the form without
providing email which is a required field.
On Dec 31, 1:50 am, "Alex Koshelev" wrote:
> Please post here entire view code
>
>
>
> On Wed, Dec 31, 2008 at 8:18
class ContactForm(forms.Form):
email = forms.EmailField(required=True,
widget=forms.TextInput(attrs=
{'size':'30'}),
error_messages={'required':'Please fill
out your Email'})
...
in my form html file:
...
label for="id_f
Anyone can help on this? I get stuck with image file upload.
On Dec 21, 11:33 pm, Chuck22 wrote:
> I have three ImageField in my form and model, I want to know how to
> upload the three image files in the form processing code. I found
> Django Admin page handles the image file uplo
I have three ImageField in my form and model, I want to know how to
upload the three image files in the form processing code. I found
Django Admin page handles the image file upload nicely. And I want to
do the exactly same work. But I can not find the piece of code that
does the job when searchin
t; image.')
>
> if len(thumbnail_image) > 20480: #bytes
> raise forms.ValidationError(u'Thumbnail file size must
> not exceed 20 KB.')
>
> except AttributeError:
> pass
>
> return thumbnail_image
>
Here is my model:
class Book(models.Model):
title = models.CharField(max_length=150)
category = models.CharField(max_length=50)
description = models.CharField(max_length=2000)
image1 = models.ImageField(upload_to='img/bk', blank=True)
image2 = models.ImageField(upload_to='img/
1. I want to create Global Unique ID (GUID) as the primary key of my
database table. Is there GUID available in Django or Python?
2. Also, I need to create a Authorization Code (random char/number
string) to verify user's email when people sign up on my site. Is
there generic method in Django or
After adding "homedomain" subdirectory (project root folder) to the
Python path, it is working now.
PythonPath "[r'C:/Apache',r'C:/Apache/homedomain'] + sys.path"
Thank for giving me the right direction.
> Check your Python path to make sure it includes the parent directories
> of everything yo
Because my application works fine with Django development server
(http://locahost:8000) on the same machine, I assume the problem does
not reside in my application code. Then it must be due to the
configuration of Apache. Do I need to modify my code to make it work
with Apache/mod_python?
Here is
ov 16, 6:12 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> Are you setting ErrorDocument directives in Apache configuration?
>
> If you are then disable them and then actual error may not be masked.
>
> Have you looked in Apache error log for more information?
&
Here is what I tried.
DocumentRoot "C:/Apache/homedomain"
ServerName domain.com
ServerAlias www.domain.com
SetEnv DJANGO_SETTINGS_MODULE homedomain.settings
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "['C:/Apache'] + sys.path"
P
Never mind. I found the solution. Put admin.autodiscover() to urls.py
fix the issue.
On Oct 30, 9:40 pm, Chuck Bai2 <[EMAIL PROTECTED]> wrote:
> I got the following message when login as superuser to admin home page:
> *
> You don't have permission to edit anything.
> *
>
> Recent Actions
>
>
Adding context_instance=RequestContext(request) to the method fixed
the problem. Seems this should be done by default for
render_to_response method. Thank you.
On Oct 20, 4:36 am, Christian Joergensen <[EMAIL PROTECTED]> wrote:
> Chuck Bai2 wrote:
> > Here is my view code:
>
> > def contact(requ
Thanks, Karen. You are correct. My version is Win32 binaries of GNU
gettext-runtime 0.13.1. It seems getting the development trunck is a
better choice for me. But, I am not sure if the Django development
trunck is stable enough to use. I will give it a try.
>
> You don't mention your system type
thanks Satheesh, the set_language function is partially working for
me. When I click the lauguage hyperlinks, only the word "Home" works,
but when I change the msgid to be "Home1", it stop working. It seems
that "Home" is a django preserved word which get auto-translated.
1. In my base.html, I ha
Anyone has any clue? The problem has not been resolved yet. Any
referrence are welcome. Thanks.
chuck
On Sep 27, 2:21 pm, Chuck Bai <[EMAIL PROTECTED]> wrote:
> In my url.py, I define the root my site is like this:
> urlpatterns = patterns('',
> url(r'^$', 'views.index', name="index"),
>
17 matches
Mail list logo