Re: Pip type error.

2012-03-11 Thread John W.
I know it's weird to reply to myself, but just in case that somebody has the same problem. It seems that the problem it is in the requirements.txt, i created it using powershell and "pip.exe freeze > requirements.txt" command, which creates a file with a name that has nullbytes in it. I was ab

Why can't forms access the request object?

2012-03-11 Thread shacker
I recently needed to access request.user in a form, and found that I couldn't. Found many articles describing ways to accomplish this, such as James Bennett's [1]. I did get it working, but I'm curious *why* the request object isn't accessible from forms as it is from views. Why do we need to o

Re: Why can't forms access the request object?

2012-03-11 Thread Donald Stufft
Forms aren't only usable from inside a view. On Sunday, March 11, 2012 at 4:32 AM, shacker wrote: > I recently needed to access request.user in a form, and found that I > couldn't. Found many articles describing ways to accomplish this, such as > James Bennett's [1]. > > I did get it working

Re: Sorting the output of regroup

2012-03-11 Thread het.oosten
> > Sort the list in Python in your view. Its easier to do, easier to test > and easier to maintain. Thank you for the reply. This is indeed the best way. I left the regroup tag completely, and used some nested for loops in the template. Everything works fine now. Rob -- You received this mess

Re: built-in-views trouble

2012-03-11 Thread ajohnston
Out of curiosity, which version of Django are you using? Which message to you get when ViewDoesNotExist is raised?: "Could not import %s.%s. View is not callable." % "Could not import %s. View does not exist in module %s." % "Could not import %s. Parent module %s does not exist." % Alan On Satu

django formwizard NoFileStorageConfigured

2012-03-11 Thread danoro
[ACTION] Subclass NamedUrlSessionWizardView and instantiate it with a set of forms one of them containing a FileField class CommonWizardView(NamedUrlSessionWizardView): pass class FamilyWizardView(CommonWizardView): pass [RESULT] File "/accounts/urls.py", line 66, in family_wizard =

Re: Why can't forms access the request object?

2012-03-11 Thread Sergiy Khohlov
Of course form does not have access to the object. But you can pass some value which is accessible in view from view to form. Separating task in 2 parts : 1) set initial values in view class class myviewclass(): """ This is example only . full class realization is more complex """ form

User.objects.get() doesn't return anything in unit test.

2012-03-11 Thread RM
When my django test case executes, I'm testing my code's ability to create a new user. But when I use the User.objects.get() method the user isn't found. The view being tested actually creates users (I checked it in the browser), but how do I write a test that verifies it? Thanks for your help! f

Re: built-in-views trouble

2012-03-11 Thread Scott Macri
Django version is 1.3.1 final. If I call /accounts/password_reset/ I get the following error: Request Method: GET Request URL:http://localhost:8000/myapp/accounts/password_reset/ Django Version: 1.3.1 Exception Type: ViewDoesNotExist Exception Value: Tried logout_user in module myapp

totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread suresh dokania
-- 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

Re: Why can't forms access the request object?

2012-03-11 Thread shacker
On Sunday, March 11, 2012 6:24:30 AM UTC-7, skhohlov wrote: > > Of course form does not have access to the object. skholov - Thanks, but you misunderstand my question. Again, I know that forms don't have access to request, and again, I've got it working already (though with a different approa

Re: Why can't forms access the request object?

2012-03-11 Thread Masklinn
On 2012-03-11, at 17:43 , shacker wrote: > On Sunday, March 11, 2012 6:24:30 AM UTC-7, skhohlov wrote: >> >> Of course form does not have access to the object. > > > skholov - Thanks, but you misunderstand my question. Again, I know that > forms don't have access to request, and again, I've g

Re: Why can't forms access the request object?

2012-03-11 Thread Donald Stufft
On Sunday, March 11, 2012 at 12:43 PM, shacker wrote: > On Sunday, March 11, 2012 6:24:30 AM UTC-7, skhohlov wrote: > > Of course form does not have access to the object. > > > skholov - Thanks, but you misunderstand my question. Again, I know that forms > don't have access to request, and aga

Re: Language Translation

2012-03-11 Thread Florian Apolloner
Hi, please post usage questions to django-users. Thx. On Friday, March 9, 2012 4:23:37 PM UTC+1, Vishnu vg wrote: > > Hi Friends, > > I have a cms based existing django site. I want to translate it to german > or other language, Please suggest which is the best method? > > > -- > Regards > > Vi

Re: Multiple Choice Quiz

2012-03-11 Thread jbr3
I've gone through the tutorial. But I would just like to get a general idea of the best way to incorporate all these elements so I can save and reuse them. On Mar 10, 9:20 pm, "John S. Dey" wrote: > You might try reading the tutorial.  It provides example of a form. > > On Mar 10, 2012, at 6:16

Re: Multiple Choice Quiz

2012-03-11 Thread Shawn Milochik
On 03/11/2012 02:13 PM, jbr3 wrote: I've gone through the tutorial. But I would just like to get a general idea of the best way to incorporate all these elements so I can save and reuse them. What have you tried, and what specific issues have you run into? If you ask a question and nobody se

external urls

2012-03-11 Thread hack
How can I use an external URL in a django template? For example, I have a CharField in the database/model and I want to display it on a template page as an external link. However, when I do something like the following and click the link: {{items.website}} django attempts to access the link

Re: external urls

2012-03-11 Thread Daniel Roseman
On Sunday, 11 March 2012 18:27:33 UTC, hack wrote: > > How can I use an external URL in a django template? For example, I have a > CharField in the database/model and I want to display it on a template page > as an external link. However, when I do something like the following and > click the

Re: external urls

2012-03-11 Thread hack
OH shoot, DUH, my bad. Thanks for catching that man. I've been staring at code for way too long. LOL On Sunday, March 11, 2012 2:53:12 PM UTC-4, Daniel Roseman wrote: > > On Sunday, 11 March 2012 18:27:33 UTC, hack wrote: >> >> How can I use an external URL in a django template? For example,

Re: totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread yati sagade
What do you mean? On 11 Mar 2012 22:06, "suresh dokania" wrote: > > > -- > 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-us

Re: Multiple Choice Quiz

2012-03-11 Thread jbr3
Really, the problem is that I can't think of the best way to do it. I know I want to reuse the questions and the answers that go along with them. And I would like to be able to add new ones easily. So I tried to use two different models for this: one for the questions and one for the possible answe

Re: built-in-views trouble

2012-03-11 Thread Scott Macri
Hmmm, something must have happened when I messed with my urls.py. Now I get the exact same issue with my admin link. Caught ViewDoesNotExist while rendering: Tried logout_user in module hcp.views. Error was: 'module' object has no attribute 'logout_user' Request Method: GET Request URL:http:/

Re: Multiple Choice Quiz

2012-03-11 Thread Shawn Milochik
I think I'd do this: Models: Question question text Answer question foreign key answer text correct (boolean) Guess user foreign key answer foreign key That should be all you need (along with the User model or your own method of tra

MyArea Code | Need some help please | New message framework | DeprecationWarning: The user messaging API is deprecated. Please update your code to use the new messages framework.

2012-03-11 Thread ScriptFlow
Hi guys, I'm correcting my system, and I was having some messages from deprecated uses. But this, I'm trying to correct, unsuccessful. I'm posting my code to you try to help me. Thank you all a lot! TG def minhaarea(request, tab = False, form=False, sucesso=False, acao=False): log = logado(re

Re: Multiple Choice Quiz

2012-03-11 Thread jbr3
Thanks for responding Shawn. I guess I was thinking that if I wanted to save the user's responses and the correct answers a different model would be needed for both. On Mar 11, 4:11 pm, Shawn Milochik wrote: > I think I'd do this: > > Models: > >      Question >          question text > >      An

password_reset email template issue

2012-03-11 Thread Scott Macri
I'm having an issue with my email template for the password_reset view. For some reason I keep getting the following instead of my template text: You're receiving this e-mail because you requested a password reset for your user account at example.com. Please go to the following page and choose a

Re: password_reset email template issue

2012-03-11 Thread hack
GOT IT. admin - sites Also, you have to be careful to edit the existing example.com site and not delete it. Deleting it and creating will cause pk to be incremented and accessing the reset page will fail. On Sunday, March 11, 2012 6:30:28 PM UTC-4, hack wrote: > > I'm having an issue with my

Re: User.objects.get() doesn't return anything in unit test.

2012-03-11 Thread Russell Keith-Magee
On 11/03/2012, at 4:30 PM, RM wrote: > When my django test case executes, I'm testing my code's ability to > create a new user. But when I use the User.objects.get() method the > user isn't found. The view being tested actually creates users (I > checked it in the browser), but how do I write a t

Re: MyArea Code | Need some help please | New message framework | DeprecationWarning: The user messaging API is deprecated. Please update your code to use the new messages framework.

2012-03-11 Thread Russell Keith-Magee
On 12/03/2012, at 4:25 AM, ScriptFlow wrote: > Hi guys, I'm correcting my system, and I was having some messages from > deprecated uses. But this, I'm trying to correct, unsuccessful. I'm > posting my code to you try to help me. Thank you all a lot! TG The deprecation warning you're seeing is be

Re: password_reset email template issue

2012-03-11 Thread Bolang
You need to configure your 'sites'. You can configure it in admin page On 03/12/2012 05:30 AM, Scott Macri wrote: I'm having an issue with my email template for the password_reset view. For some reason I keep getting the following instead of my template text: You're receiving this e-mail becaus

Re: totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread Mario Gudelj
Yeah, what's the problem Suresh? On 12/03/2012 6:32 AM, "yati sagade" wrote: > What do you mean? > On 11 Mar 2012 22:06, "suresh dokania" wrote: > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > To post to this group, send e

Coding used for dropbox

2012-03-11 Thread pankaj sharma
Hello everyone, i want to know that which language and framework was used for making dropbox, and i want to make such website, so can i make it in django, if not which framework and language should i use? -- Pankaj Sharma Third Year Undergraduate Student Department of Civil Engineering Indian I

Re: Coding used for dropbox

2012-03-11 Thread Mario Gudelj
http://en.wikipedia.org/wiki/Dropbox_(service)#Technology No reason why it can't be made in Django. On 12 March 2012 16:06, pankaj sharma wrote: > Hello everyone, > i want to know that which language and framework was used for making > dropbox, > and i want to make such website, so can i make i

Re: Coding used for dropbox

2012-03-11 Thread Gath
99% python. On Mar 12, 8:29 am, Mario Gudelj wrote: > http://en.wikipedia.org/wiki/Dropbox_(service)#Technology > > No reason why it can't be made in Django. > > On 12 March 2012 16:06, pankaj sharma wrote: > > > > > > > > > Hello everyone, > > i want to know that which language and framework wa

Re: Why can't forms access the request object?

2012-03-11 Thread shacker
Thanks for the explanations Masklinn and dstuffte - this makes a lot more sense now. I guess I was thinking of this in more simplistic terms - I was assuming that a form is always invoked from a view, so naturally it would inherit the request object. I'm having trouble thinking of a use case w