Re: deploy ?

2013-10-12 Thread Diogene Laerce



Have you enabled the necessary WSGI modules in Apache and performed
the necessary configuration? You have to remember that the Django
python files need an application server to compile and process. Apache
out of the box doesn't do that. mod_wshi is one option.


I guess you mean mod_wsgi cos I didn't find info on wshi. :)

Anyway I solved the problem : django pointed the url on localhost root. I
tried every combination of urls before except this one.


The others are using Nginx as a reverse proxy to the Gunicorn
application server.


I had a look on those and I'd like to be sure of what I understood : I can
use 2 http servers, gunicorn for dynamic contents and nginx for static
contents. And all that, through a virtual environment (my workstation :
debian squeeze) served by pythonbrew. Yes ?

But I saw that some people use uwsgi too, on their website they say it
is for hosting purpose. So unless I need to run multiples domain names
on the same host, I do not need it, do I ?

Thank you

--
“One original thought is worth a thousand mindless quotings.”
“Le vrai n'est pas plus sûr que le probable.”

  Diogene Laerce

--
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52590D85.1050304%40yahoo.fr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Looking for experienced Django Developers

2013-10-12 Thread Team UK
Oscar, send us your email with your cv

On Friday, October 11, 2013 8:05:34 PM UTC+1, Oscar Carballal wrote:
>
> Ok, where should I send my CV? :)
>
>
> 2013/10/11 Team UK >
>
>> Remotely and Local applicants accepted. I can't really give you a 
>> detailed job description because we are working on multiple projects.
>>
>>
>> On Friday, October 11, 2013 7:52:18 PM UTC+1, Oscar Carballal wrote:
>>
>>> Any more information about the job? Is remote available? Any other 
>>> requirements?
>>>
>>> I'm interested in it btw.
>>>
>>>
>>> 2013/10/11 Team UK 
>>>
 **

 Freelance Django developers. 2 years minimum experience  required in 
 Django/python, CSS, HTML5, Bootstrap and JS backbone.

 Candidates will go through screening before hire.




 **

 -- 
 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 django-users...@**googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/django-users
 .
 To view this discussion on the web visit https://groups.google.com/d/**
 msgid/django-users/bfcd7243-**5631-4d58-a01f-cec65d2f574f%**
 40googlegroups.com
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .

>>>
>>>  -- 
>> 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 django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/bfd9061b-000b-4b12-8390-ff636074d925%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/151f4ec4-1d07-4274-9ee0-4622989b453d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


New Feature

2013-10-12 Thread jasvir singh
Hello everyone.

I am new to this mailing list, but have a long relationship with django.
I want to add something new to django, a new package to django.
Please suggest me to do something creative.
Previously I was thinking to create a package to embed youtube videos, but
packages for same already exist. Same thing happened with chatting package.
I want to create a new package.
Please suggest me something.
-- 
Mr. Singh

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANJu%3DjFHGjVp%3Dv05zz4XJuRp9rFccSHg8wRcDAkpDMU1RKX6bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to add CSRF to context when using test client???

2013-10-12 Thread Pratik Mandrekar
I'm getting a 401 (Which is technically an Authorization error) after doing 
this.

c = Client(enforce_csrf_checks=True)

response = c.get(a_url_that_requires_login)

csrfmiddlewaretoken =  '%s' %response.context['csrf_token']

response = c.post(url, data=json.dumps(body), 
content_type='application/json', X_CSRFToken = csrfmiddlewaretoken)


I also tried with/without updating the session with the token

c.session.update({'csrftoken': csrfmiddlewaretoken})


Any idea why there might be an authorization error?

My permissions are loaded fine from the fixtures.

Thanks,

Pratik

