In Mavericks you finally don't need Xcode for Command line tools
josePhoenix
Frostig: perhaps not a solution to your particular problem, but I've found that building python this way ensures all the expected headers are where they should be, etc
dangayle joined the channel
Frostig
josePhoenix: Alright. I may try it, or I just run my projects from my virtual machine
Ariel_Calzada has quit
like I do with all my php projects anyway :P
dangayle
I'm trying to do a self.stdout.write("{}".format(entry['title'])) within a management command, but I'm getting a `UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 25: ordinal not in range(128)` error
Dev0n
Frostig, you ever tried oursql instead of MySQL-python?
just a better weapper overall imo
wrapper*
Frostig
Dev0n: does that wrapper work for mysql? *dumb-question*
josePhoenix
Frostig: whatever works! Managing complexity with building/installation is a pain how-ever you try to do it
Dev0n
Frostig, it's a wrapper of libmysqlclient, so yea :)
Frostig
josePhoenix: Yeah, I run my project through intellij for development purposes, so it seems easier to not only use the command line. But it's better to use it for learning puposes anyway.
nkuttler: ya, been studying that but i guess i'm kind of slow learning. for instance, with detailview "While this view is executing, self.object will contain the object that the view is operating upon.". what do they mean by self.object? everything is a object in python and each class will have it's own objects, etc.
EvilDMP joined the channel
nkuttler
dman777_alter: self.object is a property of self and contains the object the orm found, usually based on pk or slug
EvilDMP has quit
frodopwns has quit
dman777_alter: so request -> orm -> returns object -> in self.object where self is an instance of DetailView
dman777_alter
nkuttler: ah...i thought slug was a random name...not a reservered keyword. so, if i wanted to send a parameter from the url dispatcher to the class view...would i used detailview or is that only for orm objects?
hetii has quit
nkuttler
dman777_alter: a DetailView is used to fetch an orm object
dman777_alter
nkuttler: ok, thanks!
Fuyou
slug is not a keyword
nkuttler
DetailView, ListView, CreateView all work on orm objects
oh right, you can call your SlugField however you like
lduros has quit
epicowl joined the channel
canibanoglu has quit
culturelabs joined the channel
nicholasserra joined the channel
arteme joined the channel
hwrd|work joined the channel
aeikenbe_ has quit
ehmatthes joined the channel
chrisstreeter has quit
chrisstreeter joined the channel
arteme
hi! I have an interesting problem -- I have many installations of the same project on different machines and one of them is exhibiting a problem when an add view for a ModelAdmin of a particular in the admin site does not show any inlines
dirn_ has quit
patrick91 joined the channel
the problem is that it still requires the management form instance on post
garnertb has quit
dirn joined the channel
garrypolley joined the channel
dirn has quit
kenbolton has quit
dirn joined the channel
sari11 joined the channel
sari11
How would I do something like this from within python? <img src="{% static "project/images/logos/logo_draft1.png" %}"/>
stilgar has quit
epicowl has quit
Z_A_M joined the channel
FunkyBob
sari11: have a look at hwo the static tag works... it's quite simple
schinckel
sari11: You'll do something like that from within your template, not within python.
breno has quit
sari11: Except, the stuff in the string will probably not include your <project-name>
jjmalina has quit
sari11: But yeah, read the documentation about it.
sari11
got it :) thanks a ton link = "<img src=\"/static/project/images/flags/flags/flat/16/" + filename + "\">";return mark_safe(link)
mattmcc
Eh, you probably don't want to hardcode your static URL.
schinckel
sari11: Yeah, that's probably not a good idea.
mattmcc
See staticfiles.finders.find
sari11
ah :\ i can't seem to get any static stuff to work unless it's in appname/static/appname/
nicholasserra has quit
mattmcc
Well, that's the only place they're looked for by default.
You can also add directories to STATICFILES_DIRS.
enemykite has quit
cl0secall
I figured my own problem out: the app set ALLOWED_HOSTS and it was wrong
sari11
mattmcc: this is just testing/development, still bad to do so? will have to change everything on deployment machine anyhow
cl0secall has left the channel
mattmcc
sari11: You'd be amazed how often "It's just for testing" becomes production code before anyone notices in time to fix it.
breno joined the channel
sari11
ahh
eedeep
mornings... i'm calling my_form.save(commit=False) where form.is_valid() has already been called and is True but for some reason the data in my_form.cleaned_data isn't getting set on the new model instance which comes back from my_form.save(commit=False)