Re: Problems saving values from SelectDateWidget
Hmm just to add on. This not only happen with SelectDateWidget. It happens with DateField with TextInput Widget too and also ModelChoiceField. Saving all other fields work fine. #these 2 >.< country = forms.ModelChoiceField(queryset=Country.objects.all() ) birth_date = forms.DateField() #When I save #get the particular object #save other fields, work fine as I tested it by disabling the 2 fields below in the forms and the model #save this 2 fail, both will fail user_profile.country = self.cleaned_data['country'] user_profile.birth_date = self.cleaned_data['birth_date'] user_profile.save() Integrity Error will occur telling me country.id cannot be null, birth_date cannot be null. Creating a form with form_for_instance or form_for_model work perfectly fine. I'm using pysqlite Hope this extra information helps Thanks from a newb. :) On Dec 6, 2:24 am, RajeshD <[EMAIL PROTECTED]> wrote: > On Dec 5, 10:31 am, Stupid Dustbin <[EMAIL PROTECTED]> > wrote: > > > Thanks for the reply. However, after updating to the latest SVN > > version of django. The same error still occurs. :( > > I am using the same constructs with Django rev #6652 in production. > Perhaps you want to downgrade to that revision and try it out one more > time? If that fails, it would be time to open a ticket. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Problems saving values from SelectDateWidget
Hi, encountered a problem recently with SelectDateWidget. I'm not very sure what I did wrong. from django.newforms.extras.widgets import SelectDateWidget #other imports class JustAForm(forms.Form): date_of_birth = forms.DateField(label = 'date of birth',widget = SelectDateWidget(years = range(1950, 1990))) #other fields def save(self): #create UserProfile #setting several fields to the model new_user_profile.date_of_birth = self.cleaned_data['date_of_birth'] new_user_profile.save() #save! Apparently, all my fields are doing okay except when it comes to saving the date_of_birth which is using SelectDateWidget (the widget display correctly on the browser). I had no problems earlier when using a text input for date_of_birth. Thanks for any help that could get me saving date_of_birth it without error. The error message: Exception Type: IntegrityError Exception Value:myapp_userprofile.date_of_birth may not be NULL --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
django registration (sending email and activation of account)
Hi, I'm pretty new to django and python and currently I'm trying to learn how to use django-registration and I faces some problems Firstly, I realise my emails are actually not sent out to people who sign up. At first I got a "non local email relay not permitted" message when i submit my registration form, but that is fixed by configuring my email server to allow it. However, despite that error message no longer appearing and that my django application could successfully go to registration_complete.html page, I realised that none of the email accounts actually receive any emails from my project. I'm using Mercury email server Secondly, since I did not receive any emails in my inbox, I decide to log in to admin and get the unactivated account activation_key and manually key in the address: http://localhost:8000/accounts/activate/47881088db0f29e00d48fa4dc89adb62d405bc5a/ where and 47881088db0f29e00d48fa4dc89adb62d405bc5a is the activation_key of a certain user and it lead me to activate.html as expected. However. The account is not activated at all when I checked admin. 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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Problems with ImageField
Hi, recently I decide to try out the ImageField but it gives me some problems. in my models it is image = models.ImageField(upload_to='/toy_images/') in my settings.py here are my media settings MEDIA_ROOT = '/media/' MEDIA_URL = MEDIA_URL = 'http://localhost:8000/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' The image doesn't get uploaded and I'm unable to figure out what wrong. :(. 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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Problems with ImageField
Hi, recently I decide to try out the ImageField but it gives me some problems. in my models it is image = models.ImageField(upload_to='/toy_images/') in my settings.py here are my media settings MEDIA_ROOT = '/media/' MEDIA_URL = MEDIA_URL = 'http://localhost:8000/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' The image doesn't get uploaded and I'm unable to figure out what wrong. :(. 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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX? Differences?
Hi, I'm new to django and there is something that is confusing me about the differences between MEDIA_ROOT MEDIA_URL ADMIN_MEDIA_PREFIX from what I read so far, media_root seem to be the folder that django upload media files to. however for MEDIA_URL seem to be something like url/and ADMIN_MEDIA_PREFIX i had not much clues. Would be nice to provide an easy example. Thanks. Additional Info that might help: Using windows with django development server. Only learning, no plans for site to be on a live site at all. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---