ManyToManyRel without through

2017-12-15 Thread Mirek Zvolsky
Hi, I'm a beginner in Django. I try implement both sides acces to m2m relation and I have found this old article about it: https://www.lasolution.be/blog/related-manytomanyfield-django-admin-site.html Starting question: 1) is this still the good way in 2017/dj2.0? do we have something better for

Re: django 2 under python 2

2018-01-25 Thread Mirek Zvolsky
Isn't the question a little oposite, Avraham ?? Dne čtvrtek 25. ledna 2018 22:42:37 UTC+1 Avraham Serour napsal(a): > > > I wonder why this is happening... > because django 2 doesn't support python 2 > > I suggest using python 3.6 > > On Thu, Jan 25, 2018 at 9:50 PM, Andy > > wrote: > >> Hi! >>

Re: How to install and use Django

2018-02-12 Thread Mirek Zvolsky
Hallo Etienne. System Python and system python modules are provided for all system applications written in Python (made compatible with distributed python+modules versions). Of course you can use it for your applications too, however you have no control over system upgrades. After a system upg

Re: How to install and use Django

2018-02-12 Thread Mirek Zvolsky
>> inderjeet What about this tutorial: https://simpleisbetterthancomplex.com/series/beginners-guide (if you use it and will be confused about (old)virtualenv vs. python -m venv, read the discussion bellow the article) My tip for IDE: PyCharm. PyCharm Community Edition for beginning. And my othe

Re: How to install and use Django

2018-02-12 Thread Mirek Zvolsky
>> inderjeet What about this tutorial: https://simpleisbetterthancomplex.com/series/beginners-guide (if you use it and will be confused about (old)virtualenv vs. python -m venv, read the discussion bellow the article) My tip for IDE: PyCharm. PyCharm Community Edition for beginning. And my othe

good upload widget?

2019-05-15 Thread Mirek Zvolsky
For py3/dj2 I need to choose an upload widget (ie. something what I can use easy with widget=...). At this time for standard documents, not neccessary for pictures (but it could be fine too). Only one thing is absolutely important for now: attachet files must stay after submit+failed validation

How to make custom field (defined as function) in StackedInline hidden?

2018-09-09 Thread Mirek Zvolsky
Django 2.1. I have this code: class AnswerInline(admin.StackedInline): model = Answer form = AnswerForm fields = ("question_answer_type", "answer_plain") readonly_fields = ("question_answer_type",) def question_answer_type(self, row): return row.question.answer_type This wor