Re: How to undisplay the field with empty value in django admin?

2018-03-24 Thread Cictani
Hi, I think you have a misconception in your model. What you need is a many to many relation so it does not matter how many metabolites each Reaction has. I am not so fimilar with Chemistry. So each stoichiometry belongs to exactly one metabolite? if yes you could create an additional Model c

Re: How to undisplay the field with empty value in django admin?

2018-03-24 Thread Cictani
Sorry it is not a many to many relation anymore but a one to many (from the new models perspective) Am Samstag, 24. März 2018 11:24:48 UTC+1 schrieb Cictani: > > > I think you have a misconception in your model. What you need is a* many > to many* relation so it does not matter how many metabol

Re: How to undisplay the field with empty value in django admin?

2018-03-24 Thread Cictani
Grammarly messed up my post quite badly... You should set the extra attribute to 0 (so only if there is data admin will display an entry. If you set it to 6 it will display 6 empty entries but that's what you wanted to prevent) In your admin.py you have to create an InlineAdmin for > Stoichio

Re: How to undisplay the field with empty value in django admin?

2018-03-24 Thread shawnmhy
Dear Cictani: Thank you for your great kindness! However, if I create the additional model which maybe called stoichiometry metabolite, then I should I arrange the database t accommodate this class? To make my question better understood, I posted my database of Reactionmeta as below:

Re: How to undisplay the field with empty value in django admin?

2018-03-24 Thread Cictani
After adding the new model and doing the migration you have to write a small script which will convert the data. You have to go through all the Reactionsmeta objects with for reaction in Reactionsmeta.objects.all(): Then within the for loop you have to create another for loop which will go thr

Django deployment

2018-03-24 Thread Goran Radanovic
I have set up a server with Ubuntu, Nginx, uwisg, Postgres and Django. I got this part figured out its running multiple sites with each of its own virtalenv. My development is on Windows 10 and pycharm, what I haven't figured out is how I can develop in pyCharm and then deploy to my server. D

Re: Django deployment

2018-03-24 Thread graeme
On Saturday, March 24, 2018 at 12:42:52 PM UTC, Goran Radanovic wrote: > > I have set up a server with Ubuntu, Nginx, uwisg, Postgres and Django. I > got this part figured out its running multiple sites with each of its own > virtalenv. > > My development is on Windows 10 and pycharm, what I h

Re: Search by entering to value in JSONField PostgreSQL

2018-03-24 Thread Алексей Кузуб
Thank's for your answer. As I know when we are using JSONField Django translate __contains in SQL with @> that check entering json in json. So it can't help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Django deployment

2018-03-24 Thread Dylan Reinhold
First off nothing wrong with using your windows 10 box for development. Now using sqllite for your test could lead to issues when you go to deploy. I am guilty of doing to also some times. But here is my deployment flow: Develop on my laptop, check my changes into git Push my changes to github o

django 2 ajax search example

2018-03-24 Thread Carl Brubaker
I am having much trouble getting an AJAX search to work. I am working with django 2, and all the examples and tutorials I can find are django 1.x. The code that I have that almost worked once(I think - it put the request through but never displayed results) has been greatly butchered as I've tr

Advertising a new Django open source project?

2018-03-24 Thread 'Simon Connah' via Django users
Hi, First of all, I am sorry because I know that this is off-topic but I couldn't think of a better place to ask the question. I'm in the process of developing a cross between a blog, a media gallery and some essential e-commerce features which is designed for end users rather than other Django

Re: Advertising a new Django open source project?

2018-03-24 Thread Egor Smolyakov
Hello, Simon. I had a similar question a few months ago when I advertised my project https://github.com/egorsmkv/simple-django-login-and-register So, I posted the url of my project to these Reddit hubs: - https://www.reddit.com/r/django/ - https://www.reddit.com/r/Python/ Also, I posted the url

Django channels 2 and data binding

2018-03-24 Thread Fabio Andrés García Sánchez
Is there any example about how to use data binding with django channels? I could not find any source to insertando how to do it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, s

Re: Advertising a new Django open source project?

2018-03-24 Thread 'Simon Connah' via Django users
Hi Egor, Thank you for the reply. When I get a bit nearer to completion I'll certainly follow your advice. Thanks for the links. Simon. On Saturday, 24 March 2018, 20:03:41 GMT, Egor Smolyakov wrote: Hello, Simon. I had a similar question a few months ago when I advertised my project

Re: Django channels 2 and data binding

2018-03-24 Thread Andrew Godwin
There are no examples yet - I removed data binding from core Channels in the 2.0 release because it had a high maintenance overhead and as yet there's not a replacement. I was hoping someone might volunteer to help build it as an external package but if not, I may eventually get time to write it la

Re: Django channels 2 and data binding

2018-03-24 Thread Fabio Andrés García Sánchez
Thank Andrew. I would like to know if it is a good idea to keep using django 1.x to get data binding or would you recomend another path to keep update my frontend with my lastest data? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc