Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Tomas Ehrlich
Hello, sometimes I have similar problem. Usually helps clear cache or reload page (using F5). I'm still not sure why that happens, since both develop and production versions run on different domains (localhost:8000 and mysite.com). If admin site have proper css style and only images are

Re: Django Troubleshooting

2012-10-18 Thread Lachlan Musicman
On Fri, Oct 19, 2012 at 4:07 PM, Sun Simon wrote: > https://www.djangoproject.com/download/ > > I am installing Django for Python on Win XP and came across this problem > during installation: > > > tar xzvf Django-1.4.2.tar.gz > cd Django-1.4.2 > sudo python setup.py

Django Troubleshooting

2012-10-18 Thread Sun Simon
https://www.djangoproject.com/download/ I am installing Django for Python on Win XP and came across this problem during installation: tar xzvf Django-1.4.2.tar.gz cd Django-1.4.2 sudo python setup.py install What does "cd" mean? DOes it mean that I have to use command line to type it? --

Re: loop user.get_profile displays none in a template

2012-10-18 Thread David Lee
how can I get each key and value by loop or another method? I wanna display all infomations about a model instance 在 2012年10月19日星期五UTC+8上午11时33分48秒,Matt Schinckel写道: > > user.get_profile() returns a model instance, not a dict. Model instances > have no .items() method. > > Matt. > -- You

Re: Django HTTP Basic Auth

2012-10-18 Thread Matt Schinckel
You may want to look into requests, which wraps http request-response handling in a nicer wrapper. http://pypi.python.org/pypi/requests/ Matt. On Friday, October 19, 2012 1:15:06 PM UTC+10:30, Aaron C. de Bruyn wrote: > > On Thu, Oct 18, 2012 at 6:55 PM, django >wrote: >

Re: loop user.get_profile displays none in a template

2012-10-18 Thread Matt Schinckel
user.get_profile() returns a model instance, not a dict. Model instances have no .items() method. Matt. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

loop user.get_profile displays none in a template

2012-10-18 Thread David Lee
Hi,pal ! in a template, {{ user.get_profile.user }} {{ user.get_profile.birthday }} {{ user.get_profile.name }} {% for key,value in user.get_profile.items %}{{ value }}{% endfor %} the last line doesnt work and displays none . Any guidance would be greatly appreciated. models.py: *class

Re: Django HTTP Basic Auth

2012-10-18 Thread Aaron C. de Bruyn
On Thu, Oct 18, 2012 at 6:55 PM, django wrote: > I am trying to create a Django app, one of the thing I do in that is write > a connection.py which connects to a remote server. In that connection > string I need to send one of the parameter as "http_auth = >

Django HTTP Basic Auth

2012-10-18 Thread django
I am trying to create a Django app, one of the thing I do in that is write a connection.py which connects to a remote server. In that connection string I need to send one of the parameter as "http_auth = http_auth.HTTPBasicAuth(user, password)". I am not sure how to do that in Django. I

Re: Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Dae James
Thank you. Yes, I didn't set "Alias /static/ /path/to/mysite.com/static/" in my site config. However, when I set that alias, I met another problem as the following picture. As the picture, my models don't have "Add" and "Change" button, which they have when I run this site on development

Re: Help getting my GeoDjango setup.

2012-10-18 Thread JJ Zolper
That's good advice! I forgot all about the tickets for a minute there on webfaction. I have just sent one. I just want to do it correctly because basically this database is going to have to handle everything I do. Thanks for helping to try and move my data. I'm just not that worried about

Re: Custom User class -> createsuperuser asks for Username twice

2012-10-18 Thread Russell Keith-Magee
On Fri, Oct 19, 2012 at 3:50 AM, Chris Pagnutti wrote: > Blarghh! Ok, I'm serious that I spent considerable time Googling, poring > over the contrib.auth and core files and otherwise staring at my screen to > try to fix this on my own before posting. But of course I

Re: Failed Unit tests in 1.4.2

2012-10-18 Thread Bastian Kuberek
I just cloned the master branch (1, 5, 0, 'alpha', 2) and ran the tests and they all passed. So I believe there is an issue with the packaged 1.4.2 source I downloaded. On Thursday, October 18, 2012 4:06:21 PM UTC-4, Bastian Kuberek wrote: > > Hi I am getting the following errors: > >

Re: Authentication over DJango

2012-10-18 Thread Nikolas Stevenson-Molnar
In the second scenario, HTTPS is basically giving you the same benefit; your browser gets a certificate which is either self-signed, or signed by an authority. If it's self-signed, your browser will give you a scary-looking message about not trusting the site until you add an exception (similar to

Django shopping cart example

2012-10-18 Thread Janeskil1525
Hi All I found a nice shopping cart example for Django on Djangoresources called ajax_shop_basket . It works really nice apart from the javascript function addProduct gets an 403 message´when it tries to post. I guess that's because of

Re: Help getting my GeoDjango setup.

2012-10-18 Thread Shannon Collins
Last i checked, WebFaction will set up a database for you with the PostGIS template if you submit a ticket to support. i bet they could also point to you some documentation or a forum post about what you're trying to do as well. -- You received this message because you are subscribed to the

Failed Unit tests in 1.4.2