On Thursday, August 25, 2011 9:24:38 AM UTC+5:30, Matteius wrote:
>
> Thanks for both suggestions, I recently tried this approach and 
> reached success when I ran my tests.  So I think this is the correct 
> approach and I'll include this CSRF style testing with my test suite 
> now. 
>
> -Matteius 
>
> On Jul 7, 6:02 am, Craig Blaszczyk  wrote: 
> > csrf_token is a proxy object not a string. 
> > 
> > Try doing: 
> > csrf_token = '%s' % response.context['csrf_token']

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e7d47ed4-fbe1-4206-b4ae-dfd9500650f7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Official Django tutorial 3: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.

2013-10-12 Thread dvghana
Hi everyone,
I'm following the official django tutorials to learn Django by building the 
polls app...

Everything seemed great until chapter 3.

I had this link as part of my index template, which was working fine:

{{ poll.question }}

however, this is hardcoded and the tutorial suggested a better way was to 
use:

{{ poll.question }}

so that you'll be better of when dealing with huge number of templates and 
u have to make changes to the url.

Since I made the above change I get the following errors when I run the app:
Exception Type:NoReverseMatchException Value:

Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not 
found.


Usually I could easily read where the error is coming from and deal with it 
but in this case I can't spot the cause of the error hence I'm unable to 
progress with my study.
Any help will be greatly appreciated.



-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c33a669a-ff0e-44cf-b95a-93296e71150c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: New Feature

2013-10-12 Thread Rich Haase
As with all software the best solutions are written to solve a problem that 
bugs the developer.  Find something that you find troublesome on a regular 
basis, then code a solution.

Sent from my iPhone

> On Oct 12, 2013, at 12:26 AM, jasvir singh  
> wrote:
> 
> Hello everyone.
> 
> I am new to this mailing list, but have a long relationship with django.
> I want to add something new to django, a new package to django.
> Please suggest me to do something creative. 
> Previously I was thinking to create a package to embed youtube videos, but 
> packages for same already exist. Same thing happened with chatting package.
> I want to create a new package.
> Please suggest me something.
> -- 
> Mr. Singh
> -- 
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CANJu%3DjFHGjVp%3Dv05zz4XJuRp9rFccSHg8wRcDAkpDMU1RKX6bw%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5E90CD2D-B9E4-446D-B09E-C012CBCD4A0E%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Django 1.5 tutorial, part 1

2013-10-12 Thread Enrico Battiston
Hi, i'm a first time user and i'm experiencing an error in the first part 
of the django 1.5 tutorial.
At the "Activating models" paragraph when i execute the command line "*python 
manage.py sql polls*" it return me: "ImportError: No module named pools".
Here the section INSTALLED_APPS of setting.py:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'pools',
)

Here the content of models.py:

from django.db import models

# Create your models here.
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)

Here what i've in return if i execute "*python manage.py shell --traceback*
":

Traceback (most recent call last):
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
 
line 222, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
 
line 250, in execute
translation.activate('en-us')
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/__init__.py",
 
line 90, in activate
return _trans.activate(language)
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
 
line 183, in activate
_active.value = translation(language)
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
 
line 172, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
 
line 154, in _fetch
app = import_module(appname)
  File 
"/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/importlib.py",
 
line 35, in import_module
__import__(name)
ImportError: No module named pools

Here  what i've in return for the command line "*django-admin.py version*": 
"1.5"
And for the "*python --version*": "Python 2.7.3"

What to do?

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/35db6d08-f0b1-477a-9f68-1fd32c264878%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


403 Forbidden and jasig cas integration

2013-10-12 Thread skyred81
Hi every body,

I have installe the stable version of jasig cas 3.5.2 on a tomcat server and
i am trying to integrate it with a django application.
here is a snapshot of my settings:

jasig cas : version 3.5.2 (default configuration, authentifation with same
user/password:  admin/admin)


I am using the django-cas implementation:
https://github.com/KTHse/django-cas2

in my django application i have the following settings:

