These are chat archives for django/django

Jun 2017
Kyle Mulka
Jun 13 2017 00:51
There's nothing stopping you from using make if you want
Jun 13 2017 00:51
I'm looking for an experienced Python programmer who can help me fork's github repository for powering a decentralized lottery application. Here's the link:
Kyle Mulka
Jun 13 2017 00:53
Specifically for venv, check out
My IDE (PyCharm) activates my venv for me
You are looking for something similar to rake, right?
Vinicius Camargo
Jun 13 2017 01:15
Hey @wbeyda and @mulka! Yes, I mean something like rake or npm scripts ;) if you don't mind I'd like to know how to accomplish this with make, since I'm not familiar with it :worried:
Kyle Mulka
Jun 13 2017 03:12
I guess I'm not sure how to do it with make. The way I would normally do it doesn't work, probably because make is a sub process
my Makefile looked like this:
.PHONY: venv
        . venv/bin/activate
Jun 13 2017 06:43
@viniciusCamargo You just want to use pip inside a virtual env. And yes you run source bin/activate everytime you want to work in that environment and deactivate when you are done. That way you can have a ton of different projects going at once and don't have to worry about system wide dependencies.
Jesús Moreno Amor
Jun 13 2017 12:57
Does anyone have an example of Angular2 and Rest Framework login and account management?
Jun 13 2017 13:08
I'm looking for
Python/Cython developers who can fork the following github godebase:
Great financial awards for those who can deliver what we want.
Plz get in touch
Vinicius Camargo
Jun 13 2017 14:28
hey @mulka I tried your makefile but I got a Makefile:3: *** missing separator. Stop. :confused:
Matwey V. Kornilov
Jun 13 2017 19:43

Hello, how to limit Select's choices correctly? I am using UpdateView and

        def get_form_class(self):
                choices = []
                # ...
                return modelform_factory(MyModel, fields=('state', ), widgets={'state': Select(choices = choices) })

but there are still full list of possibilities shown.

Matwey V. Kornilov
Jun 13 2017 19:53
I found the following way:
return modelform_factory(MyModel,
                        fields = ('state', ),
                        formfield_callback = lambda x: x.formfield(choices = choices))
Ryan Moore
Jun 13 2017 20:23
I know this has been asked on SO a few times - I'm trying to use postgres views in my django app. Do I need to make sure that the initial migration doesn't catch my unmanaged table, that represents the view? I keep getting the id does not exist issue
Matwey V. Kornilov
Jun 13 2017 20:24
class Meta:
   managed = False
Ryan Moore
Jun 13 2017 20:26
yea, I used that, and the ORM is still looking for an id field when I query it. Theres no primary_key on my table though, which there shouldn't be, for postgres views
Matwey V. Kornilov
Jun 13 2017 20:27
Can you attach primary_key attribute to some field?
I mean, ORM auto-creates id only when there is no field with primary_key = True.
Ryan Moore
Jun 13 2017 20:42
I'm thinking I can use a OneToOneField, with a primary_key might work. Re-migrating my data now
Shobhit Jain
Jun 13 2017 20:59
Hey guys , I am new to python .Can anybody tell me from where I can learn Django
Jun 13 2017 21:06
Google obey test driven development , msdn django , django girls or on the official django page.
Bruno F Souza
Jun 13 2017 21:23
guys, I'm having a weird issue with django
it seems like I have to create the non-test database before running the tests
if I dont run migrate the tests will fail
Eskil Opdahl Nordland
Jun 13 2017 23:13
Could you provide some code?