Re: Creating a workflow for customer contractor not importing..

2019-08-02 Thread Adam Mičuda
Hi, it seems like *Contractor* class is defined in *RfqInstance* class, just like class *Meta* is. Adam Dne pá 2. 8. 2019 20:55 uživatel Kean napsal: > Hi, > Im new to django, im trying to create a workflow, whereby a customer > creates an RFQ, this flow to a contractor, who can > then accept

Re: filter.update

2019-10-11 Thread Adam Mičuda
Hi, it is not working, because it is not valid python. Use Mydbtable.filter(column = value).update(**{mylist[0]: value}) instead. And keep in mind that value of mylist[0] (any dict key in general) must meet the some criteria to be valid dict key. See https://wiki.python.org/moin/DictionaryKeys

Re: Manually running a script that imports a Django model

2020-02-13 Thread Adam Mičuda
Hi, the solution is written in the error message "You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure()...". But I would recommend you to use https://django-extensions.readthedocs.io/en/latest/runscript.html. I think it is what you are want. ;)

Re: Unit Testing POST request

2020-02-13 Thread Adam Mičuda
Hi, or you can extract the business logic from view to some service and unit test it instead. =) Regards. Adam st 12. 2. 2020 v 21:15 odesílatel onlinejudge95 napsal: > On Wed, Feb 12, 2020 at 6:22 PM onlinejudge95 > wrote: > >> Hi Devs, >> >> I was implementing unit-tests in my Django

Re: Attribute Error

2020-02-17 Thread Adam Mičuda
Hi, you have to return instance of `django.http.HttpResponse` class from you view `RegisterStudent` instead of string: *line 98* and *line 99*. see https://docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpResponse Regards. Adam po 17. 2. 2020 v 13:49 odesílatel Ernest Thuku

Re: Viewing django source code (previous versions) from docs.djangoproject.com

2020-01-15 Thread Adam Mičuda
Hi, Django code is hosted on GitHub https://github.com/django/django. You can select the branch/tag there. The link to github is on homepage too https://www.djangoproject.com/. Regards Adam st 15. 1. 2020 v 19:48 odesílatel Raines DeMint napsal: > Hi there, > I want to be able to view the

Re: ORM from the command line

2020-04-09 Thread Adam Mičuda
Hi, you can also write simple python script and run it in Django context via https://django-extensions.readthedocs.io/en/latest/runscript.html from `django-extensions` package. Best regards. Adam čt 9. 4. 2020 v 17:14 odesílatel Tim Johnson napsal: > Thank you Andréas. I have come across that