CAS_SERVER_URL= 'https://xxx..com:8443/cas-server-webapp-3.5.2/'
CAS_SERVICE_URL='http://localhost:8000'
CAS_LOGOUT_COMPLETELY=True
CAS_SINGLE_SIGN_OUT=True
CAS_RENEW=False
CAS_GATEWAY=False
CAS_REDIRECT_URL='/homePage'
CAS_IGNORE_REFERER=False
CAS_RETRY_LOGIN=False
CAS_AUTO_CREATE_USERS=False
CAS_EXTRA_LOGIN_PARAMS=None
CAS_PROXY_CALLBACK=None


and i have the following url mapped: 

url(r'^dologin/$', 'django_cas.views.login'),
url(r'^dologout/$', 'django_cas.views.logout'),

i have a url called homePage which redirect me to another view.

@login_required
def homePage(request):
#print "homePage"
return  dashboardPage(request)


finally to test the setup : i'm trying to connect to my application with :  
 

   http://localhost:8000/dologin

which redirect me the cas authentification page , after that i'm being
redirected to my homePage but i'm receiving a ' HTTP 403 error forbidden' ,
and the following url:

http://localhost:8000/dologin/?next=%2FhomePage&ticket=ST-1-CxrtTYycarg3d9XNbhXo-cas01.example.org

is contained within the browser.

NB; i have to switch my configuration with https instead of http so that cas
could work correctly , but i'm still having the same error.

And thanks



--
View this message in context: 
http://python.6.x6.nabble.com/403-Forbidden-and-jasig-cas-integration-tp5035519.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1381596549445-5035519.post%40n6.nabble.com.
For more options, visit https://groups.google.com/groups/opt_out.


unable to access django development server on firefox/chrome

2013-10-12 Thread gitrookie
hi

I have just started to learn django. so I followed the instruction given in 
the link below. I am using ubuntu 13.04 and using python 3.3.1 in a virtual 
environment

https://docs.djangoproject.com/en/1.5/intro/tutorial01/

I ran the following command 

*python manage.py runserver*

it gave the following output 

*Validating models...

0 errors found
October 12, 2013 - 11:37:58
Django version 1.5.4, using settings 'mywebsite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.*

But I am unable to access the url http://127.0.0.1:8000/ on firefox. It 
says unable to connect

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e5580aa5-516f-4985-be1d-46f44a543d63%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: unable to access django development server on firefox/chrome

2013-10-12 Thread Vernon D. Cole
That's exactly how I do it using Firefox on my Ubuntu 13.04 workstation. I 
see nothing wrong in your explanation.

Are you trying to access it from the same computer that the development 
server is running on?  
If so, then check to see whether you have a firewall running on your 
workstation which may be blocking port 8000.  
If you are trying to see it from another computer, then your server needs 
to listen on other ports.  Try "python manage.py runserver 0.0.0.0:8000" 
--
Vernon


On Saturday, October 12, 2013 11:02:40 AM UTC-6, gitrookie wrote:
>
> hi
>
> I have just started to learn django. so I followed the instruction given 
> in the link below. I am using ubuntu 13.04 and using python 3.3.1 in a 
> virtual environment
>
> https://docs.djangoproject.com/en/1.5/intro/tutorial01/
>
> I ran the following command 
>
> *python manage.py runserver*
>
> it gave the following output 
>
> *Validating models...
>
> 0 errors found
> October 12, 2013 - 11:37:58
> Django version 1.5.4, using settings 'mywebsite.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.*
>
> But I am unable to access the url http://127.0.0.1:8000/ on firefox. It 
> says unable to connect
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e144517-b2c5-4641-8eda-6dfceb8d0bbe%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: unable to access django development server on firefox/chrome

2013-10-12 Thread Vernon D. Cole
Also make sure your browser is not trying to use a proxy.  127.0.0.1 should 
be an exception on the proxy setting.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2c60b1df-17ae-41fa-93fd-49978cbc0158%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django 1.5 tutorial, part 1

