Re: Cant Import mysite.urls

2012-09-13 Thread Jon Blake
Hi Patrick,
  just got Apache + mod_wsgi to serve part 1 of the tutorial as per Django 
document "How to use Django with Apache and mod_wsgi". Your point taken 
about assuming things are going to be harder than they actually are - my 
redo of part 1 of the tutorial worked pretty well "out of the box" after a 
good night's sleep.

Now to get serving the admin files to work...

On Wednesday, September 12, 2012 9:37:56 AM UTC+10, patrick wrote:
>
> On Tuesday, September 11, 2012 1:44:22 AM UTC-3, Jon Blake wrote:
>>
>> Thanks, Patrick. My reference to utils.py should have been to urls.py, 
>> which I have in my mysite app package.
>>
>> I'm seeing this import error on mysite.urls when I'm attempting to get 
>> Apache + mod_wsgi to serve my app. I don't remember seeing this error with 
>> the development server when I first tried out the tutorials. Probably got 
>> my configs wrong, somewhere in my second try.
>>
>> I'll start a new app, now that I know a little bit more about how this 
>> all works. It's a steep learning curve!
>
>
> It will get better. At one point, I found that the biggest problem I was 
> having that I was expecting things to be harder than they actually were.
>
> You might want to also take a look at the tutorials at: 
> http://lightbird.net/dbe/
>
> They were written for Django 1.2, but should still work in Django 1.4 and 
> get you to build other types of apps, so you'll get more insight into what 
> Django has to offer. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/p_822C3uc9IJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: How to Set Up for Apace and Mod_wsgi

2012-09-12 Thread Jon Blake
I'm not making any progress on this. I have redone part 1 of the Django 1.4 
tutorial, and it all works nicely with my Oracle back-end database and the 
development server. I'm now trying to progress this app to be served by 
Apache + mod_wsgi. After starting Apache, command  httpd -M lists 
wsgi_module (shared), and syntax OK. URL http://localhost/ shows the 
expected Apache test page.

I have added directive 

> WSGIScriptAlias / /home/jon/djangodemo/mysite/mysite/wsgi.py to 
> /etc/httpd/conf/httpd.conf
>
as per one example of setting up a production site server I have found, and 
restarted Apache. I've made no changes to my app's wsgi.py module at this 
point. Now, URL http://localhost/ displays a "500 Internal Server Error" 
page. The Apache error_log includes line:

> ImportError: Could not import settings 'mysite.settings' (Is it on 
> sys.path?): No module named mysite.settings
>

Any suggestions on how to get this working? There are a number of articles 
out there on how to set up a Django app for serving by Apache + mod_wsgi, 
with different instructions - confusing. I'm after a the simplest approach 
on to how to get my Django tutorial app running from a production server.

Any advice appreciated! My background is Oracle DBA/development + Python. 
Very little experience with configuring Apache.

Regards,
  Jon

