2008-8-7
| 22:06 | rozwell | bigmamamonk: that's pretty vague |
| 22:07 | rozwell | binjured: if you pass it to the template explicitly or use the context processor w/ requestcontext |
| 22:07 | bigmamamonk | oh well... I just need somebody experienced to recommend a reliable provider :) |
| 22:07 | bigmamamonk | :D |
| 22:07 | binjured | rozwell: hmmm, i'm trying to fix a caching issue where a view is cached so the value of a field will be X for all users, even when it should only be that for one user. |
| 22:08 | rozwell | binjured: so don't cache the template if it depends upon the user |
| 22:08 | binjured | rozwell: will using a no_cache template tag override the cache of the view? it would have to be done on every page, effectively nullifying the cache entirely |
| 22:09 | Magus- | no |
| 22:09 | Magus- | there is no way to exclude a page from the cache middleware |
| 22:09 | rozwell | bigmamamonk: i think i would ask elsewhere |
| 22:09 | bigmamamonk | k cheers anyways :) |
| 22:09 | rozwell | bigmamamonk: it's not really a django-related question :) |
| 22:11 | binjured | Magus-: so, if i have a search box on every page that i want to populate with a user's most recently search when they are on the actual search page, there's no way i can do that while retaining a cache of the pages? |
| 22:12 | mattmcc | At the template level, you can cache parts of a page. |
| 22:12 | rozwell | binjured: there's the template fragment caching tag |
| 22:12 | mattmcc | But naturally you can't cache a whole page, and then say "but change this one part" |
| 22:13 | binjured | mattmcc: but i could take the base template, wrap everything but the search box in a template cache, and do it that way? |
| 22:13 | binjured | ermmm... but that would probably result in every page having the same block content regardless of the actual page... ugh |
| 22:14 | josho | i asked this earlier, but had to go before i got an answer: is there a way with the new admin to set the value of fields from a model that's being edited inline? it was possible with the old admin, but now doesn't seem to be working. the obvious method would be to add '?inlinemodel-0-fieldname=value' to the URL, which works fine for non-inline models (just '?fieldname=value'), but isn't working for inline ones |
| 22:14 | binjured | i guess my only real option is disabling the site-wide cache and implementing fragment caching throughout |
| 22:14 | Magus- | binjured: if you're using the global cache middleware for everything, no, you can't make a part or entire page not cached |
| 22:15 | rozwell | binjured: or you could look into a caching proxy |
| 22:17 | binjured | rozwell: right. i think i may be confusing myself a bit here, though... say i got rid of site-wide caching and i have a base template with blocks like "content", if i wrap that content block in a template cache, will that mean that regardless of what URL is gone to (since it is a base template extended throughout) that every page will display the cached version of the last page put in there? |
| 22:17 | rozwell | binjured: presumably |
| 22:17 | levity_island_ | is there anything like request.user.message_set for anonymous users? |
| 22:18 | binjured | rozwell: but i could wrap the contents of the child template in a template cache instead? or would that achieve the same result? |
| 22:19 | tehone | anyone have any ideas on my question, http://groups.google.com/group/django-users/bro... |
| 22:20 | rozwell | binjured: i don't know exactly how it plays out |
| 22:23 | neybar_home | tehone: I don't have any solutions, but I tried almost exactly the same thing and couldn't get it to show up in the admin. |
| 22:23 | tehone | bummer |
| 22:23 | tehone | it seems simple enough |
| 22:24 | tehone | i guess it may take some kind of customized form or something then |
| 22:24 | binjured | rozwell: okay, so i might have thought i solution, but here's the question: does the never_cache decorator for a view have any affect on the site-wide cache? i.e., can i not cache views or is it simply all-or-nothing? |
| 22:25 | Magus- | binjured: I clearly answered that before |
| 22:25 | Magus- | you can not exempt a view from site-wide caching |
| 22:25 | Magus- | at all |
| 22:25 | Magus- | ever |
| 22:25 | Magus- | clear enough this time? :รพ |
| 22:25 | binjured | Magus-: indeed it is ;) |
| 22:26 | rozwell | binjured: never_cache is for setting the never cache header on the response, for hinting to clients/proxies/etc. to not cache |
| 22:27 | binjured | Magus-: so basically the choices are all-or-nothing site-wide cache or template caches which cache a piece of the response regardless of which page is actually requested? i.e., /categories/one and /categories/two will be the same thing if the template is wrapped in a cache tag? |
| 22:27 | rozwell | binjured: there's also per-view caching |
| 22:28 | rozwell | binjured: but template seems to be what you want |
| 22:28 | binjured | rozwell: right, but would that cause the same problem as the /categories/ issue i mentioned above? |
| 22:28 | rozwell | binjured: either that or do the caching in front of django |
| 22:28 | Magus- | but you could cache every view except that one binjured |
| 22:28 | Magus- | then use fragment caching on that one |
| 22:28 | Magus- | problem solved |
| 22:29 | Magus- | without fragment caching /everywhere/ |
| 22:29 | Magus- | although IME fragment caching is quite nice |
| 22:29 | binjured | Magus-: okay, that's what i was wondering... if it would cache the view regardless of the values passed to it (i.e. category_view(request,cat=1) and category_view(request,cat=2) would actually end up being the same thing if view-cached) |
| 22:30 | binjured | because it's just the one view that i don't need cached, assuming it doesn't do that |
| 22:30 | binjured | but i haven't slept in a long time and am probably over-thinking this a lot |
| 22:31 | rozwell | binjured: i would assume the decorator is smart enough to not return the same response for all arguments passed to a view |
| 22:31 | binjured | rozwell: me too, but i hate making assumptions ;) |
| 22:33 | binjured | rozwell: but you're right to assume it, since the all-site cache is smart enough to not do it |
| 22:34 | rozwell | binjured: it's not difficult to accomplish ;) |
| 22:34 | binjured | rozwell: but since it's caching final pages... bah. i will just try it. if the production site turns into the same 3 pages i'll know |
| 22:45 | subsume | I've got a bunch of junk permissions in the database. Am I liable to mess other things up if I delete them? What's the best method for removing them? |
| 22:47 | mattmcc | Well, if they're not referenced by anything.. |
| 22:48 | quantumsummers | p--, Kurushiyama: updated models for the ticket system, adds comments, etc |
| 22:49 | quantumsummers | |
| 22:51 | p-- | quantumsummers, nice |
| 22:51 | p-- | got any views done? ;) |
| 22:51 | quantumsummers | not for popular consulption today, lol...sorry. we're gonna fix that up tomorrow |
| 22:51 | quantumsummers | p--: |
| 22:52 | quantumsummers | ^^ |
| 22:52 | quantumsummers | geez |
| 22:52 | p-- | quantumsummers, cool.. let me know.. I've been to busy with other things to even start on that.. so I am hoping you get it semi done before I have the time to consider building one ;) |
| 22:53 | quantumsummers | p--: ok we should be moving right along there, I know Kurushiyama has a nice one coming too |
| 22:54 | quantumsummers | p--: you a fan of steppenwolf? |
| 22:54 | quantumsummers | born 2 b wild ;) |
| 22:57 | p-- | quantumsummers, meh.. not really ;) |
| 22:58 | quantumsummers | inagaddadavida baby! |
| 23:01 | zain2go | is there some way i can linkify a foreign key displayed in the admin console? |
| 23:01 | zain2go | so clicking it lets you edit the model it represents |
| 23:04 | m1ke | all i have to do to delete django is rm it from the site-packages dir? |
| 23:04 | mattmcc | That rather depends on how it got installed in the first place. |
| 23:04 | m1ke | i did a check out |
| 23:06 | EyePulp | a reminder on template syntax - I can't perform an {% ifequal foo|filter bar|filter %} and have it process the filters before the comparison, correct? |
| 23:07 | m1ke | using svn |
| 23:09 | Zalamander | EyePulp hm, no? |
| 23:09 | Killarny | can a block have the same name as a variable in a template? |
| 23:09 | Zalamander | Killarny I don't see why not |
| 23:10 | Zalamander | EyePulp I've never tried that combination specifically, but I've always been able to use filters in tag parameters, as far as I recall. |
| 23:10 | Magus- | Killarny: as the two are completely unrelated, yes |
| 23:11 | EyePulp | hrm. |
| 23:12 | Zalamander | m1ke yep, just delete the directory |
| 23:26 | sciyoshi | rozwell: in case you're interested, Place.objects.extra(where=['not exists (select 1 from app_restaurant where app_restaurant.place_ptr_id = id)']) |
| 23:26 | sciyoshi | does what i need :-) |
| 23:29 | _carson_ | Hi, can someone help me with this? Im just new to django and im doing the tutorial on the 0.96 release. Everything is fine until i reach the admin part, it seems my browser doesnt show the javascript, i tried with safari and its the same, im usin OS X 10.5 |
| 23:30 | FunkyBob | _carson_: you're using the "./manage.py runserver" ? |
| 23:32 | _carson_ | FunkyBob: yes |
| 23:33 | Killarny | is it a known bug that urlconf entries with capturing regex break matching with the url tag? |
| 23:34 | Magus- | you mean urls with nested parens? |
| 23:35 | Magus- | a simple capture does not break anything |
| 23:35 | Magus- | or do you mean non-capturing? |
| 23:36 | Killarny | a non-capturing named url matches properly, but a capturing url in the same urlconf is not matching, raises NoReverseMatch |
| 23:36 | jinzo | Magus-, I would need an advice from an experianced Django coder like you - I'm rewriting ( basicly ) django-openid, and I have a small design decision to make, OpenID allows additional extensions, python-openid supports 3 of them, currently only 1 is implemented and is activate thru an additional agrument to the view |
| 23:36 | Magus- | Killarny: try providing more info then :) |