2008-8-14

23:35 shadfc
DigitalVibe: so I'm just not sure how ImageField can work for FileSystemStorage, and not for S3Storage
23:35 shadfc
yeah, no worries
23:35 dmcgettigan
Im trying to install GEOIP with geodjango...I have the C APi and the python interface and i have doth the country and city datasets in a folder and I have pointed to them from mny settings file. but I cannot do this: from django.contrib.gis.utils import GeoIP
23:35 FunkyBob
wmealing: Adobe AIR is objc?
23:35 andre_pl
SmileyChris: thanks, I'll look into that.
23:35 wmealing
no no, photoslop and the rest.
23:35 dexter
i'm not explicitly, i've added them in my settings
23:35 FunkyBob
ah
23:35 dexter
well, the app
23:35 dexter
and then did syncdb
23:35 FunkyBob
yeah, ObjC looks nice
23:35 Magus-
well then of course they don't show up, dexter
23:36 Magus-
models do NOT show in admin by default
23:36 wmealing
it looks.. a little different.. although i'm not sure i can write it on a ppc imac
23:36 dexter
something changed? :)
23:36 Magus-
hence the tutorial explaining how to make them show up
23:36 wmealing
as, thats all i have
23:36 Magus-
no, its ALWAYS been this way
23:36 Magus-
in old admin, no "class Admin: pass" = not in admin
23:36 Magus-
in new admin, no registering = not in admin
23:36 dexter
that might be it, let me check my model
23:37 Magus-
23:37 springmeyer
dmcgettigan: what do you get with: from django.contrib.gis.utils import geoip ?
23:37 dexter
wow that's new
23:37 dexter
sigh, just trying to keep up
23:38 dexter
thanks magus :)
23:38 Magus-
only slightly new - the tutorial's always been there
23:38 dmcgettigan
springmeyer: Object `from django.contrib.gis.utils import geoip` not found.
23:38 Magus-
just now it has the new directions for newforms admin
23:39 DigitalVibe
dexter: something you should also note, you now need to do admin.autodiscover() to get the standard admin tools to appear
23:39 subsume
Can I iterate through a slice of a list in a template? I see slice but I'm not sure how to use it in conjunction with for
23:39 DigitalVibe
that's in urls.py
23:39 dexter
digital: thanks, i think the new urls.py handles that
23:39 DigitalVibe
dexter: correct :)
23:39 dexter
*thank you* everyone, glad to see the community is so helpful
23:42 Adoleo
subsume: I've not tried this, but does {% for object in objects|slice:":2" %} work?
23:47 HenrikV
It seems that settings is loaded multiple times by the runserver command. I try to import another module in settings, and runserver command just exits when I try to load a page. Is there something to be aware of or avoid?
23:47 maek
I created my first model, and manage.py syncdb gives no errors, when I then try to enable the model for admin view with 'from django.contrib import admin <cr> admin.site.register(Poll)' its not showing up in my admin view. admin it self shows up with groups users and sites but my admin section for that model doesnt. any ideas? im following the tutorial to a T, or at least I think.
23:48 jeffr
what is the django template way to add meta description and other tags to pages?
23:48 mattmcc
Just do it?
23:49 Adoleo
maek: have you tried restarting the dev server, and clearing your browser cache?
23:49 jeffr
i was following the template example, and they have a base template that has a bunch of stuff
23:49 jeffr
and templates inherit that
23:49 jeffr
from an inherited template, how would i add a meta tag to the parent?
23:49 maek
Adoleo: I restarted the dev server, but no cache clean. let me try that.
23:49 mattmcc
jeffr: Define a block.
23:50 agent47a
maek: do you have the admin.autodiscover() in urls.py?
23:50 jeffr
that is what i was thinking too, but then i would have to have the whole meta tag in each sub template
23:50 jeffr
is there a way to pass a variable up?
23:51 maek
agent47a: yes, the admin site wasnt working at all until I added that.
23:51 Adoleo
jeffr: you could have a 'meta' CharField on your model, and then call something like <meta name="description" content="{{object.meta}}"> from the base.html
23:53 Adoleo
maek: do you have the "admin.site.register(Poll)" line listed /after/ you establish the model itself?
23:53 mattmcc
jeffr: Templates receive variables when they're rendered, using a template context.
23:53 mattmcc
Which typically comes from the view that's rendering the template.
23:53 maek
Adoleo: yes, outside the class and after the model
23:54 Adoleo
maek: It sounds like it should be working right - maybe post your models.py on dpaste.com?
23:55 maek
Adoleo: ok thanks, let me look at this for a bit ill see if its my model
23:55 kubodhi
in admin, my model has a headshot = models.ImageField(upload_to='images') and all is well with uploading the image (i can verify in my filesystem that the image shows up where intended).. the admin panel displays "Currently:" with a link to the current image (once the object is saved) and below it a "Change:" form allowing me to change the image. clicking on the current link throws a ValueError exception, "invalid literal for int() with bas
23:56 igors
hi all...is there any docs about contrib.auth.views.password_reset_confirm, i couldn't find any...
23:56 maek
Adoleo: im stupid, I forgot to install the app I want to admin :( thanks for the help
23:56 Adoleo
maek: Ha! It's always something incredibly simple - so simply you don't even think about it.
23:56 kojiro
hmm, I think I'm doing something kooky: I have django installed with apache in the root, so <Location /> -- it seemed to have worked, but after that, following the tutorial, the administration page doesn't show any style, as if the CSS can't be found, and the "polls" app doesn't show
23:56 Adoleo
maek: Glad you figured it out.
23:56 AndyM
HELP! NFA - I want to show only a subset of fields for a given model - in the admin. On post, I then want to populate the missing fields on the server side. Initial thoughts are to override the save_add method and set the new values on the new object before it is saved? However, there doesnt seem to be a way to do this? A call to Super.save_add does the form-> model conversion and the save in one go? What are my options?
23:56 maek
Adoleo: indeed. thanks
23:57 SmileyChris
kojiro: why are you using apache for the tutorial?
23:58 SmileyChris
kojiro: but to solve your problem, you need to use Alias (and SetHandler None) to point to the admin media
23:58 kojiro
SmileyChris: well, it's a virtual machine, so it's fairly harmless to try things -- I can always revert backwards stepwise
23:59 kojiro
so I thought, "why not try to see how hard apache is to set up"
23:59 fUD
Hey guys
23:59 kojiro
SmileyChris: ok, I'll give it a shot
23:59 kubodhi
anyone with experience using ImageField() from admin?
23:59 SmileyChris
kojiro: it's easier to just use dev server, and most people like figuring one bit at a time, but feel free to hit it all at once :)
23:59 agent47a
is there a way to specify cols and rows for a TextField model so that django can introspect it for the admin site?
Page 32 of 32   ← Previous  (3,174 total)