On Friday, September 7, 2012 4:43:09 PM UTC+10, Jon Blake wrote:
>
>  On 09/03/2012 04:46 PM, Michael Crawford wrote: 
>
> Basically the entry in the httpd.conf file points to the dejango.wsgi 
> file.  Instead of apache/django.wsgi, point it to the location of yours.  I 
> did the same since django now creates a default wsgi file when you create 
> the project.   
>
>  Those entries can go anywhere in the file as long as they are not 
> embedded in any other tags.
>
>  Those mod wsgi modules are probably the same.   In my version the logs 
> for the module are written to the standard apache error log so you might 
> have a look in there if it doesn't start up correctly.
>
>  It sounds like your version of apache uses the httpd.conf file for 
> turning the modules on and off.  If I remember correctly from configuring 
> mod_php in the past there may be something you have to do to actually turn 
> the mod on in your particular configuration.   In ubuntu it doesn't use the 
> conf file for this purpose, the mere presence of the module in the 
> appropriate place turns it on.   If it doesn't appear to be turning on, I 
> would suggest googling how to turn on mod_php as it should be the same type 
> of thing I would assume.   
>
>  Mike
>
>  
>  On Sep 3, 2012, at 2:36 AM, Jon Blake <jc.b...@gmail.com > 
> wrote:
>
> Thanks, Mike, that fills in the gaps. 
>
> Eddy Chan's notes discusses file apache/django.wsgi. This appears somewhat 
> similar to wsgi.py in my project package - how do these two files relate to 
> each other? And the entries in httpd.conf - they can go pretty well 
> anywhere?
>
> Eddy's notes refer to installing Apache2, along with libapache2-mod-wsgi. 
> Is libapache2-mod-wsgi something different from the mod_wsgi 3.2 package I 
> have already installed? 
>
> TIA, Jon
>
> On Monday, September 3, 2012 3:06:19 PM UTC+10, dalupus wrote: 
>>
>>
>> http://eddychan.com/post/18484749431/minimum-viable-ops-deploying-your-first-django-app-to
>>  
>>
>>  Have a look at this post.   I followed it friday and now have a working 
>> django install on ubuntu.  Steps should be almost the same for fedora.
>>
>>  Mike
>>
>>  
>>  On Sep 3, 2012, at 1:01 AM, Jon Blake <jc.b...@gmail.com> wrote:
>>
>> I've worked through parts 1 and 2 of the tutorial using the development 
>> server, and I have reviewed the doco on how to use Django with Apache and 
>> mod_wsgi. I want to trial a production environment on my Fedora 14 dev box, 
>> but the provided instructions assume some familiarity with configuring the 
>> Apache environment.
>>
>> I have Apache/2.2.17 (Unix) installed on my development box and I have 
>> installed package mod_wsgi-3.2-2.fc14 (x86-64), but I'm not sure where to 
>> go from here. Can anyone point me to a a concrete example of file edits 
>> (eg, httpd.conf, wsgi.conf) I need to do to set up Apache and mod_wsgi to 
>> serve my application? I have a path to the application package, and I want 
>> URL http://localhost/polls/ to run it.
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/Ai8swKtJnooJ.
>> To post to this group, send email to django...@

Re: Possible spam from mailing list? ("China Mobile")

2012-09-12 Thread Jon Blake
I've had a coup[le of these, now.

On Tuesday, September 11, 2012 5:27:59 AM UTC+10, Kurtis wrote:
>
> I just received a very unusual e-mail that included a recent post's 
> subject. The post in question was: "Re: form doesn't validate when trying 
> to upload file". It was sent directly to my email address; by-passing the 
> User Group.
>
> Google roughly translated this email as coming from "China Mobile" and 
> included the domain "139.com". Has anyone else seen this sort of thing? 
> Unfortunately, I am unable to read the language and the Google Translation 
> isn't very clear; but it's definitely displayed using a very clean and 
> fancy template. I'm not sure if it's spam or something else.
>
> Just figured I'd see if anyone else has gotten an email similar to this. 
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/yZnQCJfOEekJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Cant Import mysite.urls

2012-09-10 Thread Jon Blake
Thanks, Patrick. My reference to utils.py should have been to urls.py, 
which I have in my mysite app package.

I'm seeing this import error on mysite.urls when I'm attempting to get 
Apache + mod_wsgi to serve my app. I don't remember seeing this error with 
the development server when I first tried out the tutorials. Probably got 
my configs wrong, somewhere in my second try.

I'll start a new app, now that I know a little bit more about how this all 
works. It's a steep learning curve!


