Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-08-09 Thread Peter Sagerson
I imagine that would work. Generally speaking, if you want to use a multi-page flow to atomically mutate some state (in this case auth status), you're pretty much into form wizard territory. For specific scenarios, there may be workarounds--potentially a bit sneaky and underhanded--that produce

Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-08-09 Thread Jason Arnst-Goodrich
I thought about that and I didn't like that it logged them in if they failed the OTP token. I'll probably use it for now. The only reason being I want them to do it in a single "attempt session". If they login half way and leave for a couples minutes I want them to supply the regular login cred

Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-08-09 Thread Peter Sagerson
Hi Jason, The two-step verification flow should be a cinch. Try something like this: @login_required @otp_required(if_configured=True) def protected_view(request): ... I'm not sure I followed the question about the password field, although there is some deliberate behavior here (see django

Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-08-09 Thread Jason Arnst-Goodrich
After being sidetracked with unrelated work I'm finally back to implementing the OTP stuff. Just to update you on how I decided to go about the 'self service' side of things - I'm basically using django-otp unchanged and I'm adding an AuthProfile model that users have some control of. This is w

Re: Newbie question: first project can't connect to MySQL

2013-08-09 Thread Robert
I got the same problem. I solved it just now. http://stackoverflow.com/questions/18150858/operationalerror-2002-cant-connect-to-local-mysql-server-through-socket-v On Thursday, February 5, 2009 1:41:21 AM UTC+8, Kevin Audleman wrote: > > Hello everyone, > > I am running through the tutorial and s

Re: Exception Value: No module named url -- on django poll tutorial

2013-08-09 Thread Bill Freeman
Stack traces help a lot. Just follow it up from the bottom until it's back in your code. Then you know where to concentrate. On Fri, Aug 9, 2013 at 2:31 AM, goreano wrote: > HEYY K1G, You've got it this is a typical case of trees not > letting me see the forest > > Thanks a lot

Re: problem writing a view that displays http request

2013-08-09 Thread Sithembewena Lloyd Dube
Try the following: # In your case, just add 'include' to your conf.urls imports from django.conf.urls import include Then use it in the url declaration (see the official Django tutorial). On Fri, Aug 9, 2013 at 12:04 PM, Dinesh Gudi wrote: > *urls.py* > from django.conf.urls import patterns,

Re: connecting to MS SQL server in addition to default MySQL

2013-08-09 Thread Larry Martell
On Friday, August 9, 2013, Javier Guerra Giraldez wrote: > On Fri, Aug 9, 2013 at 8:53 AM, Larry Martell > > > wrote: > > On Friday, August 9, 2013, Javier Guerra Giraldez wrote: > >> > >> On Thu, Aug 8, 2013 at 9:22 PM, Larry Martell > >> > > > >> wrote: > >> > So all I can do is execute sql >

Apache won't allow upload but dev server will

2013-08-09 Thread Matt Lind
I am attempting to setup django-bft on my CentOS 6.4 server. When running under the dev server I am able to upload the file and it shows up on my server. However, when running through MOD_WSGI everything about the site works, except for the upload. The file never lands on the server and the a

Re: connecting to MS SQL server in addition to default MySQL

2013-08-09 Thread Javier Guerra Giraldez
On Fri, Aug 9, 2013 at 8:53 AM, Larry Martell wrote: > On Friday, August 9, 2013, Javier Guerra Giraldez wrote: >> >> On Thu, Aug 8, 2013 at 9:22 PM, Larry Martell >> wrote: >> > So all I can do is execute sql >> > queries against it. >> >> >> good news: that's all the ORM needs. :-) > > > Don't

How can I order my list based on a field in a different table?

2013-08-09 Thread Pepsodent Cola
1.) How can I order my list based on a field in a different table? return Word.objects.filter(direct_transl_word='') The above I want to do something like this where the field ('-votes') is located at table Altword. Nothing happens when I use this though, don't understand why? #

Re: connecting to MS SQL server in addition to default MySQL

2013-08-09 Thread Larry Martell
On Friday, August 9, 2013, Javier Guerra Giraldez wrote: > On Thu, Aug 8, 2013 at 9:22 PM, Larry Martell > > > wrote: > > So all I can do is execute sql > > queries against it. > > > good news: that's all the ORM needs. :-) Don't I need a models file that describes the schema? I don't even hav

Re: connecting to MS SQL server in addition to default MySQL

2013-08-09 Thread Javier Guerra Giraldez
On Thu, Aug 8, 2013 at 9:22 PM, Larry Martell wrote: > So all I can do is execute sql > queries against it. good news: that's all the ORM needs. :-) still, i've found myself on some situations where getting the ORM to work correctly wasn't worth the effort. mostly because of badly configured

problem writing a view that displays http request

2013-08-09 Thread Dinesh Gudi
*urls.py* from django.conf.urls import patterns, url from testform import views urlpatterns = patterns('', url(r'^$', views.testhandler), ) *views.py* from django.http import HttpResponse def testhandler(request): return HttpResponse(request) -- You received this message because you a

Iterating over fields in Formset

2013-08-09 Thread Sandeep kaur
I have my code for formset here : {% csrf_token %} {{ FAtestform_formset.management_form }} {% for form in FAtestform_formset.forms %} {% if forloop.first %} {% for field in form.visible_fields %} {{ field.label|capfirst }} {% endfor %} {% endif %} {% for

Re: Friendship model

2013-08-09 Thread Robin Lery
Thank you! I'll check on it. On Fri, Aug 9, 2013 at 12:36 PM, Rahul Gaur wrote: > > > On Fri, Aug 9, 2013 at 9:38 AM, Andy McKay wrote: > >> On Thu, Aug 8, 2013 at 12:41 PM, Robin Lery wrote: >> >>> How do i create a Friendship model? Please guide me. >>> >> >> You would need to provide more

Re: Friendship model

2013-08-09 Thread Rahul Gaur
On Fri, Aug 9, 2013 at 9:38 AM, Andy McKay wrote: > On Thu, Aug 8, 2013 at 12:41 PM, Robin Lery wrote: > >> How do i create a Friendship model? Please guide me. >> > > You would need to provide more detail to get much help. The tutorial > covers how to make models: > > https://docs.djangoproject