Re: Successfully Running Command Line Application from Django

2011-08-17 Thread octopusgrabbus
xro...@gmail.com> wrote: > On Aug 15, 2:40 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > I get a file permissions error, and this is running on Apache. > > > It's dying on the retrbinary line. However, it's logging in using > > valid user names and password

Re: Successfully Running Command Line Application from Django

2011-08-15 Thread octopusgrabbus
I get a file permissions error, and this is running on Apache. It's dying on the retrbinary line. However, it's logging in using valid user names and passwords, so I'm confused as to why it's dying. def getInvRpt(id, filename, path, db): file_list = [] os.chdir('/home/amr/ics_in/')

Successfully Running Command Line Application from Django

2011-08-15 Thread octopusgrabbus
My Django application successfully executes functions belonging to user amr. I want to execute an external command line application from views.py def exec_external_cmd(cmd_line): retcode = None try: process = Popen(cmd_line, bufsize=2048, executable="/bin/ bash", shell=True,

Re: Django Admin Works With One Project But Not Second

2011-05-26 Thread octopusgrabbus
Solved. This was due to a missing directory under django/templates. On May 26, 3:04 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > There is a lot of detail for this question, so I'll summarize. I have > two Django projects, each running on a different virtual site and > u

Django Admin Works With One Project But Not Second

2011-05-26 Thread octopusgrabbus
There is a lot of detail for this question, so I'll summarize. I have two Django projects, each running on a different virtual site and using a separate wsgi_handler. The first works fine, including logging in. The second one fails with TemplateDoesNotExist registration/ login.html, but I can

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-22 Thread octopusgrabbus
Thanks for the links. On Apr 21, 11:56 pm, Oleg Lomaka <oleg.lom...@gmail.com> wrote: > On Fri, Apr 22, 2011 at 1:20 AM, octopusgrabbus > <old_road_f...@verizon.net>wrote: > > > > > Here is the pertinent code: > > > def reconcile_inv(r

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
and 2 about a possible method in the Django model that would return a list. On Apr 21, 12:37 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Here is my model (shortened for brevity). It was generated by > inspectdb. I am running Django 1.2 with mod_wsgi, on Ubuntu 10.04 a

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
:17:54 PM UTC+1, octopusgrabbus wrote: > > > I posted in the original problem. > > cs_hold_rec_list = CsInvHold.objects.filter(inventory_ok=0) > > How is that a problem? What's wrong with it? > > > > > Right now, I can get what I need by doing this: > > &

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
. In addition from what I read in the documentation, I was supposed to get a QuerySet returned on a filter, not a model object reference. I'm not sure why this is happening. On Apr 21, 3:08 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Thursday, April 21, 2011 7:52:02 PM UTC+1, octop

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
I have been able to narrow my question down. I can pull individual columns from the returned model object reference. How can I get all those columns in a list. Wrapping in a list() function returns an error object is not iterable error. On Apr 21, 12:37 pm, octopusgrabbus <old_roa

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
I've also added this to force the QuerySet to evaluate, and I'm still getting the object reference: for list_element in CsInvHold.objects.filter(inventory_ok=0): cs_list.append(list_element) On Apr 21, 12:37 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > H

Re: Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
. On Apr 21, 12:37 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Here is my model (shortened for brevity). It was generated by > inspectdb. I am running Django 1.2 with mod_wsgi, on Ubuntu 10.04 and > apache2. > > class CsInvHold(models.Model): >     action = model

Why Django Model Filter Returns Model Object Instance Instead of QuerySet?

2011-04-21 Thread octopusgrabbus
Here is my model (shortened for brevity). It was generated by inspectdb. I am running Django 1.2 with mod_wsgi, on Ubuntu 10.04 and apache2. class CsInvHold(models.Model): action = models.CharField(max_length=3, db_column='Action', blank=True) # Field name made lowercase. . . .

Re: Best Way To Update Multiple Fields In Model

2011-03-16 Thread octopusgrabbus
This seems to fit the bill just fine. DrReadRange.objects.update(reading_width_days=read_range_in) On Mar 16, 9:28 am, octopusgrabbus <old_road_f...@verizon.net> wrote: > Django 1.2 > mod_wsgi > Python 2.6.6 > > When I create an object of a model of a table, what is the bes

Best Way To Update Multiple Fields In Model

2011-03-16 Thread octopusgrabbus
Django 1.2 mod_wsgi Python 2.6.6 When I create an object of a model of a table, what is the best way to update two columns? I can update one easily, but not two of them. I also noted the model, does not list the third key, at least that I can recognize. What am I asking is what constructs should

Re: Why does Django Fail on Date Field?

2011-03-11 Thread octopusgrabbus
3-11 at 04:28 -0800, octopusgrabbus wrote: > > It's a date format MySQL will accept into a date field. > > I suppose it can be used for recording Adam's date of birth? > -- > regards > KGhttp://lawgon.livejournal.com > Coimbatore LUG roxhttp://ilugcbe.techstud.org/ -- You recei

Re: Why does Django Fail on Date Field?

2011-03-11 Thread octopusgrabbus
It's a date format MySQL will accept into a date field. On Mar 10, 8:07 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote: > On Thu, 2011-03-10 at 09:46 -0800, octopusgrabbus wrote: > > load_date = '-00-00' > > what on earth is this? > -- > regards > K

Re: Why does Django Fail on Date Field?

2011-03-10 Thread octopusgrabbus
I converted my date, and it all works fine. Thanks for your help. On Mar 10, 12:54 pm, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Mar 10, 2011 at 5:46 PM, octopusgrabbus > > > > <old_road_f...@verizon.net> wrote: > > I'm confused as to how this code is

Re: Why does Django Fail on Date Field?

2011-03-10 Thread octopusgrabbus
u, Mar 10, 2011 at 3:18 PM, octopusgrabbus > > <old_road_f...@verizon.net> wrote: > > Could my problem be related to the fact that my views.py module first > > performs a get (sql select) on the table in question, and if the > > record is > > not there, then

Re: What is the best server for Django

2011-03-10 Thread octopusgrabbus
Server or Hosted Service? I was confused by the question. We host our own applications (at least for now). For server hardware, we use IBM e-server, non-virtual at the moment. For OS software, Red Hat Enterprise EL WS 5 in production. Eventually, will be rebuilt using CentOS. For development

Re: Why does Django Fail on Date Field?

2011-03-10 Thread octopusgrabbus
queued for customer synch removal') except MySQLdb.Error, e: info_str = 'Error: ' + e + ' load_date = ' + load_date errors.append(info_str) On Mar 9, 8:37 am, octopusgrabbus <old_road_f...@verizon.net>

Re: Template Referencing Dictionary By Name

2011-03-10 Thread octopusgrabbus
Thanks. As you pointed out, I had to remove the '-' in the dictionary key. On Mar 9, 9:31 pm, Karen Tracey <kmtra...@gmail.com> wrote: >  On Wed, Mar 9, 2011 at 1:30 PM, octopusgrabbus > <old_road_f...@verizon.net>wrote: > > > This is for Django 1.2 and MySQL 5.x >

Template Referencing Dictionary By Name

2011-03-09 Thread octopusgrabbus
This is for Django 1.2 and MySQL 5.x How does a template know a dictionary's name, if a dictionary is supplied in render_to_response? totals_dict['TotalActiveAccounts'] = ret_list[0] totals_dict['TotalBillableAccounts'] = ret_list[1] totals_dict['TotalNon-BillableAccounts'] =

Re: Why does Django Fail on Date Field?

2011-03-09 Thread octopusgrabbus
This is a MySQL 5.0+ database. I can manually insert using Query Browser. On Mar 8, 12:34 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Sorry. The error is Exception Type: > ValidationError > Exception Value: > [u'Enter a valid date in -MM-DD format.'] >

Re: Why does Django Fail on Date Field?

2011-03-08 Thread octopusgrabbus
we don't know your database and we don't know what > exactly is wrong (except for "Django fails"). > > If you add more details, someone might be able to help you > > My 2 cents > >    Jirka > > On Tue, Mar 8, 2011 at 14:08, octopusgrabbus <old_road_f...

Why does Django Fail on Date Field?

2011-03-08 Thread octopusgrabbus
Here is the table: class CsRemove(models.Model): action = models.CharField(max_length=3, db_column='Action') # Field name made lowercase. endpointid = models.IntegerField(primary_key=True, db_column='EndpointId') # Field name made lowercase. devicetype =

Main Application's settings.py floating multiple systems

2011-03-07 Thread octopusgrabbus
Is there a standard, accepted way to use environment variable or other substitution, so the application's settings.py file can exist on, for example, a production and test system. Right now, I've taken to coding the URL strings separately, and I know that's bad in the long run. So, my question

Model Does Not Insert Record; Instead Updates Multiple Records With Date

2011-02-15 Thread octopusgrabbus
My problem is I create a model object and then save it. The data I put in the model, which is not added. Instead an update of all similar part numbers with the date occurs. I know about the override that forces an insert. Is that what I should do? Here is a sample of the data:

Re: Debugging Why CSS File Will Not Load

2011-02-03 Thread octopusgrabbus
c Chamberlain <e...@rf.com> wrote: > > Your port numbers don't match. > > > What does Firebug or some other html debug tool say about the file? > > > On Feb 2, 2011, at 10:55 AM, octopusgrabbus wrote: > > >> I am trying to load static content (one css fil

Re: Debugging Why CSS File Will Not Load

2011-02-02 Thread octopusgrabbus
Thanks. I was trying to hide the port. They're all the same for real, 8082. On Feb 2, 2:21 pm, Eric Chamberlain <e...@rf.com> wrote: > Your port numbers don't match. > > What does Firebug or some other html debug tool say about the file? > > On Feb 2, 2011, at 10:55 AM,

Debugging Why CSS File Will Not Load

2011-02-02 Thread octopusgrabbus
I am trying to load static content (one css file) from the same apache server, using a different virtual host. I have no errors, but the css file appears not to load. How can I debug this further? The load shows up in /var/log/apache2/other_vhosts_access.log: Here are settings from httpd.conf.

Opinions Sought on When To/Not To Use Django Static File Settings

2011-01-30 Thread octopusgrabbus
I have written a web application in Django. At most, there will never be more than five users logged in, if that. I chose this particular application for Django implementation deliberately due to low use and because it was a first-time application. The application sits behind a firewall, and

Re: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
ot just plain Context. > Check out your settings.py for this one of this in the > TEMPLATE_CONTEXT_PROCESSORS constant. > >     'django.core.context_processors.request', >     'django.core.context_processors.media', > > > > > > > On Wed, Jan 19, 2011 at 5:55 PM, octopusgrab

Re: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
of this in the > TEMPLATE_CONTEXT_PROCESSORS constant. > > 'django.core.context_processors.request', > 'django.core.context_processors.media', > > > > > > > On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus <old_road_f.

Settings to Load CSS Files

2011-01-28 Thread octopusgrabbus
I am running Django 1.2.4 mod_wsgi. My admin site loads with its look and feel. I am trying to add css to my application, which works fine. I have looked through the docs, and cannot get a sample css file to load. I would appreciate some pointers to get this working. Here are the appropriate

Re: admin won't load revisited

2011-01-28 Thread octopusgrabbus
, octopusgrabbus <old_road_f...@verizon.net> wrote: > In addition, I can't get the built-in server to serve the admin's look > and feel. I see that as a good thing, because clearly it's a wrong > setting that affects both servers. Here are the settings again. > > # Main URL for t

Re: admin won't load revisited

2011-01-28 Thread octopusgrabbus
that holds media MEDIA_ROOT = '/usr/local/www/documents/media' # URL that handles the media served from MEDIA_ROOT MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. ADMIN_MEDIA_PREFIX = BASE_URL + 'media/admin/' Thanks. cmn On Jan 28, 8:49 am, octopusgrabbus

Re: admin won't load revisited

2011-01-28 Thread octopusgrabbus
there's a caching condition somewhere, but I'm not aware of what it is. Any ideas? Thanks. Then, I put back what I had and tested again and di On Jan 27, 7:24 pm, OverKrik <overk...@gmail.com> wrote: > Try this: > > ADMIN_MEDIA_PREFIX = BASE_URL + 'media/admin/' > > On Jan 28, 1

Re: admin won't load revisited

2011-01-27 Thread octopusgrabbus
properly. > > Hope this helps, and if you need any further assistance please let us > know what exactly is wrong. > > Good luck! > > Wim > > On Jan 27, 10:47 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > I am running Django 1.2.4 and mod_wsgi. M

admin won't load revisited

2011-01-27 Thread octopusgrabbus
I am running Django 1.2.4 and mod_wsgi. My application is running fine. My admin won't load correctly. wsgi_handler.py --- import os import sys PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__)) sys.path.append(PROJECT_ROOT)

In Apache Configuration, What Replaces mod_python

2011-01-24 Thread octopusgrabbus
I'm trying to reconfigure to mod_wsgi and am wisely starting with a workstation. What changes in this line which is in full context below: PythonHandler django.core.handlers.modpython modpython changes, but to what does it change? Listen 8002 WSGIScriptAlias / /home/amr/django/django.wsgi

Django Template CSS Load Path

2011-01-19 Thread octopusgrabbus
I am trying to load a css file in my base.html template {% block title %}Test{% endblock %} What kind of path is supposed to go in the href? Is it relative to the document root? Does anyone have an example of loading a css file including the Apache

Re: Debugging Deeper Into Django

2011-01-09 Thread octopusgrabbus
regarding db queries etc. you can try out. > Django Debug Toolbar:https://github.com/robhudson/django-debug-toolbar > > Hope it helps. > > Regards, > //Vikalp > > On Sun, Jan 9, 2011 at 12:21 AM, octopusgrabbus > <old_road_f...@verizon.net>wrote:> I

Debugging Deeper Into Django

2011-01-08 Thread octopusgrabbus
I would like to see more from Django on what it chooses to, specifically around the loading or not loading of pages. I am running Django on RHEL 5 WS, with mod_python. I want to stick with mod_python, despite the testimonies its replacement is better. Are there switches I can set to get more

What Does Access Log Imply About Media Files' Location

2010-12-02 Thread octopusgrabbus
In my muddling around working on two problems involving serving media pages, I have both problems narrowed down to similar 404 entries in access_log (apache/mod_python). 10.100.0.88 - - [02/Dec/2010:14:15:29 -0500] "GET /media/admin/media/ css/base.cs s HTTP/1.1" 404 2343

Re: django admin css problem

2010-12-02 Thread octopusgrabbus
I failed to provide the following information in a similar post, and it slowed down responses. 1) What web server are you using? If it is not the built in development server, please provide the configuration for Django. 2) Check your application's settings.py file and make sure the appropriate

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Many thanks to the replies and everyone's patience. I can't see the 9th response to this thread because Google Groups appears to be off line, but here's what I've done to get amr.css to load: 1) Here is the base template portion that loads the css file: {% block title %}Town

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
My question is what do I need to do to straighten out the media path, so I can load amr.css. When trying to load amr.css, my application gets a 404. 10.100.0.88 - - [01/Dec/2010:10:03:06 -0500] "GET /css/amr.css HTTP/ 1.1" 404 228 6 "http://amrserver:8002/; "Mozilla/5.0 (X11; U; Linux i686;

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
ucid) Firefox/3.6.12" On Dec 1, 10:02 am, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Dec 1, 2010 at 2:48 PM, octopusgrabbus > > <old_road_f...@verizon.net> wrote: > > Thank you. I've done made changes according to your suggestions, but > > the css ap

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Thank you. I've done made changes according to your suggestions, but the css appears not to load. I am using apache, not the built-in web server. On Nov 30, 5:14 pm, Robert S wrote: > Well - that's one way > A simpler way is to use your settings.py file to point to

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
_DOC_ROOT = '/home/amr/django/media' And here's the reference to it in the base template. {% block title %}Town of Arlington Water Department AMR System{% endblock %} On Dec 1, 4:51 am, Tom Evans <tevans...@googlemail.com> wrote: > On Tue, Nov 30, 201

