RE: 'str' object is not callable

2011-02-16 Thread Chris Matthews
; hour,min,sec = "14:59:03".split(":") >>> min(5,2,3) TypeError: 'str' object is not callable Just check your recent code. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Szabo, P

RE: Importing modules in code

2011-02-16 Thread Chris Matthews
. django modules 3. 3rd party modules 4. Your project/application modules Regards Chris From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of galago Sent: 16 February 2011 10:39 To: django-users@googlegroups.com Subject: Importing modules

RE: Progress Bar/ProgressBarUploadHandler Documentation Examples

2011-02-15 Thread Chris Matthews
Hi Hank, I just got the book "jQuery UI 1.7" by Dan Wellman. Chapter 8 covers Progressbar. Have not worked through it yet so I can't give my view on it. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of h

RE: Saving multiple records from admin list page

2011-02-15 Thread Chris Matthews
Hi Sithembewena, If you want to monitor changes to tables then you might also be interested in keeping audit/history records. See the book ProJango by Marty Alchin Chapter 11 (page 263 onwards) and http://qr7.com/2010/10/django-simple-history-ftw/ by Corey Bertram Regards Chris From: django

RE: Django Form Doesn't Render

2011-02-14 Thread Chris Matthews
Hi Dean, Looks like you pass the class ContractForm in to your render (and not the variable contractForm). Also on naming (PEP 8) contract_form would have been nicer for the variable (and would have stood out more so that the error was easier to spot). Regards Chris -Original

RE: Need a tutorial for 'regexpr'

2011-02-10 Thread Chris Matthews
) nmatches = nmatches + 1 Insert (de-dented once, same as for line 148): #_Start Chris Matthews 10 May 2005 self.grouplist.insert(END, "Named Groups:") GroupDict = m

Re: VPython and Django

2011-02-10 Thread Chris Lyon
It's fairly hard, Visual doesn't have an easy mechanism for rendering png files. One way is to render an equivalent from pov-ray. But in some ways that a different question. On 10/02/11 16:34, Juan Kepler wrote: How I can incorporate in a web a 3D image made with VPython using Django? --

Re: Calling out for Help!

2011-02-08 Thread Chris Hannam
I have found http://stackoverflow.com/questions/tagged/django to be an awesome resource. CH -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group,

Re: Looking for IDE + FTP

2011-02-08 Thread Chris Hannam
I really enjoy Wing IDE, it has an excellent debugger. It won't do your ftp stuff but it will make solving bugs a lot easier. CH -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: cannot login to admin site using admin credentials

2011-02-07 Thread Chris Lawlor
Try running 'python manage.py createsuperuser' on your production server to create a new superuser account. You should have full privileges to log in to the admin and make changes using this account. On Feb 7, 8:15 am, xpanta wrote: > Hi, > > it seems that my problem is a bit

Re: Database per user

2011-02-06 Thread Chris Hannam
Hi, http://docs.djangoproject.com/en/1.2/topics/db/multi-db/ contain information about setting up multiple databases. I personally have no idea how this would scale to may users. If you are looking to store large amounts of data I would look at an alternative to SQLite. I have found 

Re: File Upload

2011-02-06 Thread Chris Hannam
Hi, startswith is usually a string method. Looks like something is calling .startwith() on a tuple rather than the expected string. When you instantiate your model are you certain all the values are correct? Try logging all the values before creating the model and look for a tuple where there

Re: Amazing work

2011-02-05 Thread Chris Hannam
Hi, Plone (which runs on Zope) is not that unusual a CMS system for business. It suffers from a lack of documentation like Zope but there is a pretty thriving community behind Plone currently. Certainly worth a look if nothing else. CH -- You received this message because you are subscribed to

Re: Help on adding CSS to django project

