Re: django socialauth username not showing correctly
On 09/10/12 10:52, psychok7 wrote: So i am using django socialauth and its working fine, except for the part where my usernames do not match my Facebook or twitter accounts after i log in. In other words for example if i my username is 'john', after i log in in my app it shows 'john820579c6960e4677'. What am i doing wrong? how can i make it look exactly like my Facebook account? You muse the GraphAPI service with the provided Access Token (code) to access the Facebook Profile and get the real name. The Django SocialAuth package just provides access services. Also, you must add some special permissions to access certain profile data. -- > [SNIP] Kind regards, -- Daniel Molina Wegener [dmw at coder dot cl] @damowe | http://coder.cl/ | https://github.com/dmw -- 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.
Re: How to print a graph
-- 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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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. Best regards, -- Daniel Molina Wegener System Programmer & Web Developer Phone: +56 (2) 979-0278 | Blog: http://coder.cl/ -- 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.
Re: [ date and null value ]
On Saturday 26 November 2011, Lord Goosfancito wrote: > Hello. > > I have problem when i declared field with "blank" the admin django show > this error: > > (1048, "Column 'fechaProyecto' cannot be null") > > in my models.py: > > fechaProyecto = models.DateField(verbose_name='Ingresó a la > subdirección de Proyecto') > fechaProyecto.blank = True > > What is the problem? You must define: _fecha_proyecto_label = u'Ingresó a la subdirección de Proyecto' fechaProyecto = models.DateField(verbose_name=_fecha_proyecto_label, blank=True, null=True) Also, camel case is not used in Python and Django standards. Please read the Style Guide and the Zen of Python to have a better approach on Python coding: Style Guide: http://www.python.org/dev/peps/pep-0008/ Zen of Python: http://www.python.org/dev/peps/pep-0020/ > > Thank's > > Gustavo. Best regards, -- Daniel Molina Wegener System Programmer & Web Developer Phone: +56 (2) 979-0277 | Blog: http://coder.cl/ -- 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.
Re: Template
On Tuesday 08 November 2011, "Hůla, Václav" wrote: > Hello. > How I do equivalent of foo[bar] in template? From documentation it > looks like it should be done automatically - see > https://docs.djangoproject.com/en/1.3/ref/templates/api/#render > > But: > >>> from django.template import Context, Template > >>> t = Template("Will ot work? {{ foo.bar }}") > >>> context = { > > ... 'foo': {'baz':'Yes!'}, > ... 'bar': 'baz', > ... } > > >>> c = Context(context) > >>> t.render(c) > > u'Will ot work? ' You must use foo.baz to get 'Yes!'. Same for lists with indices, foo.0 in case of 'foo': ['Yes!']. > > > Ax. Best regards, -- Daniel Molina Wegener System Programmer & Web Developer Phone: +56 (2) 979-0277 | Blog: http://coder.cl/ -- 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.
Re: Unable To Delete Records
On Tuesday 30 August 2011, Showket Bhat wrote: > Hi All... Hello Showket... > > I have created a small application where in i am inserting and > deleting records. I am able to delete a single record however when a > select all or more then one record it deletes the last record only.. I > tried a lot but failed please help I am wring the Code and the Console > output here Probably you should try using: m = Medecine.objects.get(pk = i) Instead of using: m = Medecine.objects.get(id = i) Also, try to handle the DoesNotExist and similar exception once you try to retrieve the object using the /get()/ method. Also you can reduce the look by using: del_ids = request.POST.getlist('del_id') Medecine.objects.filter(id__in = del_id).delete() Which should be faster than your loop. > > > === > my function to delete a medecine from its table in views.py > === > > def delete_medecine(request,medecine={}): > print "-->>",request.POST > list = [] > for i in request.POST['del_id']: > m = Medecine.objects.get(id = i) > m.delete() > return HttpResponseRedirect('/medecine') > > == > my template file > > > > > > > > > SNo. > Name > Price > Quantity > Exp. Date > Description > > > > > {% for single in medecine_obj%} > > = "del_id" /> > {{single.id}} > {{single.name}} > {{single.price}} > {{single.exp_date}} > {{single.discription}} > src="/login/media/assets/action_delete.png" alt="Delete" /> href="#"> a> > > {%endfor%} > > value = "Add Record" alt="Add" /> > alt="Delete" /> > > > > > > > === > My Console > === > > /usr/local/lib/python2.6/dist-packages/django/middleware/csrf.py:262: > DeprecationWarning: CsrfResponseMiddleware and CsrfMiddleware are > deprecated; use CsrfViewMiddleware and the template tag instead (see > CSRF documentation). > DeprecationWarning > == {u'csrfmiddlewaretoken': [u'fea796e4bc7836bb8584140b71a0afcc'], > u'del_id': [u'1', u'2', u'8'], u'delete': [u'Delete Records']}> > = 8 > [30/Aug/2011 06:04:56] "POST /delete_medecine/ HTTP/1.1" 302 0 > > > > == > > > Please help Best regards, -- Daniel Molina Wegener System Programmer & Web Developer Phone: +56 (2) 979-0277 | Blog: http://coder.cl/ -- 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.