Re: Sample Auto Log Out Code

2010-11-30 Thread octopusgrabbus
Many thanks. This worked swell, and I also set the cookies expire when browser closed setting. On Nov 24, 11:39 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 24, 4:23 pm,octopusgrabbus<old_road_f...@verizon.net> wrote: > > > Sorry for the late

Loading CSS

2010-11-30 Thread octopusgrabbus
I am running Django 1.2.3 -- python -c "import django; print django.get_version()" I basically need to know what logs to look at to fix a css file not loading. I am trying to load a css file in my base template {% block title %}Town of Arlington Water Department AMR System{%

Re: Django book

2010-11-29 Thread octopusgrabbus
There are many books on Django. You can look on www.softpro.com, Amazon, or your favorite book store. I've gotten a lot out of two books. The Definitive Guide to Django and Visual Quick Pro Django. On Nov 28, 11:24 am, Matthias Runge wrote: > Djangobook is available as

Re: Sample Auto Log Out Code

2010-11-24 Thread octopusgrabbus
Sorry for the late reply. Most of my users will not remember to log out. After, say four hours, I'd like to log them out, if of course they're not already logged out. On Nov 5, 4:31 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 3, 12:43 pm, octopusgrabbus <old_road_f...

Re: Installing Django on Ubuntu

2010-11-15 Thread octopusgrabbus
As to installing a new Django, I'd perform an upgrade and avoid cutting and pasting. On Nov 15, 3:54 am, kelp wrote: > Hello, > So I have downloaded Django and put the folder into my /home/username/ > directory, and I ran setup.py. I played with Django a little bit, but > it

Re: Creating A Model For Existing DB Table

2010-11-12 Thread octopusgrabbus
id = models.IntegerField() >     load_date = models.DateField() > > On 10 nov, 18:23, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > I have an existing MySQL table. It's fairly straightforward: > > > part_num char(20) > > ept_type smallint (default 0) not

Re: How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
Thank you. This worked well. However, I'm left with this value How do I get that into a comparable form? On Nov 10, 4:06 pm, Łukasz Rekucki wrote: > On 10 November 2010 21:55, Shawn Milochik wrote: > > > The queryset returns zero or more instances of

Loading Form Fields With Computed Data

2010-11-10 Thread octopusgrabbus
My form returns back to itself return render_to_response('chkinv.html', {'errors': errors}) before and after the post. During the post, status is calculated through a model that a piece of inventory is or is not available. What is the best way to put that status back into the message field in

Re: How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
This may not be the best way, but it works: temp_ept_id = EptInv.objects.filter(inv_id=80581770).values_list() and I got it from http://docs.djangoproject.com/en/1.0/ref/models/querysets/ On Nov 10, 3:47 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > My new model class wo

Re: Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
sand...@foss-community.com> > > > > > On Wed, Nov 10, 2010 at 09:23:55AM -0800, octopusgrabbus wrote: > > > # Create your models here. > > > class ept_inv(models.Model): > > >     part_num = models.CharField(max_length=20) > > >     ept_type

How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
My new model class works great. It returns my answer, but in a query set, and the table is set up only to return one element in the QuerySet due to the indexes. My problem is how to extract the data from that QuerySet. repr() does not work, because the model class has no repr method. How do I

Re: Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
Thanks. On Nov 10, 12:31 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 10, 5:23 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > > > I have an existing MySQL table. It's fairly straightforward: > > > part_num char(20) > > ept_

Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
I have an existing MySQL table. It's fairly straightforward: part_num char(20) ept_type smallint (default 0) not null inv_id integer (default 0) not null load_date date columns 2 and 3 (ept_type and inv_id) form a unique key. An example of a unique key is 43 and 80581770. I've tried to create

Re: Obtaining And Caching User Context

2010-11-10 Thread octopusgrabbus
er_rs.html') On Nov 8, 3:46 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 8, 5:54 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > I am able to log into my form page, which is a simple form asking the > > user for one value. If that value is entered

Obtaining And Caching User Context

2010-11-08 Thread octopusgrabbus
I am able to log into my form page, which is a simple form asking the user for one value. If that value is entered successfully, I am able to redirect to another "you were successful" page. However, my template logic that checks to see if the user is authenticated -- as far as I can tell the user

Re: Trick to executing command line python out of Django

2010-11-06 Thread octopusgrabbus
I fixed this by adding /usr/local/bin/python. On Nov 6, 12:47 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > This definitely has something to do with running runserver, because it > works under that. I'm just trying to figure out what to configure in > Apache to make it w

Re: Trick to executing command line python out of Django

2010-11-06 Thread octopusgrabbus
This definitely has something to do with running runserver, because it works under that. I'm just trying to figure out what to configure in Apache to make it work. On Nov 6, 9:55 am, octopusgrabbus <old_road_f...@verizon.net> wrote: > Is there a trick to executing this command line >

Trick to executing command line python out of Django

2010-11-06 Thread octopusgrabbus
Is there a trick to executing this command line cmd_line = 'python /home/amr/bin/addReadSnap.py -s ' + str(cycle) using this function from django? import sys import os import string from subprocess import call, Popen def exec_external_cmd(cmd_line): retcode = None try: process

Re: Why Won't Form Elements Display?

2010-11-05 Thread octopusgrabbus
Thanks. I'm starting from the beginning and will eventually get back to this level of template extraction. On Nov 5, 9:00 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 5, 12:10 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > > > Thanks. I put

Re: Why Won't Form Elements Display?

2010-11-05 Thread octopusgrabbus
Thanks. I put back the {% block title %}, {% block head %}, and {% block content %} directives, corrected the error in forms.py, but the field still won't display. Any other ideas to try? On Nov 4, 6:44 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 4, 10:32 pm, octop

Why Won't Form Elements Display?

2010-11-04 Thread octopusgrabbus
I have a forms class in forms.py from django import forms class ReadSnapForm(forms.Form): cycle = forms.CharField(max_length=1) message = forms.CharField(widget-forms.Textarea,required=False) Here is the form that uses the class {% extends "base.html" %} Enter Billing Cycle

Re: Caught in CSRF verification failed. Catch 22

2010-11-04 Thread octopusgrabbus
t; On Thu, Nov 4, 2010 at 10:32 PM, octopusgrabbus > > > > <old_road_f...@verizon.net> wrote: > > I have a simple form: > > > {% extends "base.html" %} > > {% block title %}Take Snapshot of Billing Reads{% endblock %} > > {% block head %}Ta

Caught in CSRF verification failed. Catch 22

2010-11-04 Thread octopusgrabbus
I have a simple form: {% extends "base.html" %} {% block title %}Take Snapshot of Billing Reads{% endblock %} {% block head %}Take Snapshot of Billing Read{% endblock %} {% block content %} {% if user.username %} {{ form.as_p }} Section Number:

Django Environment Settings

2010-11-04 Thread octopusgrabbus
What is the best way to set the Django command line environment for testing in the python interpreter? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: Repost Admin Site Without Graphics

2010-11-03 Thread octopusgrabbus
. If you are using django's web server, it > will serve the admin files automatically, if you are using apache or > some other web server, you will have to specify where the admin site's > files are, like Robbington said. Compare the path in the settings file > to the one that is being

Sample Auto Log Out Code

2010-11-03 Thread octopusgrabbus
Does anyone have samples for auto logging out a user? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Physical / Logical Hrefs

2010-11-02 Thread octopusgrabbus
Given the following in my main page template how does Django process logout? I am asking this, because I want an href to take an authenticated user to a page that, for example, allows the collection of some data (billing reads). I have an application within the project that will handle read

Re: Repost Admin Site Without Graphics

2010-11-02 Thread octopusgrabbus
Tried suggestions, and still do not get full graphics. Everything else works. Users are displayed, and so on. On Nov 2, 12:24 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Thanks. I'll try your suggestions. I am using the phrase no graphics > to mean the admin site comes up,

Re: Repost Admin Site Without Graphics

2010-11-02 Thread octopusgrabbus
Thanks. I'll try your suggestions. I am using the phrase no graphics to mean the admin site comes up, but doesn't have all the nice background. On Nov 1, 3:41 pm, Robbington wrote: > Hi, > > By 'with out graphics' do you mean no css or Javascript? > > If so you want to

Repost Admin Site Without Graphics

2010-11-01 Thread octopusgrabbus
Sorry for reposting a previous question, but Google temporarily blocked my access to Groups for going back too far, too fast in this group to find my original post. My admin site works, but without graphics. I've done the following to fix this. TEMPLATE_DIRS = ( # Put strings here, like

Re: Still Confused about Python Egg Cache

2010-10-25 Thread octopusgrabbus
w.question-defense.com/2009/12/22/extractionerror-cant-extract-files-to-egg-cache-errno-13-permission-denied-root-python-eggs On Oct 25, 11:58 am, octopusgrabbus <old_road_f...@verizon.net> wrote: > I've added > > PythonInterpreter amr_django > PythonImport /home/amr/django/amr/py

Still Confused about Python Egg Cache

2010-10-25 Thread octopusgrabbus
I've added PythonInterpreter amr_django PythonImport /home/amr/django/amr/python_egg_cache.py amr_django to /etc/init.d/conf/httpd.conf. Here's python_egg_cache.py import os os.environ['PYTHON_EGG_CACHE'] = '/python_egg_cache/.python-eggs' This was working a few days ago, after I added the

Re: Can't Write Python Eggs Directory

2010-10-18 Thread octopusgrabbus
Problem fixed by following instructions http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-the-admin-files labeled Using "eggs" with mod_python On Oct 18, 1:25 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Periodically, I keep getting b

Re: Can't Write Python Eggs Directory

2010-10-18 Thread octopusgrabbus
ncerning python eggs, but it is not clear to me the name or location of the file in question. On Oct 18, 1:25 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > Periodically, I keep getting bitten by this error: > > The Python egg cache directory is currently set to: > >   /home/amr/.

Can't Write Python Eggs Directory

2010-10-18 Thread octopusgrabbus
Periodically, I keep getting bitten by this error: The Python egg cache directory is currently set to: /home/amr/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to

Why Django Admin Won't Display full graphics

2010-09-30 Thread octopusgrabbus
When I run Django admin with runserver running, I get nice graphics. I don't when I run Django admin from apache. I can log into my django application from apache, but do not get the graphics. I'm looking for examples or documentation on how to fix this. Thanks. cmn -- You received this message

Directing User to specific page after login

2010-09-30 Thread octopusgrabbus
I am looking for either programming samples or specific documentation that show how a user is redirected to a page specific to that user, after login. Given I am just starting out with Django, if this is really advanced, then I'll settle for getting people logged in and give them the same page.

Re: Fixing Missing Template Error

2010-09-29 Thread octopusgrabbus
Thanks. That worked. On Sep 28, 7:35 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > I am getting a Missing Template exception > > Exception Type:         TemplateDoesNotExist > Exception Value: > > registration/login.html > > My urls.py looks like this: >

Fixing Missing Template Error

2010-09-28 Thread octopusgrabbus
I am getting a Missing Template exception Exception Type: TemplateDoesNotExist Exception Value: registration/login.html My urls.py looks like this: from django.conf.urls.defaults import * from django.contrib.auth.views import login . . . urlpatterns = patterns('', (r'^$',

Apache configuration

2010-07-10 Thread octopusgrabbus
I worked through samples in the Visual Quickpro Guide Django. I used python manage.py runserver while running through the examples. Now, I want to configure this in Apache. Django is complaining about finding modules underneath my top directory. Here's the apache configuration: SetHandler

Admin site not formatted

2010-07-10 Thread octopusgrabbus
Using Apache and not the built-in Django web server, I can reach the admin site, but it's not formatted well, as it is with the built-in web server. Any ideas on what to do? Here's the location directive in apache SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv