#django

/

      • shangxiao
        pacebrian0: how about self.probe.updatecals()
      • j1fig has quit
      • Herehere
        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 :)
      • jtiai has quit
      • doismellburning
        yay flake8
      • also, yay landscape / prospector
      • Herehere
        Guys I have this form: https://cdn.pbrd.co/images/2igltIFq.png I'm doing autocomplete form with AJAX. Normally I just send 'Employee' input.text().
      • But this is wrong way, because I need their ids
      • so my question is how to get form data without submit?
      • m8 joined the channel
      • FinalAngel joined the channel
      • shangxiao
        jquery.serializeArray() can apparently do that
      • Herehere
        shangxiao: this is my Ajax function https://dpaste.de/4tWu
      • j1fig joined the channel
      • pacebrian0
        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
      • (though you may find https://django12factor.readthedocs.org/ etc. useful)
      • mrb101 has quit
      • Fisiu
        doismellburning: os.environ.get should work then? thanks for url
      • rdorgueil has quit
      • doismellburning
        Fisiu: assuming "set some env in circus.ini" means "setting environment variables", yes
      • (I've no idea what circus/chausette are)
      • Fisiu
        chaussette is a wsgi server while circus is a process and socket manager
      • iimrija joined the channel
      • iimrija
        hello, how do I get_xxx_display() from instance in post_save for my model ?
      • ichag joined the channel
      • when I do instance.get_xxx_display() it prints key instead of value
      • I have tuples in my Model
      • like (1, "new task")
      • it prints 1
      • instead of new task
      • kezabelle
        dpaste code and any error or output
      • MasterPiece joined the channel
      • Schrostfutz_ joined the channel
      • lxer joined the channel
      • jladage has quit
      • jMyles joined the channel
      • iimrija
      • this is my model
      • this is output email
      • jladage joined the channel
      • WhiteMan77747 has left the channel
      • bmispelon has quit
      • kezabelle
        I … hmmm.
      • psychok7 joined the channel
      • psychok7
        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
      • Satchitananda has left the channel
      • julienp joined the channel
      • keshav89 joined the channel