On Tuesday, September 11, 2012 10:59:02 AM UTC+10, patrick wrote:
>
> On Monday, September 10, 2012 8:29:12 PM UTC-3, Jon Blake wrote:
>>
>> Working through getting Django to work with Apache, mod_wsgi and Oracle 
>> database back end. When I enter my site URL, I get a "ImportError at /" 
>> page, with an exception value of "No module named mysite.urls".
>>
>> Part 3 of the tutorial refers to line ROOT_URLCONF = 'mysite.urls', which 
>> I have in my settings.py module. I don't have a file mysite.urls. The 
>> tutorial then goes on to discuss editing utls.py, (which I do have) and 
>> states that Django will load this module (utils.py) because ROOT_URLCONF 
>> points to it. I don't understand that bit - what's the connection between 
>> mysite.urls and utils.py, and how does Django import mysite.urls if it does 
>> not exist?
>>
>
>
> It can be a bit confusing the first time you run into it, but 
> "mysite.urls" isn't a file. It's a namespaced import path. So in this case, 
> it is looking for an urls.py file in the mysite directory.
>
> In the tutorial it's assumed that you named your project mysite. If you 
> called it something else (say tutorial), the import path would be 
> "tutorial.urls".
>
> If you are using Django 1.4 and followed the tutorial by using the 
> django-admin.py startproject command (which builds a project skeleton for 
> you), the urls.py file should be in the same directory as your settings.py 
> file.
>
> I couldn't find a reference to utils.py in the tutorial so I assume it 
> must be an accidental typo and probably the cause of the error you're 
> seeing.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/C02LpMhCyaAJ.
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 
http://groups.google.com/group/django-users?hl=en.



Cant Import mysite.urls

2012-09-10 Thread Jon Blake
Working through getting Django to work with Apache, mod_wsgi and Oracle 
database back end. When I enter my site URL, I get a "ImportError at /" 
page, with an exception value of "No module named mysite.urls".

Part 3 of the tutorial refers to line ROOT_URLCONF = 'mysite.urls', which I 
have in my settings.py module. I don't have a file mysite.urls. The 
tutorial then goes on to discuss editing utls.py, (which I do have) and 
states that Django will load this module (utils.py) because ROOT_URLCONF 
points to it. I don't understand that bit - what's the connection between 
mysite.urls and utils.py, and how does Django import mysite.urls if it does 
not exist?

TIA,
  Jon

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/p0jhLE_JkFYJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Can't Find libclntsh.so.11.1 With Oracle Backend

2012-09-10 Thread Jon Blake
Thanks, Jani and Ian. I've used the ldconfig approach to fix this problem. 
Now getting a "ImportError at /" page, for which I'll post another question.

