Re: FieldError, But Only In Production

2014-02-13 Thread Javier Guerra Giraldez
On Thu, Feb 13, 2014 at 7:09 PM, Rich Jones wrote: > We're good now. No idea what the hell was happening, but this works now. > Humbling to realize how little I know about the ORM internals. are you using virtualenv? it's possible that mod_wsgi was executing in a different

Re: FieldError, But Only In Production

2014-02-13 Thread Rich Jones
Said fuck it, gave up and used Nginx + Gunicorn. We're good now. No idea what the hell was happening, but this works now. Humbling to realize how little I know about the ORM internals. Thanks for listening, R On Thu, Feb 13, 2014 at 3:13 PM, Rich Jones wrote: > > > Please

Re: Django newbie frustrated

2014-02-13 Thread Lucas Klassmann
waveride, You are alright! But he have a two erros. First, he loaded http://127.0.0.1:8000/ but dont have urls.py configured for this. Second, he loaded http://127.0.0.1:8000/admin/ and is showed a exception because 'django' not found a 'polls' application, because 'django' in recent versions,

Re: FieldError, But Only In Production

2014-02-13 Thread Rich Jones
> Please show how you are doing this. Using mod_wsgi and Apache, using I think a fairly standard .wsgi: import os, sys path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if path not in sys.path: sys.path.append(path) sys.path.append('/srv/myapp')

Re: Question about the send of file versus the django server

2014-02-13 Thread Russell Keith-Magee
On Thu, Feb 13, 2014 at 4:11 PM, simone monteleone wrote: > Hi all, > > I have to send a file (ex. csv file) to the Django server. > > I think to use the requests python module. > > Is this the best way? > The "best" way will depend on your exact requirements - I'll come

Re: FieldError, But Only In Production

2014-02-13 Thread Tom Evans
On Thu, Feb 13, 2014 at 6:00 AM, Rich Jones wrote: > Hey guys! > > I've got a real stumper here. Pulling my hair out over this one, would > really appreciate some options! > > Anywhere in my application that calls user.get_profile() causes a > FieldError.. but only in

Re: FieldError, But Only In Production

2014-02-13 Thread Rich Jones
Ah, okay, noted, although I believe this may be a bug in Django itself but want to exhaust everything before I open a ticket. -- 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

Re: FieldError, But Only In Production

2014-02-13 Thread Javier Guerra Giraldez
On Thu, Feb 13, 2014 at 5:49 PM, Rich Jones wrote: > Since this seems to happening at a pretty deep level, would it be uncouth to > kick this over do django-dev? django-dev is not 'django support, level 2'. it's about the development of the Django framework. if you have a

Re: FieldError, But Only In Production

2014-02-13 Thread Rich Jones
Since this seems to happening at a pretty deep level, would it be uncouth to kick this over do django-dev? On Thu, Feb 13, 2014 at 9:17 AM, Rich Jones wrote: > Yes, all of these things worked just fine. The code is in the _same > location_ on the _same machine_ with the

Re: List of default Django tags that are "mid-block" like else

2014-02-13 Thread C. Kirby
Not sure if this is what you mean, but: for --empty --forloop.counter/first/last/etc -- 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

Re: Django newbie frustrated

2014-02-13 Thread waverider
Is it just me or everything is actually working as expected? You're requesting http://127.0.0.1:8000/, while you define /polls/ and that tutorial specifically instructs to access http://127.0.0.1:8000/polls/ - http://andreias.ro -- You received this message because you are subscribed to the

Re: heroku better for django?

2014-02-13 Thread Malik Rumi
Are you the same Daniel Roseman that replied to a search question of mine on Stack Overflow? On Thursday, February 13, 2014 2:59:15 PM UTC-6, Daniel Roseman wrote: > > On Thursday, 13 February 2014 20:47:58 UTC, Malik Rumi wrote: >> >> Glyn, I am following your guide but when I get to LoadModule

List of default Django tags that are "mid-block" like else