2013-10-12 Thread Vernon D. Cole
You have a spelling error in INSTALLED_APPS:  "pools" vs "polls".  You want 
a survey, not a puddle of water.
(This could be caused by an overly aggressive spelling corrector on your 
computer.)
--
Vernon

On Saturday, October 12, 2013 10:41:11 AM UTC-6, Enrico Battiston wrote:
>
> Hi, i'm a first time user and i'm experiencing an error in the first part 
> of the django 1.5 tutorial.
> At the "Activating models" paragraph when i execute the command line "*python 
> manage.py sql polls*" it return me: "ImportError: No module named pools".
> Here the section INSTALLED_APPS of setting.py:
>
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> # Uncomment the next line to enable the admin:
> # 'django.contrib.admin',
> # Uncomment the next line to enable admin documentation:
> # 'django.contrib.admindocs',
> 'pools',
> )
>
> Here the content of models.py:
>
> from django.db import models
>
> # Create your models here.
> class Poll(models.Model):
> question = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> class Choice(models.Model):
> poll = models.ForeignKey(Poll)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
>
> Here what i've in return if i execute "*python manage.py shell --traceback
> *":
>
> Traceback (most recent call last):
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>  
> line 222, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>  
> line 250, in execute
> translation.activate('en-us')
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/__init__.py",
>  
> line 90, in activate
> return _trans.activate(language)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 183, in activate
> _active.value = translation(language)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 172, in translation
> default_translation = _fetch(settings.LANGUAGE_CODE)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 154, in _fetch
> app = import_module(appname)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/importlib.py",
>  
> line 35, in import_module
> __import__(name)
> ImportError: No module named pools
>
> Here  what i've in return for the command line "*django-admin.py version*": 
> "1.5"
> And for the "*python --version*": "Python 2.7.3"
>
> What to do?
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/608a2ef0-64ea-4c77-9048-4f67307b9688%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: deploy ?

2013-10-12 Thread Lukáš Němec
You can use nxinx with uwsgi even with several domain names, nginx takes 
care of that, you just run several uwsgi/gunicorn processes on different 
tcp ports or unix sockets, and nginx will just select the one that fits 
for its domain name (set in config) of course you need to set it properly..


Anyways, when you want to host multiple python sites with 
nginx/something, I'd recommend uwsgi with supervisor .. which will help 
you manage the apps really easy ... of course you can use gunicorn 
instead of uwsgi ... it is up to you ...


Lukas


Dne 12. 10. 2013 10:51, Diogene Laerce napsal(a):



Have you enabled the necessary WSGI modules in Apache and performed
the necessary configuration? You have to remember that the Django
python files need an application server to compile and process. Apache
out of the box doesn't do that. mod_wshi is one option.


I guess you mean mod_wsgi cos I didn't find info on wshi. :)

Anyway I solved the problem : django pointed the url on localhost root. I
tried every combination of urls before except this one.


The others are using Nginx as a reverse proxy to the Gunicorn
application server.


I had a look on those and I'd like to be sure of what I understood : I can
use 2 http servers, gunicorn for dynamic contents and nginx for static
contents. And all that, through a virtual environment (my workstation :
debian squeeze) served by pythonbrew. Yes ?

But I saw that some people use uwsgi too, on their website they say it
is for hosting purpose. So unless I need to run multiples domain names
on the same host, I do not need it, do I ?

Thank you



--
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52598861.8050109%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django 1.5 tutorial, part 1

2013-10-12 Thread Enrico Battiston
Thank you, I'm lost in a glass of water.

