cache and anonymous only

2011-03-11 Thread plungerman
greetings, we are using django trunk, updated from time to time. we were using revision 13303, and then wanted to update to the current revision (15776 at the time). upon updating to 15776, the caching behaviour of our apps changed. we are using CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True and authenti

Re: passing template variable to templatetags

2009-06-25 Thread plungerman
you must use the django.template.resolve_variable method: obj = Foo.objects.get(id=resolve_variable(self.id, context)) which would be called within the render method of you templatetag class, which contains the "context" from the view. On Jun 21, 10:44 pm, Joru wrote: > Is it possible to reso

Re: Cookie problem

2008-09-22 Thread plungerman
On Sep 19, 11:40 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Getting the following error message when I try to access the admin page > of my spanking new django 1.0 installation : > "Looks like your browser isn't configured to accept cookies. Please > enable cookies, reload this page, and try agai

Re: ImportError: No module named mysql.base

2007-11-19 Thread plungerman
i can confirm that the mysqldb that comes with the CentOS 5 install does not work with django subversion releases. it is quite easy, however, to compile it from source. On Nov 14, 1:49 am, Josh <[EMAIL PROTECTED]> wrote: > Thanks Karen. I was a little wary about compiling my own copy of > mysql

Re: get objects in templates

2007-05-16 Thread plungerman
hey alessandro, check out the catch tag over at djangosnippets.com: http://www.djangosnippets.org/snippets/10/ i use it for something similar and works quite well. thanks limodou! laters, steve On May 9, 3:51 pm, "va:patrick.kranzlmueller" <[EMAIL PROTECTED]> wrote: > just a guess. > > for

Re: Redirect middleware

2007-04-24 Thread plungerman
hi rob, i think you are on to something there. i should familiarise myself more with reg ex, certainly one of my weaknesses. basically what we want to match on is anything from the root_uri ("/") to the end of the path. so about/mydir/user1/ would be passed to our view for munging. i kind of

Re: Redirect middleware

2007-04-23 Thread plungerman
ve for viewing. i suspect that something is going wrong in that department. what do you think? On Apr 23, 5:06 pm, Michael K <[EMAIL PROTECTED]> wrote: > On Apr 23, 10:13 am, plungerman <[EMAIL PROTECTED]> wrote: > > > > > greetings, > > > i am attemp

Redirect middleware

2007-04-23 Thread plungerman
greetings, i am attempting to do a simple redirect using django's redirect middleware. everything works fine if you want to redirect from one distinct URI to another, for example, /big/ ---> http://www.example.com/labowski/ however, if you want to redirect to a child page in terms of the URI s

Re: contrib.auth logins "randomly" complaining about cookies being disabled

2007-04-22 Thread plungerman
greetings, i have been experiencing the same problem. we have a login page, and you can always log in from that page. in the header of each page, you can log in as well, and that form, when submitted, throws the afore mentioned "cookies" error. oddly enough, i cannot replicate this problem in

Re: moving url's of my site

2007-02-08 Thread plungerman
i have a ROOT_URL value set in my settings.py file. i use this throughout all applications and at the template level, where i have created a template tag to make it available as {%root_url%} def root_url(): if settings.ROOT_URL[1:] == "": ru = settings.ROOT_URL else: ru =

Re: moving url's of my site

2007-02-08 Thread plungerman
i have a ROOT_URL value set in my settings.py file. i use this throughout all applications and at the template level, where i have created a template tag to make it available as {%root_url%} def root_url(): if settings.ROOT_URL[1:] == "": ru = settings.ROOT_URL else: ru =

Database templates, views, and template tags

2007-02-02 Thread plungerman
greetings, i have created a template loader to grab templates from the database: from django.template import TemplateDoesNotExist try: from myproject.editor.models import Layout except: Layout = None def load_template_source(name, template_dirs=None): """ Loads templates from t

Custom template tags: object does not support item assignment

2007-02-01 Thread plungerman
greetings, i am attempting to fetch an object or all objects from a model and make the data available at the template level via a custom template tag. it seems like you cannot return an object or all objects from the template tag, as django throws the error: "object does not support item assignm

Re: help with tagging app

2006-12-15 Thread plungerman
greetings, i studied long and hard the tagging app from Luke Plant and the one from the bulletin board app called zyons (http://zyons.com/), and i was unable to wrap my head around neither. granted i am not the sharpest tool in the shed, but the docs for Sr. Plant's app are a little confusing.

Re: Multiple Websites using the same project and apps

2006-08-09 Thread plungerman
dude, that was it. i was importing the module with from myapp import my_settings and not doing a relative import as you suggested from settings_default import * thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Multiple Websites using the same project and apps

2006-08-09 Thread plungerman
actually, i mispoke above about the same error. i saw the same error when i imported the root settings file and tried to assign values by using root_settings.ROOT_URLCONF = 'myapp.urls' for example. when i as values like this ROOT_URLCONF = 'myapp.urls ' without prepending it with root_settings,

Re: Multiple Websites using the same project and apps

2006-08-09 Thread plungerman
hey joe, thanks for the suggestion. in fact i tried that first and received the same error as listed above. thinking that it was not so easy, i opted for the custom default settings manoeuvre described in the documentation. unfortunately, i saw the same error generated by mod_python. if you k

Multiple Websites using the same project and apps

2006-08-09 Thread plungerman
greetings, what would be the best way to manage the settings files for multiple websites that use the same django project? we have a django project with 3 applications that we want to use for various clients. through apache, we set up the virtual host stuff for their domain and send all python/

Re: Template tags and context processors

2006-07-12 Thread plungerman
Malcolm Tredinnick wrote: > On Tue, 2006-07-11 at 15:38 +0000, plungerman wrote: > > greetings, > > > > i have been working on a template loader to retrieve templates from the > > database. after integrating the loader to work with the django's > > admin,

Template tags and context processors

2006-07-11 Thread plungerman
greetings, i have been working on a template loader to retrieve templates from the database. after integrating the loader to work with the django's admin, i now serve up templates from both the file system and the database, for both the public and admin sites. one problem, however, is with temp

Re: Store and retrieve template code from database

2006-07-07 Thread plungerman
does not exist. Request Method: GET Request URL:http://localhost/admin/flatpages/flatpage/ Exception Type: DoesNotExist Exception Value:Templates matching query does not exist. Exception Location: /home/plungerman/django_src/django/db/models/query.py in get, line 204

Re: Store and retrieve template code from database

2006-07-05 Thread plungerman
hello malcom, thanks for taking the time to help out. Malcolm Tredinnick wrote: > On Wed, 2006-07-05 at 12:32 +0000, plungerman wrote: > > greetings, > > > > i would like to store django template code in a database and retrieve > > it for display. before i go any f

Store and retrieve template code from database

2006-07-05 Thread plungerman
greetings, i would like to store django template code in a database and retrieve it for display. before i go any further, does anyone foresee any security risks with this approach? there will be control over those users who can manipulate the data but not so much that we could monitor what ever

Re: Root URI in templates

2006-06-21 Thread plungerman
perfect, just what we needed. one thing i noticed, however, is that this manoeuvre does not work with 404.html and 500.html type pages. we have custom templates for those two errors, and the variable is not available in those templates. anyone have a suggestion how one might make the variable a

Re: Root URI in templates

2006-06-14 Thread plungerman
limodou wrote: > On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote: > > > > Let me rephrase this. I don't disagree with absolute URL's per se, but > > there should be someway of abstracting them further than is currently > > available. > > > > Lets say that your media server's address changes, doesnt

Root URI in templates

2006-06-13 Thread plungerman
greetings, in an attempt to better understand, django from a systems perspective, i have been attempting to install various blog type applications that i have found out there in the wild. i ran into a problem with Jeff Croft's lost-theories application. basically, i set up my apache mod_python