2012-10-18 Thread Bastian Kuberek
Hi I am getting the following errors: == FAIL: test_broken_unicode (regressiontests.model_regress.tests.ModelTests) -- Traceback (most recent call last): File

Re: Custom User class -> createsuperuser asks for Username twice

2012-10-18 Thread Chris Pagnutti
Blarghh! Ok, I'm serious that I spent considerable time Googling, poring over the contrib.auth and core files and otherwise staring at my screen to try to fix this on my own before posting. But of course I figure it out two minutes after I wasted the time of anyone who actually read this

Custom User class -> createsuperuser asks for Username twice

2012-10-18 Thread Chris Pagnutti
Hi. I'm just trying out the new way to create a custom User class by extending the AbstractBaseUser class. I essentially just copied the AbstractUser and UserManager classes from auth.models and customized the fields the way I want 'em. I also set AUTH_USER_MODEL in settings appropriately.

Re: Authentication over DJango

2012-10-18 Thread Stone
Sorry for misundestanding. I will try to make clean my problem. I would like to make autentication between two servers over authorized_keys. I have program which has to possibilities 1) Console based application - this is already done and working properly. 2) Web based application - exchanging

Re: View for getting field based on value from another field

2012-10-18 Thread Bill Freeman
This may or may not be the cause, but spelling the variable in your loop exactly the same as the name of your model class feels hazzardous. Common practice would be to at least lowercase the name to use it as a variable referring to an instance. Bill On Thu, Oct 18, 2012 at 6:03 AM, Tomas

Re: Authentication over DJango

2012-10-18 Thread Nikolas Stevenson-Molnar
I'm a little unclear about your question, but if I understand correctly, you want to prevent man-in-the-middle attacks when logging into a Django application? If that's the case, then it's not really a Django issue; when you connect to a remote server via SSH, it's the /client /which does that

Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Tomas Ehrlich
Hello, have you set proper aliases in apache site config? Alias /robots.txt /path/to/mysite.com/static/robots.txt Alias /favicon.ico /path/to/mysite.com/static/favicon.ico AliasMatch ^/([^/]*\.css) /path/to/mysite.com/static/styles/$1 Alias /media/ /path/to/mysite.com/media/ Alias /static/

ordering by generic foreign key

2012-10-18 Thread Bastian
Hi, I'm not sure to understand what I'm doing here :) I have a model of a photo with name, description, image field... and a generic foreign key called 'likes' to store the photo in users' favorites: likes = generic.GenericRelation(Like) and in the Like model I have: user =

Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Dae_James
The url of the document is: https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ I can't succeed at the last part, "Serving the admin files". My admin page is as follows.

Re: How do I upgrade to 1.4.2?

2012-10-18 Thread Babatunde Akinyanmi
Add --upgrade option On 10/18/12, scottc wrote: > I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a > project. > > Can I simply *pip install django* and have everything update properly or > will that fubar my existing project? > > (Win7, Python 2.7.2,

Re: How do I upgrade to 1.4.2?

2012-10-18 Thread Tom Evans
On Thu, Oct 18, 2012 at 4:32 AM, scottc wrote: > I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a > project. > > Can I simply pip install django and have everything update properly or will > that fubar my existing project? > > (Win7, Python 2.7.2,

Re: name 'admin' is not defined

2012-10-18 Thread Nevio Vesic
There is a 'django.contrib.admin', under INSTALLED_APPS ( settings.py ) that must be enabled as well! After that I'd suggest to run `python manage.py syncdb` Best regards, Nevio On Tuesday, September 2, 2008 7:56:20 PM UTC+2, Weber Sites wrote: > > Hi > > I'm trying to follow the Tutorial02

How do I upgrade to 1.4.2?

2012-10-18 Thread scottc
I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a project. Can I simply *pip install django* and have everything update properly or will that fubar my existing project? (Win7, Python 2.7.2, django installed in a virtualenv using pip) Thanks -- You received this

Re: name 'admin' is not defined

2012-10-18 Thread Erika Pogorelc
That is not silly at all! Maybe I am a little bit since your reply helped me just now (blush)... thanks! On Tuesday, September 2, 2008 8:15:13 PM UTC+2, Ronny Haryanto wrote: > > On Wed, Sep 3, 2008 at 12:56 AM, Weber Sites > > wrote: > > I'm trying to follow the

Authentication over DJango

2012-10-18 Thread Stone
Dear users, I would like to ask you how to implement feature which is used when you are connecting over SSH from one to another machine including man in the middle attack. Example: After pressing on button it will ask me whether fingerprint is correct and after pressing on yes password window

View for getting field based on value from another field

2012-10-18 Thread Tomas Jacobsen
Hello! I have a account model, which can store up to six max_values . Those max_values ranges from 0 to 500 000. Each max_value field has a correlating percentage_value field. Im trying to write a view that finds what max_value field has a value from 0 to 5, and what number field it has,

Re: Announcing django user group switzerland

2012-10-18 Thread Stefan Foulis
Join the first «Django User Group Switzerland Meetup» on Thurs, 25.10.2012! We still need speakers - could it be you? http://goo.gl/A04hM On Tuesday, September 18, 2012 3:12:31 AM UTC+2, Stefan Foulis wrote: > > *Dear Djangonauts > > After the positive experiences at djangocon 2012 in Zürich,