well sounds like it expect a size of width & height
Evidlo
Ah, I see
it's talking about the 400
thanks
Azelphur joined the channel
tbaxter
can I add a url to the existing admin namespace, and if so, how?
Nizumzen joined the channel
apollo13
only via include()
jcerise has quit
or override get_urls on the AdminSite/ModelAdmin
jfkdaddy joined the channel
tbaxter
thanks. Have to rethink this.
bkuberek_ joined the channel
AndrewX192 joined the channel
juztin has quit
lorddaedra has quit
ska-fan joined the channel
LeaChim joined the channel
eagllus joined the channel
dualbus joined the channel
bind joined the channel
drag0nius joined the channel
Audioburn joined the channel
drag0nius
how do you guys handle dynamic/interactive content in django?
monokrome joined the channel
jessamynsmith joined the channel
tbaxter
define “ dynamic/interactive content”
SoftwareMaven joined the channel
drag0nius
so from current project: there is a table of products, above it there is "add product" button showing modal for this purpose and on clicking row it pops up "edit product" modal
apollo13
what is dynamic about this?
brickmort joined the channel
or more dynamic/interactive than any other site out there
mribeirodantas joined the channel
mribeirodantas
How do I know the user that last modified my model through the Admin Panel?
drag0nius
until recently i didn't know how to handle that dynamic loading/changing stuff in Django, used REST + fully fledged client side frameworks
tbaxter
mribeirodantas: you would have to store that on save yourself.
drag0nius: are you asking how to create a modal?
drag0nius
but recently i saw "newbies" either rendering everything at page load (monstrous templates), then they made it into loading EVERYTHING with AJAX calls
Swambo has quit
Swambo_ joined the channel
the rendered HTML
mribeirodantas
tbaxter: But django admin already stores what has been modified, right?
Right when you log in, you can see a table with it
i came up with the middle ground: rendering as much on page load, but still in widget-style approach (short templates with <script> tags handling them), then loading whole modals at once in similar way
i want to know how other developers handle those non-static pages
everything i've read so far is either REST focused or doesn't talk about dynamic client-side at all
tbaxter
drag0nius: i make pages that work, then add JS to sweeten to taste
Nizumzen
drag0nius: generally I make sure that my pages work without javascript and then add javascript later to make it more dynamic - but then I tend to disable javascript myself so get annoyed when sites don't work without it
jladage joined the channel
snurfery joined the channel
AimerPaddle joined the channel
telex joined the channel
m8 joined the channel
Haudegen joined the channel
daidoji joined the channel
drag0nius
so you're more like form-wizards and page-reloading?
[o__o] has quit
-- BotBot disconnected, possible missing messages --
[o__o] joined the channel
NOTICE: [freenode-info] channel flooding and no channel staff around to help? Please check with freenode support: http://freenode.net/faq.shtml#gettinghelp
ForSpareParts has quit
neanderslob has quit
Destos joined the channel
hackedhead joined the channel
hackedhead
i'm adding a bunch of objects to my DB via a standalone script using the ORM. the model i'm adding instances of has a M2M 'sites' to the Site model from the sites framework. I'm passing a dict for creation, e.g. ModelA.objects.create( {valuedict} ), but I'm not sure how to add the (required) site association in this fashion, since I won't be able to create the M2M association until after the ModelA instance
is saved and has a primary id .... what am i missing here?
armicron has quit
Genitrust joined the channel
StErMi has quit
garrypolley
hackedhead: it will be easiest to help if some code is linked.
jazzzu has quit
underthehill has quit
wldcordeiro
Is there a way to assign a default value for a model field to a related model's?
Like say you have model a with a max_transaction field
and then a model b that does too
and you want model b's max_transaction to be equal to the value of your instance of model a
behelit joined the channel
underthehill joined the channel
lduros joined the channel
jladage has quit
jladage joined the channel
lduros
hi, what would be the best way to know to tell if a model has a given fieldname?
ForSpareParts joined the channel
let's say I do: from myapp.models import MyModel
I want to know if MyModel has a field name 'my_field'
not talking about objects but the model itself really. I'm not really interested to know that the model class has attributes that are not fields really
just the fields
tbaxter
lduros: how do you not know what fields are on the model?
radez is now known as radez_g0n3
lduros
tbaxter: it's to make a dynamic search by name/field
tbaxter
i see
lduros
how about: t = MyModel._meta; t.get_field('my_field')
would this work?
i guess i can try
aul joined the channel
looks like it would work with a try/except
SoftwareMaven has quit
ohrstrom joined the channel
livingstn joined the channel
try: t.get_field('my_field') [do stuff] except: field doesn't have this attribute.
the admin seems to be able to enforce required M2M fields for new objects, but is it just trickery and M2M fields aren't required to save() the model, and added after?