Il giorno sabato 12 ottobre 2013 19:25:46 UTC+2, Vernon D. Cole ha scritto:
>
> You have a spelling error in INSTALLED_APPS:  "pools" vs "polls".  You 
> want a survey, not a puddle of water.
> (This could be caused by an overly aggressive spelling corrector on your 
> computer.)
> --
> Vernon
>
> On Saturday, October 12, 2013 10:41:11 AM UTC-6, Enrico Battiston wrote:
>>
>> Hi, i'm a first time user and i'm experiencing an error in the first part 
>> of the django 1.5 tutorial.
>> At the "Activating models" paragraph when i execute the command line 
>> "*python 
>> manage.py sql polls*" it return me: "ImportError: No module named pools".
>> Here the section INSTALLED_APPS of setting.py:
>>
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> # Uncomment the next line to enable the admin:
>> # 'django.contrib.admin',
>> # Uncomment the next line to enable admin documentation:
>> # 'django.contrib.admindocs',
>> 'pools',
>> )
>>
>> Here the content of models.py:
>>
>> from django.db import models
>>
>> # Create your models here.
>> class Poll(models.Model):
>> question = models.CharField(max_length=200)
>> pub_date = models.DateTimeField('date published')
>>
>> class Choice(models.Model):
>> poll = models.ForeignKey(Poll)
>> choice_text = models.CharField(max_length=200)
>> votes = models.IntegerField(default=0)
>>
>> Here what i've in return if i execute "*python manage.py shell 
>> --traceback*":
>>
>> Traceback (most recent call last):
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>>  
>> line 222, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>>  
>> line 250, in execute
>> translation.activate('en-us')
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/__init__.py",
>>  
>> line 90, in activate
>> return _trans.activate(language)
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>>  
>> line 183, in activate
>> _active.value = translation(language)
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>>  
>> line 172, in translation
>> default_translation = _fetch(settings.LANGUAGE_CODE)
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>>  
>> line 154, in _fetch
>> app = import_module(appname)
>>   File 
>> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/importlib.py",
>>  
>> line 35, in import_module
>> __import__(name)
>> ImportError: No module named pools
>>
>> Here  what i've in return for the command line "*django-admin.py version*": 
>> "1.5"
>> And for the "*python --version*": "Python 2.7.3"
>>
>> What to do?
>>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a6b1f2bd-2134-439e-a6a7-d1ff377836d1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Create form in views.py

2013-10-12 Thread Marcelo Britez
Hi, I need to create a form in a view. I wonder if that's possible. thanks

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9d609539-c5a0-451c-813e-7ae3b812d725%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Create form in views.py

2013-10-12 Thread Ovnicraft
On Sat, Oct 12, 2013 at 12:41 PM, Marcelo Britez <
britezmarceloce...@gmail.com> wrote:

> Hi, I need to create a form in a view. I wonder if that's possible. thanks
>

Hello Marcelo, is hard to help you if yo dont provide more info.

Please send here more info about and what are you trying. Help us to help
you :-).

Regards,



>  --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9d609539-c5a0-451c-813e-7ae3b812d725%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Cristian Salamea
@ovnicraft

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B16coOgyMkNqvUtgH6MT3JKqqk4L%2B-8NduTFERwvJpWf6ZHaw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Official Django tutorial 3: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.

2013-10-12 Thread Xavier Ordoquy
Hi,

It looks like you are missing the poll in your context.
{% url 'detail' poll.id %} will try to match an url named detail with the 
argument poll.id
However Django says it can't find a reverse for 'detail' with arguments ('',) 
which means that you don't have a poll in your context (or the poll.id is 
empty).
Double check that you already did the part 
https://docs.djangoproject.com/en/1.5/intro/tutorial03/#raising-a-404-error 
since the view is there and that there's no typo in the render(..., {'poll': 
poll})

Regards,
Xavier,
Linovia.

Le 12 oct. 2013 à 17:12, dvgh...@gmail.com a écrit :

