Re: Jquery Ajax Autocomplete

2014-01-14 Thread megaBos
Have a look at django selectable

http://django-selectable.readthedocs.org/en/v0.7.X/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/09d2af2c-c731-4296-a553-80cb05c8f1fd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


New book: Instant Django 1.5 Application Development Starter

2013-04-05 Thread megaBos
good job

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: access the state of a Model object prior to it's modification ?

2012-07-30 Thread megaBos
Hello,

This is a long shot but try checking out django-reversion

thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/NM39pkUyvG4J.
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.



Re: UserProfile.user" must be a "User" instance. django-registration

2012-07-02 Thread megaBos
it seems fine, don't know why it shouldn't work, a different approach would 
be to overide the models save method and add the user there.


On Monday, July 2, 2012 4:17:03 PM UTC+3, Nikhil Verma wrote:
>
> HI All
>
> I am applying an django-registration in my app. So i create a UserProfile 
> Model and  a ModelForm after clicking on the email link
> the user is redirected to the ModelForm page of UserProfile. I am filling 
> the details and trying to save it, however i am getting the above error.
>
>
> Traceback:-
>
>
> Exception Type: ValueError at /myprofile/completingprofile/
> Exception Value: Cannot assign " object at 0x3487c10>": "UserProfile.user" must be a "User" instance.
>
>
> model
>
> class UserProfile(models.Model):
> user = models.ForeignKey(User, blank=True, null=True, unique=True)
> first_name = models.CharField(max_length=30)
> last_name = models.CharField(max_length=30, blank=True)
> gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
> mobile = models.CharField(max_length=15, blank=True)
> primary_email = models.EmailField(max_length=60, blank=True)
>
> # For professional Account
> institution_name = 
> models.CharField(max_length=100,blank=True,null=True)
>
> street = models.CharField(max_length=75)
> state = models.CharField(max_length=30)
> zip_code = models.IntegerField(max_length=7, blank=True, null=True)
> country = models.CharField(max_length=30, blank=True)
> 
>
> def __unicode(self):
> name = self.first_name + self.last_name
> return name
>
>
> form.py
>
> class UserProfileForm(ModelForm):
> class Meta:
> model = UserProfile
> exclude = ('user',)
> 
> def __init__(self, *args, **kwargs):
> super(UserProfileForm, self).__init__(*args, **kwargs)
>
>
>
> views.py 
>
> def completingprofile(request):
> """
> Creating Profile
> """
> print request
> if request.method == "POST":
> 
> form = UserProfileForm(request.POST)
> if form.is_valid():
> userprofile_obj = UserProfile(
> first_name = form.cleaned_data['first_name'],
> last_name = 
> form.cleaned_data['last_name'],
> gender = form.cleaned_data['gender'],
> mobile = form.cleaned_data['mobile'],
> institution_name = form.cleaned_data['institution_name'],
> street = form.cleaned_data['street'],
> zip_code = form.cleaned_data['zip_code'],
> state = form.cleaned_data['state'],
> country = form.cleaned_data['country'],
> user = request.user,# here i am trying to add user from 
> request who is coming from RegistrationForm from django -registration
># I am getting the error in this above line  
> )
> userprofile_obj.save()
> logger.info("Save profile for user: %s" % request.user)
> 
> return HttpResponseRedirect('/thanks/')
> else:
> form = UserProfileForm()
> return render_to_response("myprofile/profile_page.html", 
> {"form": form },
> context_instance=RequestContext(request)
> )
>  
> How can i save the user field ?
>
>
> Thanks for help in advance
>
> -- 
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/vfRWqa6X_ywJ.
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.



Re: Hosting Django website

2012-04-09 Thread megaBos
I recommend using webfaction, they have excellent documentation and
are very flexible. http://bit.ly/Hnbm6A

-- 
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.