Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
r path page caching (and not path / cookie page caching). mike chambers Norman Harman wrote: > http://www.djangoproject.com/documentation/cache/#using-vary-headers > > http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api > --~--~-~--~~--

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
based on the hashed path, but I dont want to branch the django source. mike Mike Chambers wrote: > Upon looking at the source, it looks like I am using an out of date way > to generate the cache key: > > http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py >

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
takes a request, but I need to delete the cache for a specific page (which isnt the one being requested). mike Mike Chambers wrote: > I am using memcache for my site, and it is working well except for one > issue. > > When a user enters a comment, I redirect them to the page th

Re: encrypting form data

2008-05-15 Thread Mike Chambers
and suggestions. mike Gabriel wrote: > Mike Chambers gmail.com> writes: > >> >> I am not concerned if they can send the hash back. I dont want them to >> be able to access the underling value that the hash is based on. >> >> I am also not concerned about sp

Re: encrypting form data

2008-05-15 Thread Mike Chambers
PTCHA. > -richard > > > On 5/15/08, Mike Chambers <[EMAIL PROTECTED]> wrote: >> The value is encrypted in the form. The secret key, used to either >> decrypt or hash the value, is on the server, and not in the form. >> >> My application does not have th

Re: encrypting form data

2008-05-15 Thread Mike Chambers
The value is encrypted in the form. The secret key, used to either decrypt or hash the value, is on the server, and not in the form. My application does not have the concept of logged in users. mike jonknee wrote: > > How would that help if the "secret" value was in the form already? > Bots

Re: encrypting form data

2008-05-15 Thread Mike Chambers
will help. > hth, > -richard > > > On 5/15/08, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I have a commenting app that requires that the item id, and content type >> id be passed through the form. >> >> This works fine, but i would like to encrypt tha

encrypting form data

2008-05-15 Thread Mike Chambers
I have a commenting app that requires that the item id, and content type id be passed through the form. This works fine, but i would like to encrypt that data to make it a little more difficult for people to programatically submit the form. Does anyone have any info on how to encrypted form

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
fyi, bug logged here with test case: http://code.djangoproject.com/ticket/7233 mike Mike Chambers wrote: > ok. more info on this. (Sorry about all of the emails, but I am really > trying to track this down, and see if it is a bug). > > If I try to include the request.POST da

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
g it is a bug. mike Mike Chambers wrote: > I ended up getting this to work with (what feels like) a hack: > > > To save the session: > > -- > request.session['form_post_query_string'] = request.POST.urlencode() > return HttpResponseRedirect(request.META['HTTP_R

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
q = QueryDict(request.session['form_post_query_string']) comment_form = CommentForm(q) -- Anyone know why I cant store request.POST.copy() in the session? Is that a bug? mike Mike Chambers wrote: > Thanks for the input. > > I am narrowing down the issue. Basically, If i try to pla

Re: do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
, it it still not actually saved and available during a seperate request. mike Rajesh Dhawan wrote: > > > On May 13, 3:23 pm, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I am running into an issue where my session values are not remembered if >> I do an H

do sessions work when redirecting?

2008-05-13 Thread Mike Chambers
I am running into an issue where my session values are not remembered if I do an HTTP redirect. If I do: -- request.session['a'] = '' return HttpResponseRedirect(request.META['HTTP_REFERER'] -- The session variable a will not be available once the browser is redirected. If I do: --

wrong URL after invalid form submission

2008-05-13 Thread Mike Chambers
I am doing a simple comment submission form. The page that the comment form is on is: /item/2/ the comment form action url is: /item/comment/ On the submission, I check if the form is valid, and if it is not, I return the form to the user / template, which then displays the form errors. If

handling form errors in separate app

2008-05-12 Thread Mike Chambers
mments is being worked on. However, I am doing this in part to learn more about django. Thanks for any thoughts... mike chambers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

dynamic default values for Forms

2008-05-12 Thread Mike Chambers
something already built in? mike chambers --~--~-~--~~~---~--~~ 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 th

Re: one-to-many design question

2008-05-09 Thread Mike Chambers
is named by doing ForeignKey(Chapter, > related_name='this_thing'). > > On May 9, 11:08 am, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I am working on an app to host some books online. I cant figure out the >> best way to represent a one to many relationship. >>

one-to-many design question

2008-05-09 Thread Mike Chambers
I am working on an app to host some books online. I cant figure out the best way to represent a one to many relationship. Basically, a Book has multiple Chapters, but a Chapter can only be in one book. Looking at the docs, this seems to be the way to represent this: -- class

Re: Get first_name from User Model in to my Model

2008-05-04 Thread Mike Chambers
user.firstname user.lastname ?? Is that what you are looking for? mike chiefmoamba wrote: > Hi, > > I am having a problem getting data from the user model in to my model > (below). I can get the usernames easy enough using "user = > models.ForeignKey(User)", but how then do I get the

Re: Pass extra data to a view

2008-05-03 Thread Mike Chambers
Could you just specify the data in the URL that you redirect to? mike Jay Parlar wrote: > On 5/2/08, Jay Parlar <[EMAIL PROTECTED]> wrote: >> I must be missing something super obvious here, but I can't figure out >> how to pass data to a new view, from the old one. >> >> For example, I have

Re: feed api : why have templates t specify item and description fields

2008-05-01 Thread Mike Chambers
Thanks. On #1, there is already similar information in the class (such as the overall feed description, url, etc... #2 makes sense though. mike chambers Rajesh Dhawan wrote: > On May 1, 2:11 pm, Mike Chambers <[EMAIL PROTECTED]> wrote: >> I am using the feed api, and it work

feed api : why have templates t specify item and description fields

2008-05-01 Thread Mike Chambers
I am using the feed api, and it works well. However, i was curious why the title and description fields are specified via templates, and not just as a property of the feed class? http://www.djangoproject.com/documentation/syndication_feeds/ Why not just have properties on the feed class like

Re: get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
for a specific field? Thanks again for the help... mike chambers Ronny Haryanto wrote: > On Wed, Apr 30, 2008 at 12:03 PM, Mike Chambers <[EMAIL PROTECTED]> wrote: >> >> Name >> {{ form.user_name }} {{ form.user_name.errors }} >>

get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
I have a form that I am custom rendering in a view like so: -- Name {{ form.user_name }} -- I am working on implementing input error feedback, so I did this: -- Name {{ form.user_name }} {{

check if template block has been defined?

2008-04-29 Thread Mike Chambers
Is there any way to check if a template block has been defined? Something like: {%if title%} : {% endif %}{% block title %}{% endblock %} Looking at: http://www.djangoproject.com/documentation/templates/#template-inheritance it doesn't look like there is. Can anyone suggest a workaround?

Template variable in filter?

2008-04-29 Thread Mike Chambers
Is it possible to include a template variable inside a filter? Specifically, I want to have a global setting for the date format string: Something like: settings.py -- DATE_TIME_FORMAT = "M j, F \a\t P" template -- {{ comment.date_submitted|date:{{DATE_TIME_FORMAT I am guessing that I

Re: OneToMany relationshops between models?

2008-04-28 Thread Mike Chambers
Thanks. Ill take a look at that, as well as some of the other comments framework. I had looked at the django comments, but it looked like it wasnt really supported, and might change soon. mike chambers [EMAIL PROTECTED] wrote: > For something like this the best way to do this is a gene

OneToMany relationshops between models?

2008-04-28 Thread Mike Chambers
if this has an obvious answer. Again, I am new to django, and trying to work my way through the best way to use the framework (which I love, btw). mike chambers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django