> Hi everyone,
> I'm following the official django tutorials to learn Django by building the 
> polls app...
> 
> Everything seemed great until chapter 3.
> 
> I had this link as part of my index template, which was working fine:
> 
> {{ poll.question }}
> however, this is hardcoded and the tutorial suggested a better way was to use:
> 
> {{ poll.question }}
> so that you'll be better of when dealing with huge number of templates and u 
> have to make changes to the url.
> 
> Since I made the above change I get the following errors when I run the app:
> Exception Type:   NoReverseMatch
> Exception Value:  
> Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not 
> found.
> 
> Usually I could easily read where the error is coming from and deal with it 
> but in this case I can't spot the cause of the error hence I'm unable to 
> progress with my study.
> Any help will be greatly appreciated.
> 
> 
> 
> 
> -- 
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/c33a669a-ff0e-44cf-b95a-93296e71150c%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5CD1F9A1-E964-47D1-B364-EE778C69E3D7%40linovia.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django 1.5 tutorial, part 1

2013-10-12 Thread Brian Schott
Polls not pools?

—
Sent from Mailbox for iPhone

On Sat, Oct 12, 2013 at 12:58 PM, Enrico Battiston
 wrote:

> Hi, i'm a first time user and i'm experiencing an error in the first part 
> of the django 1.5 tutorial.
> At the "Activating models" paragraph when i execute the command line "*python 
> manage.py sql polls*" it return me: "ImportError: No module named pools".
> Here the section INSTALLED_APPS of setting.py:
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> # Uncomment the next line to enable the admin:
> # 'django.contrib.admin',
> # Uncomment the next line to enable admin documentation:
> # 'django.contrib.admindocs',
> 'pools',
> )
> Here the content of models.py:
> from django.db import models
> # Create your models here.
> class Poll(models.Model):
> question = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
> class Choice(models.Model):
> poll = models.ForeignKey(Poll)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
> Here what i've in return if i execute "*python manage.py shell --traceback*
> ":
> Traceback (most recent call last):
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>  
> line 222, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py",
>  
> line 250, in execute
> translation.activate('en-us')
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/__init__.py",
>  
> line 90, in activate
> return _trans.activate(language)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 183, in activate
> _active.value = translation(language)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 172, in translation
> default_translation = _fetch(settings.LANGUAGE_CODE)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py",
>  
> line 154, in _fetch
> app = import_module(appname)
>   File 
> "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/importlib.py",
>  
> line 35, in import_module
> __import__(name)
> ImportError: No module named pools
> Here  what i've in return for the command line "*django-admin.py version*": 
> "1.5"
> And for the "*python --version*": "Python 2.7.3"
> What to do?
> -- 
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/35db6d08-f0b1-477a-9f68-1fd32c264878%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1381603157716.4a343d67%40Nodemailer.
For more options, visit https://groups.google.com/groups/opt_out.


View for creating, listing, and deleting

2013-10-12 Thread plasmasheep
I'm working on a project in which on a certain page I want to have a list 
of objects as well as the ability to delete and create them. I know that 
there are class-based generic views for these things, but I don't want 
three separate pages for these operations. What would be the best way to 
have them all on one page?

I'm guessing the right way to do it is to make a new class-based view for 
viewing, deleting, and listing objects of a certain kind and then to 
subclass for every object I need to list, create, or view, but I thought 
I'd make sure that's the best way to do it first.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/44556c9b-8712-401c-b92b-62e124d1c93c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Create form in views.py

2013-10-12 Thread Marcelo Britez
(template) enter how many fields you want to create
(views.py ) from that value I need to create a dynamic form then perform 
calculations in a view



El sábado, 12 de octubre de 2013 15:15:17 UTC-3, ovnicraft escribió:
>
>
>
>
> On Sat, Oct 12, 2013 at 12:41 PM, Marcelo Britez 
> 
> > wrote:
>
>> Hi, I need to create a form in a view. I wonder if that's possible. thanks
>>
>
> Hello Marcelo, is hard to help you if yo dont provide more info.
>
> Please send here more info about and what are you trying. Help us to help 
> you :-).
>
> Regards,
>
>  
>
>>  -- 
>> 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 django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/9d609539-c5a0-451c-813e-7ae3b812d725%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Cristian Salamea
> @ovnicraft 
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b88af1c0-a80c-4494-8c31-47392c883014%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Official Django tutorial 3: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.

