Re: reg: Django model sequense of the fields

2019-05-17 Thread Test Bot
[Just Curious] would it matter in any way what the position of field is in the respective tables. On Fri, May 17, 2019, 5:46 PM 'Akash Sinha' via Django users < django-users@googlegroups.com> wrote: > Hello > > This happens for 2 reasons > > 1st. Those fields might be Foreign key, Foreign key fie

Re: Anyone kind enough to help me understand these few concepts

2019-05-16 Thread Test Bot
Hi In models you have to define your database tables as class and any response to the user should be handled in views.py You can introduce randomness via random module or for any customisation you can write it as a different app altogether. You can create your coin as a separate model and attach

Re: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

2019-05-16 Thread Test Bot
So one check would be to see all the connections that are allowed by your firewall. On Thu, May 16, 2019, 6:45 PM omar ahmed wrote: > no but can it struggle it ? > how can i check it > > On Thursday, May 16, 2019 at 3:09:55 PM UTC+2, OnlineJudge95 wrote: >> >> Did you check your firewall setting

Re: Getting MultiValueDictKeyError

2019-05-16 Thread Test Bot
Try putting encrypt="multipart/form-data" in your form tag On Thu, May 16, 2019, 6:05 PM Sipum wrote: > Hi Friends, > > when retrieving file that is uploaded , I'm getting multiValueDictKeyError. > Below are my codes. I have proided some codes where I m getting error. > could anyone help me here

Re: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

2019-05-16 Thread Test Bot
Did you check your firewall settings? On Thu, May 16, 2019, 6:37 PM Rob W wrote: > First, you should not share your password to your server to anyone….thats > very dangerous. Now anyone can log in to your server with nefarious > intentions. > Be more careful. > > But it sounds like something on

Re: Can Anyone Please Provide djago-select2 Documentation

2019-05-14 Thread Test Bot
Okay so there is no need to go to different websites if you want to install a Python module. You will find almost everything related to Python modules in pypi.org, it includes everything like installation instructions, gut repo for the packages etc On Wed, May 15, 2019, 11:57 AM Balaji Shetty wro

Re: Failed to push Django project on github using gitbash

2019-04-18 Thread Test Bot
It means your remote has some changes that are not there in your local so when you are pushing, git is unable to merge those changes. Try a git pull then local merge and then push. Feel free to ask in case of any queries. On Thu, Apr 18, 2019, 6:58 PM Mayur Bagul wrote: > Hello Community, > > i

Re: Failed to understand syntax

2019-04-13 Thread Test Bot
That is because Question.objects.order_by("-pub_date") would give you a list of all records so you can simply apply slicing without the use of . operator. For understanding purpose, you can break down your code as result = Question.objects.order_by("-pub_date") > latest_question_list = result[:

Re: Failed to understand syntax

2019-04-12 Thread Test Bot
The part you want to understand is same as ORDER BY clause in SQL. The slicing will provide only the top 5 results. By default the order_by sorts in ascending order only. But providing a "-" would make it to sort in descending order. On Fri, Apr 12, 2019, 6:56 PM Mayur Bagul wrote: > Hello coder

Re: I have created a Django App, How to create a Django App Launcher?

2019-04-09 Thread Test Bot
The issue here is you have a web app and you expect a desktop application. This should be asked on a GUI-Framework mailing list. You can call your APIs from that desktop app instead of writing the same code again(DRY). On Tue, Apr 9, 2019, 8:42 PM Julio Cojom wrote: > Django Is a web applicatio

Re: how can i get current username in model field ??

2019-04-01 Thread Test Bot
+1 DoesNotMakesSenseError("Author of any comment should not be related to the currently logged in user") On Mon, Apr 1, 2019, 7:09 PM Joel Mathew wrote: > This does not make sense to me. A model is not a dynamic entity. It is > something that's created beforehand. Getting the current username in

Re: Unit-Testing Django Views

2019-03-30 Thread Test Bot
Sorry for the bother but I finally solved it by using Django's Test Client and checking for status_code and template used to render the response in my unit-test. Regards, Test Bot On Sat, Mar 30, 2019 at 5:00 PM Test Bot wrote: > I tried removing the {% csrf_token %} from my index.htm

Re: Unit-Testing Django Views

2019-03-30 Thread Test Bot
I tried removing the {% csrf_token %} from my index.html But it seemed to have no effect. I got the following traceback for further clarity * START OF TRACEBACK*

Re: Unit-Testing Django Views

2019-03-30 Thread Test Bot
Thanks everyone for the clearance of the problem. I will remove the unit test's logic to check fir template, it seems a viable test case along with the status code value. On Fri, Mar 29, 2019, 2:24 AM Chetan Ganji wrote: > There is one more way you could do it > > > class TestIndexPageLoad(TestC