ah nevermind, even if it works, it will be a bad idea in my case :P
shangxiao
pacebrian0: and self.num? where is this defined?
Herehere has quit
pacebrian0
shangxiao: 1st bit didn't work, basically i tried to call an instance in probe but I screwed up badly. I want num to be the serial (PK) of the instance i want to change
shangxiao
well doing it that way is incorrect
Silox| joined the channel
create a new probe, save it, assign it to calibration, then save calibration
falk0n joined the channel
tomchristie joined the channel
or if probe already exists, just update the data
also, you should capitalise your class names
busla joined the channel
Herehere joined the channel
you really need to look at running flake8 on your code :)
shangxiao: if I do that, I will run into the same problem when I assign. Is there any way I can access a particular instance inside the same class, like an instance where the passed serial number is the same as a particular instance?
Quitta joined the channel
Herehere
Im not sending data to TaskCreateForm, but to a function
shangxiao
pacebrian0: i'm having trouble understanding what you want to do
firstly stop using the word serial :)
dfunckt joined the channel
just say pk if that's what you mean
or id
afx joined the channel
and if you want to access an instance of a model, you need to use <Class>.objects
silentninja95 has quit
not sure if self.objects is a thing, never tried
pacebrian0
shangxiao: in my calibration class, I call a function in the probe class, passing in a FK of the probe class and a date to be updated. In the probe class, I want to get the instance where the FK I passed is equal to the PK so I can update the date. P.S. sorry for the serials :)
Quitta has quit
Herehere has quit
rdorgueil joined the channel
shangxiao: so basically, var=probe.objects where PK==FK ?
j1fig has quit
xterm joined the channel
j1fig joined the channel
nlh joined the channel
Andy80_ joined the channel
Tennis joined the channel
jiang42 joined the channel
hyperair has quit
hyperair joined the channel
busla has quit
jiang42 has quit
linkedinyou has quit
kezabelle
shangxiao: self.objects is explicitly not a thing; it'll raise an exception saying you can't access the manager from an instance
though you can do self.__class__.objects which achieves the same thing.
logankopas joined the channel
quazifarhan has quit
msc joined the channel
logankopas has quit
Hairy has quit
dfunckt has quit
lorddaedra joined the channel
quazifarhan joined the channel
grumpi has quit
lorddaedra has quit
quazifarhan has quit
busla joined the channel
WhiteMan77747 joined the channel
WhiteMan77747
How can i install virtualenvwrapper with python 2.7 ?
Hairy joined the channel
doismellburning
WhiteMan77747: Welcome to #Django; your question seems unrelated to Django - maybe #python would be more help
rdorgueil has quit
j1fig has quit
j1fig joined the channel
lorddaedra joined the channel
aviraldg joined the channel
Nizumzen has quit
lorddaedra has quit
slicefd joined the channel
rdorgueil joined the channel
prydie has quit
lxer joined the channel
xterm has quit
rdorgueil has quit
j1fig has quit
busla has quit
Fisiu joined the channel
Fisiu
hi
rdorgueil joined the channel
andrew9184 has quit
I'm using circus + chaussette (with nginx), if I set some env in circus.ini, how can I read them in my settings.py?
lxer has quit
doismellburning
Fisiu: presumably the way you would with any other environment variable
hey guys, does anyone know if django-reversion can handle large datasets? i am using it on a 300.000 records table with e 2Gb machine but it takes tooo long. anyone?
Saturn812 has quit
brat197 has quit
fission6_ joined the channel
Silvering joined the channel
hyperair has quit
Silvering
Hi everyone! I trying to sort my list of products (in the admin panel), in alphabetic order. That is the best way to do that? Thx!
hyperair joined the channel
tomchristie has quit
kezabelle
Silvering: set the ordering attribute on your modeladmin?
hyperair has quit
MisterLemons has quit
drag0nius joined the channel
sudomarize joined the channel
Saturn812 joined the channel
Andy80
hi
drag0niu1 has quit
Silvering
kezabelle: Ok thanks I try
SDCDev joined the channel
Andy80
in a project I have a custom User model and since I will need to use the same model in another project, I'm trying to extract it from the main project and make it a library. I've never done this before (I mean, extracting a UserModel into a separate library). I was wondering if there is a particular way I should structure my library project to make it testable (as in unittests) without having to import the library into a full Django project. Are
there any example of this I can give a look at? Thanks