2013-10-12 Thread dvghana
thanks Xavier,

the problem was that I mistyped poll.id as poll_id and now it works fine.

Thanks again for your input.

Regards,
Max

On Saturday, October 12, 2013 11:30:53 AM UTC-7, Xavier Ordoquy wrote:
>
> Hi,
>
> It looks like you are missing the poll in your context.
> {% url 'detail' poll.id %} will try to match an url named detail with the 
> argument poll.id
> However Django says it can't find a reverse for 'detail' with arguments 
> ('',) which means that you don't have a poll in your context (or the 
> poll.id is empty).
> Double check that you already did the part 
> https://docs.djangoproject.com/en/1.5/intro/tutorial03/#raising-a-404-errorsince
>  the view is there and that there's no typo in the render(..., 
> {'poll': poll})
>
> Regards,
> Xavier,
> Linovia.
>
> Le 12 oct. 2013 à 17:12, dvg...@gmail.com  a écrit :
>
> Hi everyone,
> I'm following the official django tutorials to learn Django by building 
> the polls app...
>
> Everything seemed great until chapter 3.
>
> I had this link as part of my index template, which was working fine:
>
> {{ poll.question }}
>
> however, this is hardcoded and the tutorial suggested a better way was to 
> use:
>
> {{ poll.question }}
>
> so that you'll be better of when dealing with huge number of templates and 
> u have to make changes to the url.
>
> Since I made the above change I get the following errors when I run the 
> app:
> Exception Type:NoReverseMatchException Value:
>
> Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not 
> found.
>
>
> Usually I could easily read where the error is coming from and deal with 
> it but in this case I can't spot the cause of the error hence I'm unable to 
> progress with my study.
> Any help will be greatly appreciated.
>
>
>
>
> -- 
> 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 django-users...@googlegroups.com .
> To post to this group, send email to django...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/c33a669a-ff0e-44cf-b95a-93296e71150c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0ebeeae-7d93-4dce-bdc3-a90eb10da7fb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: deploy ?

2013-10-12 Thread Diogene Laerce


You can use nxinx with uwsgi even with several domain names, nginx 
takes care of that, you just run several uwsgi/gunicorn processes on 
different tcp ports or unix sockets, and nginx will just select the 
one that fits for its domain name (set in config) of course you need 
to set it properly..


Anyways, when you want to host multiple python sites with 
nginx/something, I'd recommend uwsgi with supervisor .. which will 
help you manage the apps really easy ... of course you can use 
gunicorn instead of uwsgi ... it is up to you ...


So I will go for : nginx + uwsgi + supervisor + django !

Thanks for the enlightenment !




Lukas


Dne 12. 10. 2013 10:51, Diogene Laerce napsal(a):



Have you enabled the necessary WSGI modules in Apache and performed
the necessary configuration? You have to remember that the Django
python files need an application server to compile and process. Apache
out of the box doesn't do that. mod_wshi is one option.


I guess you mean mod_wsgi cos I didn't find info on wshi. :)

Anyway I solved the problem : django pointed the url on localhost 
root. I

tried every combination of urls before except this one.


The others are using Nginx as a reverse proxy to the Gunicorn
application server.


I had a look on those and I'd like to be sure of what I understood : 
I can

use 2 http servers, gunicorn for dynamic contents and nginx for static
contents. And all that, through a virtual environment (my workstation :
debian squeeze) served by pythonbrew. Yes ?

But I saw that some people use uwsgi too, on their website they say it
is for hosting purpose. So unless I need to run multiples domain names
on the same host, I do not need it, do I ?

Thank you





--
“One original thought is worth a thousand mindless quotings.”
“Le vrai n'est pas plus sûr que le probable.”

  Diogene Laerce

--
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5259FAC3.1080208%40yahoo.fr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: View not working / how can I test it in the shell?

2013-10-12 Thread Kelvin Wong
You need to understand what ALLOWED_HOSTS does if you want to ever deploy 
your app. Please read it.