2011-02-04 Thread Chris Hannam
Apologies for that premature send: > Hi, > The way I have approached this is to have a static dir set in my urls.py: > > (r'^static/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT } ) settings.py has the following MEDIA_ROOT =

Re: Help on adding CSS to django project

2011-02-04 Thread Chris Hannam
> > Hi guys, > am very new to django and am having troubles adding css to my pages > even though i've found some tutorials online > and followed it word for word. Hi, The way I have approached this is to have a static dir set in my urls.py: -- You received this message because you are

RE: Adding popups for edit

2011-02-02 Thread Chris Matthews
Hi Marco, Again the book "Django JavaScript Integration: AJAX and jQuery" by Jonathan Hayward. In Chapter 6 he covers jQuery In-place editing by using http://www.appelsiini.net/projects/jeditable PS: I have never met Jonathan, I live far-away in Africa, so I am not plugging his book. I happen

RE: Filtered drop down choice django

2011-02-02 Thread Chris Matthews
Hi Sushanth, I am currently working through the book "Django JavaScript Integration: AJAX and jQuery" by Jonathan Hayward. In Chapter 7 he covers autocomplete (see http://jqueryui.com/ or more specifically http://jqueryui.com/demos/autocomplete/) to handle filtered drop down. From:

RE: Django SQL Query does not stop

2011-02-01 Thread Chris Matthews
runs way faster if the query is simplified. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Ivo Brodien Sent: 01 February 2011 23:49 To: django-users@googlegroups.com Subject: Re: Django SQL Query does not stop I

RE: Django Template CSS Load Path

2011-01-30 Thread Chris Matthews
change href='{{ MEDIA_URL }}/static/PageStyle.css' /> to href='{{ MEDIA_URL }}static/PageStyle.css' /> -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of octopusgrabbus Sent: 29 January 2011 21:17 To: Django users Subject: Re:

RE: abstract base class and overwriting save()

2011-01-28 Thread Chris Matthews
The "save def save(self, *args, **kwargs):" should not have the leading save. Also, if you are making a car system then this structure seems more appropriate: class CarMake(models.Model): ... class Car(models.Model): make = models.ForeignKey(CarMaker) ... def save(self, *args,

RE: Challenge with installing django on windows 7 64 bit

2011-01-26 Thread Chris Matthews
1) Generally "not a valid archive" means the file was corrupted during the download/copy or the download/copy did not complete. If you used ftp to copy the file and the file mode settings was ASCII (not binary) then you can have a corrupt file (because CR 0x0D gets converted to CRLF 0x0D0A). If

RE: forbid clones

2011-01-26 Thread Chris Matthews
Have a look at unique_together: Django | Model Meta options | Django documentation http://docs.djangoproject.com/en/dev/ref/models/options/ Jump to unique_together‎: Options.unique_together¶. Sets of field names that, ... For convenience, unique_together can be a single list when dealing ...

RE: DB-Views or read-only tables in models

2011-01-25 Thread Chris Matthews
Not sure if http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ will be of some help. See admin.site.disable_action('delete_selected') ; but this is only via the admin app. You could build some logic in the model by overriding the save() method, conditionally, based upon user. So

Re: URL -> query problem --- doesn't seem to be cache-related

2011-01-14 Thread Chris Lee
Thanjs -- I'll give that a shot. On Jan 14, 9:16 am, bruno desthuilliers wrote: > The canonical way to encode search arguments in an URL is to use the > querystring. -- You received this message because you are subscribed to the Google Groups "Django users"

URL -> query problem --- doesn't seem to be cache-related

2011-01-14 Thread Chris Lee
using MySQL 5.1.41 Thanks, -Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@google

Re: empty DateTimeField?

2011-01-11 Thread chris
As Justin mentioned, my guess is that you would have to manually update the table definition to allow nulls for that column. On Jan 11, 7:21 pm, galago wrote: > I tried but I get: > Exception Type: IntegrityError Exception Value: > > (1048, "Column 'publish_date' cannot be

Re: Django's documention is horrible

2011-01-10 Thread Chris Czub
Yup, that is my approach... The Django sourcecode is eminently readable and well-organized and most of it has documentation associated with it. You can jump into a shell and use the help() command to view API documentation like you requested. e.g. >>> help('django.contrib.auth.models.User')

RE: list of lists in template

2011-01-07 Thread Chris Matthews
{% for Ltarp in smth.3 %} SHOULD BE {% for Ltarp in smth.2 %} 'cos Lans only has 3 elements and Ltarp is Lans[2]. Chris -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of gintare Sent: 07 January 2011 08:52 To: Django users

Re: How configure Django to handle /books URL and yet allow access to PDFs/images in subdirs of /books?

2011-01-04 Thread Chris Seberino
Nevermind. I figured it out. To only have subdirs by static you need to add a "/" at the end of an Alias line... e.g. Alias /books/ /some/static/dir/ Thanks! cs -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: How configure Django to handle /books URL and yet allow access to PDFs/images in subdirs of /books?

2011-01-04 Thread Chris Seberino
On Jan 4, 2:48 am, Graham Dumpleton wrote: > If using Apache/mod_wsgi it is quite simple, and wouldn't even need URL > rewriting as suggested by others. > > So, what are you hosting it with. Yes I am using mod_wsgi. The following line sends all URLs to WSGI script

How configure Django to handle /books URL and yet allow access to PDFs/images in subdirs of /books?

2011-01-03 Thread Chris Seberino
How configure Django to handle /books URL and yet allow access to PDFs and images in subdirs of /books? Specifically, I want /books to be a dynamic page with lots of links to PDFs and images of book covers contained in subdirectories of /books like /books/some_book_1 and

Re: loading the external css file

2011-01-03 Thread Chris Lawlor
, Bithu <bithin2...@gmail.com> wrote: > When i was trying to set my static files. When i added the > 'django.contrib.staticfiles' into INSTALLED_APP in my setting.py the > development server was not running showing an error  Error: No module > named staticfiles. > > On Dec 2

Re: ModelForm Field not display choice text

2010-12-27 Thread Chris Lawlor
) is the $ ('#stars').children().not(":radio").hide() call, which basically hides everything but the actual stars. If the use doesn't have JS enabled, they should still see the radio buttons with the associated labels. Hope that helps, Chris On Dec 27, 6:48 am, Michael Thamm <web

Re: loading the external css file

2010-12-27 Thread Chris Lawlor
Django doesn't server static files (like your CSS file) by default - but you can configure the development server to do so: http://docs.djangoproject.com/en/dev/howto/static-files/ Note that this has changed a lot in Django 1.3, so be sure to view the correct version of that page for the version

Re: Load file into a FileField

2010-12-21 Thread Chris Lawlor
he console. If your view is returning HTML, you might pipe the output to a file to open in a browser. Hope that helps, Chris On Dec 21, 5:14 am, Liriela <kajamilanow...@gmail.com> wrote: > Hi there, > > I am working now on a web server and come up with a problem. I want to > ha

Re: more than one querys LIKE in the same field

2010-12-14 Thread Chris Lawlor
(Q(tags__icontains='milk') | Q(tags__icontains='candy')) Also note that, if you're using sqlite, case-insensitive string lookups are not supported (see http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching). Hope this is helpful, Chris On Dec 14, 3:10 am, marcoarreguin

Re: Weird problem after schema change

2010-11-30 Thread chris
a simple check. Ah well. Thanks, Chris On Nov 25, 7:07 pm, Venkatraman S <venka...@gmail.com> wrote: > On Fri, Nov 26, 2010 at 6:30 AM, Chris Tandiono > <chris.tandi...@gmail.com>wrote: > > > How can I get the date field to show up in the admin interface? > > Coupl

Weird problem after schema change

2010-11-25 Thread Chris Tandiono
a long time to load, but I think that's because my model has a ManyToMany field to a model with a lot of rows in the table.) How can I get the date field to show up in the admin interface? Thanks, Chris -- You received this message because you are subscribed to the Google Groups "Django

Re: Issue uploading photos through the admin. PIL issue.

2010-11-22 Thread Chris
Opps, Just solved my own question. python-dev is required which I had installed. I found a package called pillow which seems to take care of the issue that I was having. On Nov 22, 2:07 pm, Chris <macmichae...@gmail.com> wrote: > I am having an issue with uploading photos through the

Issue uploading photos through the admin. PIL issue.

2010-11-22 Thread Chris
I am having an issue with uploading photos through the admin. I get this error: "Upload a valid image. The file you uploaded was either not an image or a corrupted image." I am using ubuntu 10.04, python 26, virtualenv, and and pip. Is there a known issue with installng pil through pip +

Re: How to join a search on user and user profile

2010-11-22 Thread Chris Lawlor
You should be able to do something like: UserProfile.objects.filter(gender='female', user__email='some...@mail.com') Note the double underscore notation, which let's you access attributes of the related model. This example assumes that UserProfile has a FK field to User which is named 'user'.

Re: help with django comments

2010-11-07 Thread Chris Lawlor
Assuming your app is named 'gallery' with a model named 'photo', I believe the call should be: {% get_comment_count for gallery.photo as comment_count %} On Nov 6, 5:12 pm, Bobby Roberts wrote: > howdy - > > i'm trying to use comments on my site as follows: > > {%

Re: moving from Postgres to MySQL

2010-10-22 Thread Chris Withers
that spits out being parsed correctly by MySQL without complaint? ;-) Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups "Django users"

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 21/10/2010 14:48, David De La Harpe Golden wrote: On 21/10/10 13:31, Chris Withers wrote: ...which is a little odd, given that the file was created by 'dumpdata'. Any ideas? Do you see any genuine wierdness in the format of any stringified datetimes in the dumped json? Yes I know you've

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
that helps What does this have to do with datetimes? How would I do this on a 200Mb text file? Anyone know how to get loaddata to be a bit more explicit about where the failure was? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting -

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
me in -MM-DD HH:MM[:ss[.uu]] format.')) ValidationError: Enter a valid date/time in -MM-DD HH:MM[:ss[.uu]] format. ...which is a little odd, given that the file was created by 'dumpdata'. Any ideas? I'm on Django 1.1... Chris -- Simplistix - Content Management, Batch Proce

Re: How to launch home page from urls.py?

2010-10-13 Thread Chris Boyd
Thank you Rob! > {'template': 'index.html'} But in that case I have to use Django template file, while my home page is built with Pyjamas (http://pyjs.org/). Can I use a Django urlpattern to launch any HTML file, not just Django tempalte file? Thank you, Chris On Wed, Oct 13, 2010 at 9:46

Re: How to launch home page from urls.py?

2010-10-13 Thread Chris Boyd
home/winapp/HomePage.html' } ), or ( r'^$', '/home/winapp/HomePage.html' ), Any ideas? Thanks, Chris 2010/10/13 Jonathan Barratt <jonathan.barr...@knifeict.com> > > On 13 ?.?. 2010, at 7:57, Chris wrote: > > > Hello, > > > > Currently in my urls.py I have &qu

Re: HTTP load testing tools?

2010-10-13 Thread Chris Withers
On 13/10/2010 09:17, Chris Withers wrote: I hope this is still on topic, but what tool sets do people around here use for doing load testing of Django projects? Thanks for the answers... ...now to ask the question in a different way again ;-) Anyone recommend any load testing services

How to launch home page from urls.py?

2010-10-13 Thread Chris
uple of books, but I cannot figure out how to launch "HomePage.html" by using just "a.b.com". Any help is highly appreciated! Thank you, Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

HTTP load testing tools?

2010-10-13 Thread Chris Withers
Hey all, I hope this is still on topic, but what tool sets do people around here use for doing load testing of Django projects? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this mes

moving from Postgres to MySQL

2010-10-11 Thread Chris Withers
Hi All, I have an existing Django app with lots of data in it. For reasons beyond my control, this app needs to move from Postgres to MySQL. What's the best way of going doing this? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting -

Re: apache reload

2010-10-04 Thread Chris Lawlor
One approach is to set "MaxRequestsPerChild" to one, basically forcing the server to reload on every request. Probably not the most efficient way to accomplish this, but almost certainly the most simple to implement. On Oct 3, 5:39 pm, Олег Корсак wrote: >

Re: newbie question

2010-10-04 Thread Chris Lawlor
Chris Lawlor On Oct 4, 3:29 am, Martin Melin <mme...@gmail.com> wrote: > On Mon, Oct 4, 2010 at 8:25 AM, mark jason <markjaso...@gmail.com> wrote: > > hi > > I am quite new to django ..I  have written a web app that takes user > > input  and adds  customer details

Help Reading data from an uploaded CSV

2010-09-30 Thread Chris McComas
I have this code: http://dpaste.com/250981/ The file is uploading properly, but it is not creating any entries in my Pharmcas table, it's worked before, last spring when we used it last, but right now it's not working? It uploads and saves the file as it should, but then doesn't do any of the

Re: sql query: how to

2010-09-27 Thread chris hendrix
yeah i was looking at something like that... actually let me correct what i'm needing to do: select year(fieldname) as pubyear from table order by year(fieldname) asc On 09/27/2010 01:15 AM, akaariai wrote: The most efficient? Exactly that using raw SQL. I think something along the

Subclassing User class or User class "profiles" recommended for extra attributes?

2010-09-20 Thread Chris Seberino
Adding extra attributes to User classes seems to be handled originally by a "profiles". A new way seems to be to subclass the User class. One problem with the shiny new way is that lots of code is written to handle User classes instead of subclasses. The suggested way to fix this is nontrivial.

Re: Strange unit test / OAuth Issue

2010-09-09 Thread Chris
version of oauth you have in each place? > > Even if there isn't a usable version indicator in the library, you could > generate a file containing the chacksums of all the py files, sort it, and > compare it. > > On Tue, Sep 7, 2010 at 4:46 AM, Chris <macmichae...@gmail.com>

Strange unit test / OAuth Issue

2010-09-07 Thread Chris
So I wrote some django unit tests for an app that uses OAuth and I ran into this strange issue when attempting to set my verifier: On my local dev machine it likes me to set my verifier like so: token.set_verifier(verifier) On my production machine it like me to set my verifier like so:

Re: project management app

2010-08-17 Thread chris hendrix
... keep me posted! chris On 08/17/2010 04:35 PM, tiemonster wrote: I was unable to get the code working. I'm developing a project management application for Django if you're interested in contributing. On Aug 16, 2:27 pm, Bobby Roberts<tchend...@gmail.com> wrote: hi all. I've fou

Re: Need help setting up dynamic options for select (drop down) box of form.

2010-08-03 Thread Chris Seberino
type from a CharField to a ChoicesField. All the best, Chris -- 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 dj

Need help setting up dynamic options for select (drop down) box of form.

2010-08-02 Thread Chris Seberino
er I see a drop down box with NO choices. Or rather, a blank choice. Chris -- 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 d

*Unnecessary* instances of HTML escape sequences like ?

2010-07-30 Thread Chris Seberino
I understand the need for web pages to denote the 5 HTML special characters >, &, <, ', and " with alternate representations like . (These 5 are the *only* special characters in HTML right?) What I don't understand is why an HTML page encoded with UTF-8 would use this

Re: How can view tweak response object to go to a specific *anchor* on the template?

2010-07-21 Thread Chris Seberino
On Jul 17, 11:16 am, Justin Myers wrote: > or just put that one line (with a semicolon at the end, since it's > missing one) in a

Re: How can view tweak response object to go to a specific *anchor* on the template?

2010-07-16 Thread Chris Seberino
On Jul 15, 3:57 am, Oleg Lomaka wrote: > First without javascript. You cat check URL of HttpRequest and if it is > without #anchor element, then send redirect to the same URL with #anchor. Yes redirection is a great non-Javascript way to do this. Is there ANY way to

Re: How can view tweak response object to go to a specific *anchor* on the template?

2010-07-16 Thread Chris Seberino
On Jul 15, 3:44 am, Daniel Roseman wrote: >      window.location = window.location + '#whatever' I added that code to script element in head and it didn't work. I have a TinyMCE javascript editor that gets run too. I don't know if that is conflicting or if there is

How can view tweak response object to go to a specific *anchor* on the template?

2010-07-14 Thread Chris Seberino
How can a view tweak the response object so that client sees a specific anchor instead of the top of the page? Chris -- 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...@google

Re: Comparing DateTimeField to datetime.now()

2010-07-14 Thread Chris McComas
use 'datetime.datetime.now()' instead of 'datetime.now()' > > b> > from datetime import datetime > Then 'datetime.now()' should work correctly. > > Thanks, > Subhranath Chunder. > > On Wed, Jul 14, 2010 at 9:13 PM, Chris McComas <mccomas.ch...@gmail.com>wrote: >

Comparing DateTimeField to datetime.now()

2010-07-14 Thread Chris McComas
This is my model, I'm trying to set it so that if the game is in the future, based on the field date, then to return True, if not return False. http://dpaste.com/218111/ I am importing datetime in my models.py but for some reason it's giving me nothing. I tried displaying future and nothing

Re: www.djangoproject.com

2010-07-14 Thread Chris Lawlor
Nick, thank you so much for figuring this out!! On Jul 8, 11:12 am, Nick Raptis wrote: > In firefox, check your preffered language settings, in the content tab. > > If there is a non-standard value there (perhaps "/etc/locale/prefs.conf" > or something) instead of a locale

Re: Help Converting a Query getting one result using .filter() to .get()

2010-07-13 Thread Chris McComas
, in a separate query where sport=sport and opponent=opponent to figure out the historical Win/Loss record between the teams? On Jul 12, 8:15 pm, John M <retireonc...@gmail.com> wrote: > Why does it matter? > > You could just say next_game[0] instead. > > J > > On Jul

Re: Streaming File Uploads with Lighttpd+Django

2010-07-12 Thread Chris
Nevermind, I finally found my answer after hours of searching in this thread: http://forum.lighttpd.net/topic/1142 On Jul 12, 11:08 pm, Chris <christopher.andrew.ba...@gmail.com> wrote: > Hi all, > > I just recently deployed my django site from the included development > webserv

Streaming File Uploads with Lighttpd+Django

2010-07-12 Thread Chris
Hi all, I just recently deployed my django site from the included development webserver to a production server with lighttpd. I'm new to both Lighttpd and Django so forgive my ignorance. When using the development webserver, I can see streaming files in the tmp directory grow if the uploaded

Help Converting a Query getting one result using .filter() to .get()

2010-07-12 Thread Chris McComas
I have this query, trying to get the next game in the future. today = datetime.datetime.now() next_game = Game.objects.filter(date__gt=today).order_by('date')[:1] I need to use .get() if possible, instead of .filter() how can I do this? -- You received this message because you are subscribed

"SESSION_SAVE_EVERY_REQUEST = True" performance hog? Any other cons?

2010-07-10 Thread Chris Seberino
SESSION_SAVE_EVERY_REQUEST = True (in settings.py) seems to avoid a lot of potential bugs from forgetting to set request.session.modified = True when necessary. Is this a serious performance problem? If not, I would think this would be a good *default* value for Django no? Chris -- You

Re: What causes request.session to be erased?...When you go to different view?

2010-07-10 Thread Chris Seberino
Wow beautiful. Thanks. I needed that. cs On Jul 10, 12:14 am, Javier Guerra Giraldez <jav...@guerrag.com> wrote: > On Fri, Jul 9, 2010 at 11:36 PM, Chris Seberino <cseber...@gmail.com> wrote: > > elif form.is_valid(): > >        ... > >        request.session[

What causes request.session to be erased?...When you go to different view?

2010-07-09 Thread Chris Seberino
Ever time a web page is visited, a view is called and a NEW request object is passed in right? Then if I'm not mistaken, it appears you can't maintain request.session when you visit a new web page and a new view because a NEW request object is passed in to the new view right? My personal

Re: [Offtopic] Design introduction

2010-07-08 Thread Chris Czub
Much like programming, it will come from experience. Practice a lot. You'll make a lot of things you aren't happy with, probably like your first bits of code :) Try to imitate things you like, and see the techniques they use to create cool designs. It, like anything else worth doing, will be

Re: contrib.auth.views - n00b question

2010-07-07 Thread Chris Lawlor
rs.py" in > _get_reverse_dict >   199.             self._populate() > File "/usr/lib/python2.6/dist-packages/django/core/urlresolvers.py" in > _populate >   168.         for pattern in reversed(self.url_patterns): > File "/usr/lib/python2.6/di

Re: contrib.auth.views - n00b question

2010-07-06 Thread Chris Lawlor
You probably don't want to reference the login view to /accounts. You probably mean to do this: (r'^accounts/', include ('django.contrib.auth.urls'), That will map /accounts/login to django.contrib.views.login, /accounts/ logout to django.contrib.views.logout, etc. In general, when using an

How interate over just a slice of form fields in template? (I tried {% for e in form|slice:":5" %} )

2010-07-05 Thread Chris Seberino
How interate over just a slice of form fields in template? I tried {% for e in form|slice:":5" %} but it appears the slice part is just ignored. cs -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How set initial form field value in the view function?

2010-07-04 Thread Chris Seberino
How set initial form field value in the view function? The initial keyword is great when defining a subclass of Form if you the initial values is ALWAYS the same. What if it varies?...I'm guessing I must set it in the view. How set this initial value in the view? Chris -- You received

Re: mod_wsgi sometimes gives error on first reload but not thereafter

2010-06-16 Thread Chris Seberino
On Jun 15, 6:42 pm, Graham Dumpleton wrote: > This occurs when Apache is first reading HTTP headers for request and > long before it hands it off to any Django application or even > mod_wsgi. Is there anything I can do about this? I assume this means we should

Re: mod_wsgi sometimes gives error on first reload but not thereafter

2010-06-15 Thread Chris Seberino
I found the Apache error for this mod_wsgi error that only appears the first time I reload an app after restarting Apache [Tue Jun 15 18:12:39 2010] [error] [client ] request failed: error reading the headers, referer: http:// -- You received this message because you are subscribed to the

Re: mod_wsgi sometimes gives error on first reload but not thereafter

2010-06-15 Thread Chris Seberino
On Jun 14, 7:02 pm, Graham Dumpleton wrote: > Use WSGI script described in: > >  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html In mod_wsgi's defense, remember that this error happens sporadically and is NOT a showstopper as a reload makes it

mod_wsgi sometimes gives error on first reload but not thereafter

2010-06-14 Thread Chris Seberino
1. Restarting Apache+mod_wsgi 2. Clearing Firefox cache and 3. Visiting Django app URL are all done often when debugging/developing a DJango app under Apache +mod_wsgi. I've noticed with mod_wsgi, I will *SOMETIMES* get an error after this triad. Reloading the Django URL makes it go away so it

multiple databases -- database across sites?

2010-06-10 Thread chris
. Chris -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit

Good idea to process form data in separate thread or process to avoid blocking? How?

2010-06-07 Thread Chris Seberino
<--- possible to run these in separate thread or process easily so Django app doesn't have to wait on it? How? Thanks! Chris -- 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...@goog

Issues running Djano app as Apache's www-data user with mod_wsgi.

2010-06-06 Thread Chris Seberino
in that group. Problem is that when I create **NEW** files they are NOT automatically added to this new group!??! Sound familiar? Chris -- 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...@google

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-28 Thread Chris Seberino
On May 27, 6:56 pm, Graham Dumpleton wrote: > You also need to add '/home/seb/MAIN/seoconquer'. Read: > >  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html I tried both versions of the wsgi script on your blog. And I still get this same

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino
On May 27, 10:51 am, Nuno Maltez wrote: > > ImportError: No module named mvc > > What's the "mvc" module? Python can't seem to find it. Is it in your > python path? My project is called seoconquer. My app is called mvc. My absolute directory path to mvc is

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino
I fixed the path issue that was causing the spinning but now I'm back to getting import errors even with __init__.py in my apache directory. Here is the exact error from Apache's error.log. ... [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130] _default =

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino
\ /home/seb/MAIN/seoconquer/apache/ application.wsgi Order Allow,Deny Allow from All Any help still greatly appreciated as always. Chris -- You received this message because you are subscribed to the Google Groups "Django

mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-25 Thread Chris Seberino
I can successfully run a toy WSGI app with my Apache/mod_wsgi set up. When I try to run my Django app with mod_wsgi it can't ever find the modules to load and Apache's error.log gives ImportError's. I tried adding paths to sys.path in the wsgi file. Not what else to try. cs -- You received

Re: slow filtering by related and local fields, only on sqlite, not on postgres?

2010-05-23 Thread Chris Withers
Chris Withers wrote: queryset = TicketStatus.objects.filter(active=True) if user_id: queryset = queryset.filter(owner=User.objects.get(id=user_id)) queryset = queryset.filter(ticket__event=event) return list_detail.object_list( request, queryset

Re: filtering by related object causes query to grind to a halt

2010-05-23 Thread Chris Withers
Okay, so I noticed that it's the following code, and it's only when I filter on user *end* event: Chris Withers wrote: queryset = TicketStatus.objects.filter(active=True) if user_id: queryset = queryset.filter(owner=User.objects.get(id=user_id)) queryset = queryset.filter

filtering by related object causes query to grind to a halt

2010-05-23 Thread Chris Withers
, evaluating the queryset grinds to a halt. Why is that? How can I make it fast? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups "Djan

Re: more complex queries

2010-05-20 Thread Chris Withers
... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- 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.

more complex queries

2010-05-20 Thread Chris Withers
Hi All, I have a Transaction model with a DecimalField called "amount" and a CharField called "action". How do I sum all the transactions, multipling the amount by -1 when the action is REFUND? cheers, Chris -- Simplistix - Content Management, Batch Processing

Django reversion, AuditTrail, MySQL MyISAM

2010-05-20 Thread Chris Allen
patibility. Django-audit-log appears to be abandoned. Is anyone aware of any functional alternatives or solutions to the blockers for using the above? Thank you for reading, :) --- Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. T

<    1   2   3   4   5   6   7   8   9   10   >