2014-02-13 Thread cool-RR
Hi guys, Can someone please give me a list of default Django template tags that have "mid-block" behavior like `else`? I mean tags where instead of simply having a start tag and an end tag, you have an optional tag in the middle that divides the whole thing to blocks. I can think of: if

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Jonathan Baker
Glad you worked it out. Enjoy the rest of the tutorial! JDB On Thu, Feb 13, 2014 at 1:54 PM, Paul Sermon wrote: > OK thanks for your help. > > I've reviewed through the code, and I had a minor indentation typo that > wasn't helping! > > Anyway, I worked it down to

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks all for your help. Finally we figured out how to do it from the doc link Kirby provided. Really appreciated your help. thanks. /zhenwu On Thursday, February 13, 2014 11:20:53 AM UTC-8, zhenwu he wrote: > > > Thank you! working on it. thanks. > > /zhenwu > > On Thursday, February 13,

Re: heroku better for django?

2014-02-13 Thread Daniel Roseman
On Thursday, 13 February 2014 20:47:58 UTC, Malik Rumi wrote: > > Glyn, I am following your guide but when I get to LoadModule I have run > into 'Permission Denied'. As soon as I finished with 'make install' the > system reported back that wsgi.so was chmod 644. I tried sudo chmod o+w and > did

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Paul Sermon
OK thanks for your help. I've reviewed through the code, and I had a minor indentation typo that wasn't helping! Anyway, I worked it down to the lines self.assertContains. You see that full-stop/period at the end of the string it was looking for? That wasn't in the no polls message!

Re: heroku better for django?

2014-02-13 Thread Malik Rumi
Glyn, I am following your guide but when I get to LoadModule I have run into 'Permission Denied'. As soon as I finished with 'make install' the system reported back that wsgi.so was chmod 644. I tried sudo chmod o+w and did not get an error but I still get permission denied when trying to load

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thank you! working on it. thanks. /zhenwu On Thursday, February 13, 2014 11:06:55 AM UTC-8, C. Kirby wrote: > > Use the django deployment docs for a howto: > https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ > > On Thursday, February 13, 2014 12:58:53 PM UTC-6, zhenwu he wrote: >>

Re: how to make https work in django REST framework

2014-02-13 Thread C. Kirby
Use the django deployment docs for a howto: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ On Thursday, February 13, 2014 12:58:53 PM UTC-6, zhenwu he wrote: > > > Thanks Kirby. > > You meant merge django into apache? ok, let me see what I can do. thanks. > > /zhenwu > > On

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Kirby. You meant merge django into apache? ok, let me see what I can do. thanks. /zhenwu On Thursday, February 13, 2014 10:18:03 AM UTC-8, C. Kirby wrote: > > Zhenwu, > > You only mentioned it in passing in the last post, but did you say you are > running django in production via the

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Jonathan Baker
Cool, so we're making progress and you're using the test database now. Since you have two tests failing, I'd comment out the 2nd of the two for now and focus on getting the first to pass, and then moving on to the second. Don't try to do too much at once, and do try and understand what each

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread C. Kirby
The names of both those tests imply that your setup will fail them. (I didn't look at the test internals, so I am assuming the test names do what they say) 1. "test_index_view_with_a_future_poll" - you have future polls 2. "test_index_view_with_no_polls" - you have polls in the database On

Re: how to make https work in django REST framework

2014-02-13 Thread C. Kirby
Zhenwu, You only mentioned it in passing in the last post, but did you say you are running django in production via the manage.py runserver command? You _really_ shouldn't use runserver in production. You should be using a webserver (I guess apache in your case) and wsgi to serve up django.

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Paul Sermon
Hmm, you'r right, I think I'm getting confused and attributed the error to something it isn't. Ive just ran the test after changing all the polls to the future, and I still get the errors. The errors are as follows: == FAIL:

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Hi, Eric: After thinking further, I am a little lost. :( Here is my understanding. 1, I need have django run server running, for example, listen to port 1234 2, I enable https on apache, which is listening to 443. then I redirect all connections to 443 to port 1234 using config you provided.

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Luca. Yeah, I have https setup, but that is for UI, not for REST, the REST is purely handled by django run server port. Based on Eric's comment, it seems that I need change user to send request to apache using https, and then I need config redirect on apache to django. then django will

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Eric for your help. Basically, user has to send REST API to apache using https, and then apache redirect this call to django using http. Should I config anything on django besides configuration redirect on apache. Based on what you are saying, I do not need config anything on django

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Jonathan Baker
"setup_test_environment() installs a template renderer which will allow us to examine some additional attributes on responses such as response.context that otherwise wouldn't be available. Note

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Paul Sermon
yes I am running through the manage.py shell (although initially I did not). I am doing the section: https://docs.djangoproject.com/en/1.6/intro/tutorial05/#the-django-test-client On the response.content line, I get back a line listing the polls made earlier. And I presume that is why the

Re: FieldError, But Only In Production

2014-02-13 Thread Rich Jones
Yes, all of these things worked just fine. The code is in the _same location_ on the _same machine_ with the _same settings_ and the _same database_. The only difference is devserver vs Apache. :( On Thu, Feb 13, 2014 at 2:21 AM, Vibhu Rishi wrote: > Seems to me

Re: Login at the end of form wizard

2014-02-13 Thread Thomas Leo
Sorry I meant to say NamedUrlSessionWizardView not NamedUrlWizardView On Thursday, February 13, 2014 11:08:36 AM UTC-5, Thomas Leo wrote: > > >> when a user logs in and gets redirected to the order page the wizard > starts again from the beginning (loosing all the data inserted the first >

Re: Login at the end of form wizard

2014-02-13 Thread Thomas Leo
>> when a user logs in and gets redirected to the order page the wizard starts again from the beginning (loosing all the data inserted the first time). The issue is that in WizardView, triggering the get function causes the session to

Re: django application hosted on godaddy don't display the site models in admin page

2014-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Glad you got it sorted out, and thanks for letting us know! Cal On Thu, Feb 13, 2014 at 10:26 AM, Mironiuc Sergiu wrote: > I found the problem. > I had an "extra" (non-necessary) folder admin, that should be in the > static folder and not dirrectly in the project folder. >

Login at the end of form wizard

2014-02-13 Thread parnigot
Hello fellow django users, I'm using a form wizard (a very basic SessionWizardView) to create a simple "order page". The four steps of the wizard must be accessible to both logged in and anonymous users, but to complete an order the user must authenticate himself (think something like an

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Jonathan Baker
Are you running your tests on the command line using: $ python manage.py test polls ...or are you trying to run them from a Python shell? It'd be helpful if you could provide the internal link to the area of the page you linked to that you're experiencing the failure at, as well as the output of

Question about the send of file versus the django server

2014-02-13 Thread simone monteleone
Hi all, I have to send a file (ex. csv file) to the Django server. I think to use the requests python module. Is this the best way? Second question; Django can receive this file? And also in this case, what it is the best way? My goal is to load the csv file information in the dabatase

Re: how to make https work in django REST framework

2014-02-13 Thread Luca Corti
Il 2014-02-13 06:16 zhenwu he ha scritto: Thanks for your help, Luca. Could you elaborate a little bit? I am kind of new to this kind of thing. What I am doing is that, I am using django to redirect all url calls to python API to handle something and then return as response. you want me to

Re: django application hosted on godaddy don't display the site models in admin page

2014-02-13 Thread Mironiuc Sergiu
I found the problem. I had an "extra" (non-necessary) folder admin, that should be in the static folder and not dirrectly in the project folder. That was a confusing thing for application. Thanks to all people who tried to help me. Regards! -- You received this message because you are

Re: FieldError, But Only In Production

2014-02-13 Thread Vibhu Rishi
Seems to me somewhere in the code it is trying to put user into a field instead of treating it as a table. Basic sanity checks : - is the djagno versions on both production and local same ? - same for wsgi and apache ? - syncdb worked fine ? V. On Thu, Feb 13, 2014 at 11:30 AM, Rich Jones

Re: Django Tutorial 5 - First Tests

2014-02-13 Thread Paul Sermon
This is the tutorial: https://docs.djangoproject.com/en/1.6/intro/tutorial05/ I've followed the tutorials pretty much to the letter since tutorial one. Thanks for the help! -Paul On Wednesday, February 12, 2014 10:33:16 PM UTC, jondbaker wrote: > > You're correct in thinking that tests use a

Re: django application hosted on godaddy don't display the site models in admin page

2014-02-13 Thread Mironiuc Sergiu
I configured log. But in the log file I don't see any warning/errors about admin page. Just some selects from database regarding users and groups. But, another strange thing is that I don't have the "admin.pyc" file. So, it looks like this file is not compiled... May be that can be a

Re: how to make https work in django REST framework

2014-02-13 Thread Erik Cederstrand
Den 13/02/2014 kl. 06.16 skrev zhenwu he : > > Thanks for your help, Luca. > > Could you elaborate a little bit? I am kind of new to this kind of thing. > What I am doing is that, I am using django to redirect all url calls to > python API to handle something and then