https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts

Check your settings in the shell

>>> from django.conf import settings as s
>>> s.DEBUG
True
>>> s.ALLOWED_HOSTS
['.example.com', '192.168.0.2']

If your DEBUG is False and your ALLOWED_HOSTS is an empty list [] then you 
will not get far. You will get a "SuspiciousOperation: Invalid HTTP_HOST 
header (you may need to set ALLOWED_HOSTS)" message.

You can try putting something like this into the template (pretty much 
straight from the Django blog example), and it will tell you nicely when it 
has nothing matching your query or if your db is empty:

{% block featured_posts %}
  {% if featured_posts_list %}
{% for blog_post in featured_posts_list %}
{{ blog_post.title }}

{% endfor %}
  {% else %}
No posts found
  {% endif %}
{% endblock %}

You might also want to ensure that your view is rendering the right 
template and that the template hierarchy is correct (ie. {% extends 
"my_templates/base.html" %} is at the top of your template and it is 
correct). If your parent template that you're extending doesn't have a 
block named 'featured_posts' then it won't display anywhere. You won't see 
the "No posts found" message nor will you see your list of blogs - nada.

If there is an exception in the shell, it will print out a trace. This is 
an actual Dj1.5 trace from a made up exception I planted in the view. You 
can also put objects like your queryset into the Exception message and see 
if your set is producing what you think it should be.

>>> from django.test import Client
>>> c = Client()
>>> c.get('/')

Internal Server Error: /
Traceback (most recent call last):
  File 
"/Users/kelvin/.virtualenvs/myproject/lib/python2.7/site-packages/django/core/handlers/base.py",
 
line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File 
"/Users/kelvin/.virtualenvs/myproject/lib/python2.7/site-packages/django/views/generic/base.py",
 
line 68, in view
return self.dispatch(request, *args, **kwargs)
  File 
"/Users/kelvin/.virtualenvs/myproject/lib/python2.7/site-packages/django/views/generic/base.py",
 
line 86, in dispatch
return handler(request, *args, **kwargs)
  File 
"/Users/kelvin/repos/myproject_files/myproject_repo/myproject/firstweb/views.py",
 
line 14, in get
raise Exception("Freek out!")
Exception: Freek out!



On Friday, October 11, 2013 5:25:54 PM UTC-7, Mario Osorio wrote:
>
> From the server; I am getting the page I need but the block where the data 
> from the view in question is supposed to be comes out empty.
>
> I am indeed geting the ALLOWED_HOSTS warning, which I don't fully 
> understand and don't know hoe to fix. I do have ALLOWED_HOSTS = 
> ('localhost', '.local') and DEBUG = True as I read in Rod's excellent 
> tutorial , 
> but that did not help.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/997818db-a73c-40d2-9e81-386b533609b6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: unable to access django development server on firefox/chrome

2013-10-12 Thread Kelvin Wong
You can also try this

$ python manage.py runserver 0.0.0.0:8000

You can get your IP from ifconfig, open that in a browser (it might be 
192.168.0.10, etc). You can test your site from another machine in this way

K



On Saturday, October 12, 2013 10:02:40 AM UTC-7, gitrookie wrote:
>
> hi
>
> I have just started to learn django. so I followed the instruction given 
> in the link below. I am using ubuntu 13.04 and using python 3.3.1 in a 
> virtual environment
>
> https://docs.djangoproject.com/en/1.5/intro/tutorial01/
>
> I ran the following command 
>
> *python manage.py runserver*
>
> it gave the following output 
>
> *Validating models...
>
> 0 errors found
> October 12, 2013 - 11:37:58
> Django version 1.5.4, using settings 'mywebsite.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.*
>
> But I am unable to access the url http://127.0.0.1:8000/ on firefox. It 
> says unable to connect
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/af6f9e6b-619e-4dd6-970c-0d7ab06ce9e2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.