On Tuesday, September 11, 2012 6:15:57 AM UTC+10, Jani Tiainen wrote:
>
> I've been using ldconfig to handle libs. It's easy as runnig following few 
> commands as a root. (Though I always use oracle instantclient, it's just 
> simpler in many cases):
>
> $ echo  /oracle/product/11.1.0/db_1/**lib  > /etc/ld.so.conf.d/oracle.conf
> $ ldconfig
>
> On Mon, Sep 10, 2012 at 7:11 PM, Ian <ian.g...@gmail.com >wrote:
>
>> On Sunday, September 9, 2012 10:41:00 PM UTC-6, Jon Blake wrote:
>>>
>>> It looks like I have to tell my app what my path to libclntsh.so.11.1 
>>> is. I have added:
>>>
>>> os.environ['LD_LIBRARY_PATH'] = '/oracle/product/11.1.0/db_1/**lib'
>>>>
>>>
>>> to my app's wsgi.py file, but this does resolve my problem.
>>>
>>>
>> LD_LIBRARY_PATH has to be set before the process starts to be honored.  
>> So it's not sufficient to set it in the wsgi file with os.environ; you need 
>> to use an Apache SetEnv directive, or use a script to export it in the 
>> Apache process's environment variables when Apache is started.  Or as a 
>> third option, use ldconfig to make the Oracle library path globally visible.
>>
>> Cheers,
>> Ian
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/z8aKjhUtm3QJ.
>>
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Jani Tiainen
>
> - Well planned is half done, and a half done has been sufficient before...
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/imnCF82L9_EJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Django Tutorial

2012-09-10 Thread Jon Blake
Hi David, you might have stumbled over a problem I had when I first tried 
out the tutorial a week ago. I'm using an Oracle database back end, and on 
my first try of python manage.py syncdb, I also missed the prompt to create 
a superuser account. The problem was finally identified as a missing 
privilege for my identified database account. After granting missing 
privileges, and starting again, everything was fine. 

What back end database are you using? Is dictionary DATABASES in 
settings.py correctly edited for your installed database and user account? 
Does the account have required privileges to create objects in your 
account's schema? 

HTH, Jon

On Sunday, September 9, 2012 11:02:14 AM UTC+10, David Perez wrote:
>
> Hi,
>
> I am new to Django, I am actually starting its tutorial. On part 2 it 
> enables the admin site, but I can't log in to it. The following error comes 
> up (see at the bottom):
>
> If I remember correctly I did not get prompt to create a superuser when I 
> wrote *python manage.py syncdb*, so I am not sure if I do not have a 
> superuser. I tried to create it with *python manage.py createsuperuser 
> --username=david* but it is not working.
>
> I am most certain it is something simple...and I tried to follow the steps 
> as exact as I could. I appreciate your help.
>
> David
>
>
> DoesNotExist at /admin/
>
> Site matching query does not exist.
>
> Request Method:GETRequest URL:http://127.0.0.1:8000/admin/Django Version:
> 1.4.1Exception Type:DoesNotExistException Value:
>
> Site matching query does not exist.
>
> Exception 
> Location:/Library/Python/2.7/site-packages/django/db/models/query.py 
> in get, line 366Python Executable:/usr/bin/pythonPython Version:2.7.1Python 
> Path:
>
> ['/Users/Dperezc/Desktop/Estudios independientes/Django/Proyecto1_Poll',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
>  '/Library/Python/2.7/site-packages']
>
> Server time:Sat, 8 Sep 2012 18:45:28 -0600
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VKu-Ajyx3R0J.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Can't Find libclntsh.so.11.1 With Oracle Backend

2012-09-09 Thread Jon Blake
Just an edit to my original post: ... but this does *not* resolve my 
problem. Sorry for any confusion.

On Monday, September 10, 2012 2:41:00 PM UTC+10, Jon Blake wrote:
>
> I have worked through the Django tutorial parts 1 and 2 with an Oracle 
> back end using the development server. Everything worked fine. I now want 
> to use a real server - Apache + mod_wsgi. I've got to the point where I get 
> an "Improperly Configured at /" page, which shows the following:
>
> Exception Type: ImproperlyConfigured
>> Exception Value: Error loading cx_Oracle module: libclntsh.so.11.1: 
>> cannot open shared object file: No such file or directory
>> Exception Location: 
>> /usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py in 
>> , line 46
>>
>
> Line 46 raises exception ImproperlyConfigured on a try block which imports 
> cx_Oracle.
>
> cx_Oracle is properly installed. In my desktop environment:
>
> $ python
>> >>> import cx_Oracle
>>
>
> works fine. I also export LD_LIBRARY_PATH which points to where 
> libclntsh.so.11.1 resides. If I clear this environment
> variable, import cx_Oracle fails with:
>
> ImportError: libclntsh.so.11.1: cannot open shared object file: No such 
>> file or directory
>>
>
> It looks like I have to tell my app what my path to libclntsh.so.11.1 is. 
> I have added:
>
> os.environ['LD_LIBRARY_PATH'] = '/oracle/product/11.1.0/db_1/lib'
>>
>
> to my app's wsgi.py file, but this does resolve my problem.
>
> Can anyone assist with how to progress this?
>
> Environment:
>   O/S: Fedora14
>   Apache: 2.2.17
>   Python: 2.7
>   mod_wsgi: 3.2
>   cx_Oracle: 5.1
>   Django: 1.4.1
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/icR_sZguPy8J.
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 
http://groups.google.com/group/django-users?hl=en.



Can't Find libclntsh.so.11.1 With Oracle Backend

2012-09-09 Thread Jon Blake
I have worked through the Django tutorial parts 1 and 2 with an Oracle back 
end using the development server. Everything worked fine. I now want to use 
a real server - Apache + mod_wsgi. I've got to the point where I get an 
"Improperly Configured at /" page, which shows the following:

Exception Type: ImproperlyConfigured
> Exception Value: Error loading cx_Oracle module: libclntsh.so.11.1: 
> cannot open shared object file: No such file or directory
> Exception Location: 
> /usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py in 
> , line 46
>

Line 46 raises exception ImproperlyConfigured on a try block which imports 
cx_Oracle.

cx_Oracle is properly installed. In my desktop environment:

$ python
> >>> import cx_Oracle
>

works fine. I also export LD_LIBRARY_PATH which points to where 
libclntsh.so.11.1 resides. If I clear this environment
variable, import cx_Oracle fails with:

ImportError: libclntsh.so.11.1: cannot open shared object file: No such 
> file or directory
>

It looks like I have to tell my app what my path to libclntsh.so.11.1 is. I 
have added:

os.environ['LD_LIBRARY_PATH'] = '/oracle/product/11.1.0/db_1/lib'
>

to my app's wsgi.py file, but this does resolve my problem.

Can anyone assist with how to progress this?

Environment:
  O/S: Fedora14
  Apache: 2.2.17
  Python: 2.7
  mod_wsgi: 3.2
  cx_Oracle: 5.1
  Django: 1.4.1

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/wyRYrwZnIVwJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: How to Set Up for Apace and Mod_wsgi

2012-09-03 Thread Jon Blake
Thanks, Mike. I'll get back to this next Friday. Assistance much 
appreciated.

Jon

On Monday, September 3, 2012 4:47:16 PM UTC+10, dalupus wrote:
>
> Basically the entry in the httpd.conf file points to the dejango.wsgi 
> file.  Instead of apache/django.wsgi, point it to the location of yours.  I 
> did the same since django now creates a default wsgi file when you create 
> the project.   
>
> Those entries can go anywhere in the file as long as they are not embedded 
> in any other tags.
>
> Those mod wsgi modules are probably the same.   In my version the logs for 
> the module are written to the standard apache error log so you might have a 
> look in there if it doesn't start up correctly.
>
> It sounds like your version of apache uses the httpd.conf file for turning 
> the modules on and off.  If I remember correctly from configuring mod_php 
> in the past there may be something you have to do to actually turn the mod 
> on in your particular configuration.   In ubuntu it doesn't use the conf 
> file for this purpose, the mere presence of the module in the appropriate 
> place turns it on.   If it doesn't appear to be turning on, I would suggest 
> googling how to turn on mod_php as it should be the same type of thing I 
> would assume.   
>
> Mike
>
>
> On Sep 3, 2012, at 2:36 AM, Jon Blake <jc.b...@gmail.com > 
> wrote:
>
> Thanks, Mike, that fills in the gaps. 
>
> Eddy Chan's notes discusses file apache/django.wsgi. This appears somewhat 
> similar to wsgi.py in my project package - how do these two files relate to 
> each other? And the entries in httpd.conf - they can go pretty well 
> anywhere?
>
> Eddy's notes refer to installing Apache2, along with libapache2-mod-wsgi. 
> Is libapache2-mod-wsgi something different from the mod_wsgi 3.2 package I 
> have already installed? 
>
> TIA, Jon
>
> On Monday, September 3, 2012 3:06:19 PM UTC+10, dalupus wrote:
>>
>>
>> http://eddychan.com/post/18484749431/minimum-viable-ops-deploying-your-first-django-app-to
>>
>> Have a look at this post.   I followed it friday and now have a working 
>> django install on ubuntu.  Steps should be almost the same for fedora.
>>
>> Mike
>>
>>
>> On Sep 3, 2012, at 1:01 AM, Jon Blake <jc.b...@gmail.com> wrote:
>>
>> I've worked through parts 1 and 2 of the tutorial using the development 
>> server, and I have reviewed the doco on how to use Django with Apache and 
>> mod_wsgi. I want to trial a production environment on my Fedora 14 dev box, 
>> but the provided instructions assume some familiarity with configuring the 
>> Apache environment.
>>
>> I have Apache/2.2.17 (Unix) installed on my development box and I have 
>> installed package mod_wsgi-3.2-2.fc14 (x86-64), but I'm not sure where to 
>> go from here. Can anyone point me to a a concrete example of file edits 
>> (eg, httpd.conf, wsgi.conf) I need to do to set up Apache and mod_wsgi to 
>> serve my application? I have a path to the application package, and I want 
>> URL http://localhost/polls/ to run it.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/Ai8swKtJnooJ.
>> To post to this group, send email to django...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/Jeuh5iHKhScJ.
> To post to this group, send email to django...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> django-users...@googlegroups.com .
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/QzxJpUAcZjYJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: How to Set Up for Apace and Mod_wsgi

2012-09-03 Thread Jon Blake
Thanks, Mike, that fills in the gaps. 

Eddy Chan's notes discusses file apache/django.wsgi. This appears somewhat 
similar to wsgi.py in my project package - how do these two files relate to 
each other? And the entries in httpd.conf - they can go pretty well 
anywhere?

Eddy's notes refer to installing Apache2, along with libapache2-mod-wsgi. 
Is libapache2-mod-wsgi something different from the mod_wsgi 3.2 package I 
have already installed? 

TIA, Jon

On Monday, September 3, 2012 3:06:19 PM UTC+10, dalupus wrote:
>
>
> http://eddychan.com/post/18484749431/minimum-viable-ops-deploying-your-first-django-app-to
>
> Have a look at this post.   I followed it friday and now have a working 
> django install on ubuntu.  Steps should be almost the same for fedora.
>
> Mike
>
>
> On Sep 3, 2012, at 1:01 AM, Jon Blake <jc.b...@gmail.com > 
> wrote:
>
> I've worked through parts 1 and 2 of the tutorial using the development 
> server, and I have reviewed the doco on how to use Django with Apache and 
> mod_wsgi. I want to trial a production environment on my Fedora 14 dev box, 
> but the provided instructions assume some familiarity with configuring the 
> Apache environment.
>
> I have Apache/2.2.17 (Unix) installed on my development box and I have 
> installed package mod_wsgi-3.2-2.fc14 (x86-64), but I'm not sure where to 
> go from here. Can anyone point me to a a concrete example of file edits 
> (eg, httpd.conf, wsgi.conf) I need to do to set up Apache and mod_wsgi to 
> serve my application? I have a path to the application package, and I want 
> URL http://localhost/polls/ to run it.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/Ai8swKtJnooJ.
> To post to this group, send email to django...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> django-users...@googlegroups.com .
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Jeuh5iHKhScJ.
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 
http://groups.google.com/group/django-users?hl=en.



How to Set Up for Apace and Mod_wsgi

2012-09-02 Thread Jon Blake
I've worked through parts 1 and 2 of the tutorial using the development 
server, and I have reviewed the doco on how to use Django with Apache and 
mod_wsgi. I want to trial a production environment on my Fedora 14 dev box, 
but the provided instructions assume some familiarity with configuring the 
Apache environment.

I have Apache/2.2.17 (Unix) installed on my development box and I have 
installed package mod_wsgi-3.2-2.fc14 (x86-64), but I'm not sure where to 
go from here. Can anyone point me to a a concrete example of file edits 
(eg, httpd.conf, wsgi.conf) I need to do to set up Apache and mod_wsgi to 
serve my application? I have a path to the application package, and I want 
URL http://localhost/polls/ to run it.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Ai8swKtJnooJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-31 Thread Jon Blake
Thanks, Ian, I did miss that. Bookmarked for future reference.

On Saturday, September 1, 2012 3:16:38 PM UTC+10, Ian wrote:
>
> On Fri, Aug 31, 2012 at 10:03 PM, Jon Blake <jc.b...@gmail.com> 
> wrote: 
> > Querying column timestamp of view user_objects for tables, sequences and 
> > triggers appears to confirm my understanding of what base.py does. I'll 
> drop 
> > and recreate my user account, and try again. I'll advise how this goes. 
> Does 
> > the Django doco have any specific documentation for the Oracle back end? 
> If 
> > so, I missed it! I'm happy to provide specific doco for the Oracle back 
> end 
> > if that would assist... 
>
> Yes, please see: 
>
> https://docs.djangoproject.com/en/1.4/ref/databases/#oracle-notes 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/cs7WQZmkJGQJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-31 Thread Jon Blake
I've just dropped and re-created my user account with required privileges, 
and all has gone as expected. Table auth_permission has 18 rows.

At the point where I'm prompted to create a superuser account, I made the 
mistake of resizing my terminal window, which resulted in exception 
EOFError being raised on the call to raw_input() in procedure 
create_superuser(). Sigh, and start again... This exception can be handled 
by calling raw_input() in a try block, and handling exception EOFError by 
(for example) shifting the cursor up one row by printing chr(27) +'[A' . 
HTH.

Again, many thanks. I'm on my way with Django - looking like a great 
framework!
  Jon

On Saturday, September 1, 2012 2:03:42 PM UTC+10, Jon Blake wrote:
>
> Thanks, Ian and Amyth, for your responses.
>
> I encountered the CREATE TRIGGER privilege issue early in my trials with 
> Django with the Oracle database back end - Django propagated an Oracle 
> "insufficient privileges" exception. That was quickly sorted by granting 
> the required privilege to my user account.
>
> On looking at ticket #17015 you pointed me to, it looks like I might have 
> stumbled over the same issue as in the reply to ikelly. My user did not 
> have the CREATE TRIGGER privilege the first time I tried to run syncdb, but 
> did have the CREATE_TABLE and CREATE_SEQUENCE privileges. After granting 
> the missing privilege and running syncdb again, I then got the ORA-01400 
> exception on table auth_permission.
>
> I'm guessing that the first table that oracle back end base.py creates is 
> auth_permission, and that the table and its primary key sequence were 
> successfully created, because the user had the required privileges. Module 
> base.py then terminated on attempting to create the trigger for the table. 
> After granting CREATE TRIGGER and running syncdb again, base.py noted that 
> table auth_permission exists, so nothing more needed to be done for that 
> table. Module base.py then went on and created the remaining tables, 
> sequences and triggers. Missing trigger auth_permission_tr -> no primary 
> key raised from auth_permission_sq -> ORA-01400 on table auth_permission 
> inserts.
>
> Querying column timestamp of view user_objects for tables, sequences and 
> triggers appears to confirm my understanding of what base.py does. I'll 
> drop and recreate my user account, and try again. I'll advise how this 
> goes. Does the Django doco have any specific documentation for the Oracle 
> back end? If so, I missed it! I'm happy to provide specific doco for the 
> Oracle back end if that would assist...
>
> Once again, many thanks
>
> Jon
>
>
> On Saturday, September 1, 2012 1:23:28 AM UTC+10, Ian wrote:
>>
>> On Friday, August 31, 2012 12:10:54 AM UTC-6, Amyth wrote:
>>>
>>> Hey Jon,
>>>
>>> I guess this is because of a bug in django. Django already has a open 
>>> ticket for this bug. Check it out 
>>> here<https://code.djangoproject.com/ticket/17015>
>>> . 
>>>
>>>
>> As described in that ticket, the reason for the problem is probably just 
>> that the Django user does not have the CREATE TRIGGER privilege, which it 
>> needs.  The bug in Django is just that this condition is not detected and 
>> reported at the time the table is created, instead of getting a rather more 
>> obscure error message at the time the table is populated.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/MrFmP3gYrF0J.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-31 Thread Jon Blake
Thanks, Ian and Amyth, for your responses.

I encountered the CREATE TRIGGER privilege issue early in my trials with 
Django with the Oracle database back end - Django propagated an Oracle 
"insufficient privileges" exception. That was quickly sorted by granting 
the required privilege to my user account.

On looking at ticket #17015 you pointed me to, it looks like I might have 
stumbled over the same issue as in the reply to ikelly. My user did not 
have the CREATE TRIGGER privilege the first time I tried to run syncdb, but 
did have the CREATE_TABLE and CREATE_SEQUENCE privileges. After granting 
the missing privilege and running syncdb again, I then got the ORA-01400 
exception on table auth_permission.

I'm guessing that the first table that oracle back end base.py creates is 
auth_permission, and that the table and its primary key sequence were 
successfully created, because the user had the required privileges. Module 
base.py then terminated on attempting to create the trigger for the table. 
After granting CREATE TRIGGER and running syncdb again, base.py noted that 
table auth_permission exists, so nothing more needed to be done for that 
table. Module base.py then went on and created the remaining tables, 
sequences and triggers. Missing trigger auth_permission_tr -> no primary 
key raised from auth_permission_sq -> ORA-01400 on table auth_permission 
inserts.

Querying column timestamp of view user_objects for tables, sequences and 
triggers appears to confirm my understanding of what base.py does. I'll 
drop and recreate my user account, and try again. I'll advise how this 
goes. Does the Django doco have any specific documentation for the Oracle 
back end? If so, I missed it! I'm happy to provide specific doco for the 
Oracle back end if that would assist...

Once again, many thanks

Jon


On Saturday, September 1, 2012 1:23:28 AM UTC+10, Ian wrote:
>
> On Friday, August 31, 2012 12:10:54 AM UTC-6, Amyth wrote:
>>
>> Hey Jon,
>>
>> I guess this is because of a bug in django. Django already has a open 
>> ticket for this bug. Check it out 
>> here
>> . 
>>
>>
> As described in that ticket, the reason for the problem is probably just 
> that the Django user does not have the CREATE TRIGGER privilege, which it 
> needs.  The bug in Django is just that this condition is not detected and 
> reported at the time the table is created, instead of getting a rather more 
> obscure error message at the time the table is populated.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/LXuXcxvnlnkJ.
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 
http://groups.google.com/group/django-users?hl=en.



Re: Instaling django

2012-08-30 Thread Jon Blake
What O/S?

I installed Django 1.4.1 today on my Linux F14 box today by:

1. Downloading Django-1.4.1.tar.gz from 
https://www.djangoproject.com/download/
2. As root:
# tar xzvf Django-1.4.1.tar.gz
# cd Django-1.4.1
# python setup.py install
# exit
3. Test it:
$ python
>>> import django
>>> print django.get_version()
1.4.1

HTH,
  Jon

On Thursday, August 30, 2012 4:28:40 PM UTC+10, Balle wrote:
>
> Hi,  I have been trying to download django with every options but when i 
> run pyhton on the terminal and then asks to import django.  It always says 
> no mudule named django.  Could you pls help, donload it.  Thank you in 
> advance
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Q47WcAEp6vMJ.
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 
http://groups.google.com/group/django-users?hl=en.



Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-30 Thread Jon Blake
Just discovered Django and trying out the Django 1.4 tutorial with an 
Oracle backend database. In my database, I have created user django with 
privs create session, create table, create sequence, create trigger. The 
DATABASES dictionary in settings has been edited to set the default 
settings to the Oracle engine, and the database name, user and password 
specified.

When I run:

$ python manage.py syncdb

I see tables are created, but I also get a traceback ending with:

File "/usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 675, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.IntegrityError: ORA-01400: cannot insert NULL into 
("DJANGO"."AUTH_PERMISSION"."ID")

I did not see a prompt to create a superuser account.

Oracle SQL*Developer shows that schema django contains 9 tables (including 
auth_permission), 16 indexes, 7 triggers and 8 sequences. Table 
django_content_type contains three rows, and the others are empty.

Can anyone advise on how to resolve the ORA-01400 error?

Run-time environment:
  O/S: Fedora 14
  Django: 1.4.1
  Python: 2.7
  DB: Oracle Database 11.1.0.6.0
  cx_Oracle client: 11.1.0.6.0



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/O5XePWI1ee4J.
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 
http://groups.google.com/group/django-users?hl=en.