Re: access league by league-code REST api

2019-07-07 Thread Derek
Have you tried without the {'code'} As per their example: [image: api1.png] On Thursday, 4 July 2019 23:42:05 UTC+2, omar ahmed wrote: > > hiii .. > i use REST api to get data from "https://www.football-data.org"; .. > i want to create one view that can restore any league (by league code > lik

Re: get_absolute_url() necessary with ModelForm ?

2019-07-07 Thread Axel Rau
> Am 06.07.2019 um 18:28 schrieb Daniel Roseman : > >> On Thursday, 4 July 2019 18:45:47 UTC+1, axe...@chaos1.de wrote: >> I’m using a model in 2 apps with different urls. >> Subclasing it and overwriting get_absolute_url() did not work, >> because it mangled dbtable. >> UpdateView does not wo

Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
Hi All, I am using channels to implement WebSockets. I am trying to send data through WebSockets from *post_save *django signal. Below is my code. **signals.py** @receiver(post_save, sender=CheckIn) def send_data_on_save(sender, instance, **kwargs): channel_layer = get_channel_layer() s

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Andrew Godwin
Hi Rohit, This is my fault - we made a change in the "asgiref" library that inadvertently removed Python 3.5 support. Channels still needs to support it (even though Django doesn't). If you update to asgiref 3.1.4, which I've just released, that should fix the issue. Andrew On Sun, Jul 7, 2019

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
Hi Andrew, Just a small doubt, why same code is working on my local system. Both local and server have same version of requirements mentioned in requirements.txt Rohit On Sun 7 Jul, 2019, 9:36 PM Andrew Godwin, wrote: > Hi Rohit, > > This is my fault - we made a change in the "asgiref" librar

Re: Django Interview Questions

2019-07-07 Thread pooja kaur
I have updated with fresh list of django interview questions for freshers and experienced persons. Here is the list https://onlinetutorials.today/python/django-interview-questions/ On Monday, November 2, 2009 at 9:06:41 PM UTC+5:30, Dimitri Gnidash wrote: > > Hey guys, > > For all those of

Re: problem in login rest API framework

2019-07-07 Thread Nidhin K
I couldn't see you inherited from AbstractUser class in your defined Student model shared here. Thanks On Sun, Jul 7, 2019, 10:47 AM laya wrote: > AttributeError:'Student' object has no attribute 'check_password' >

Re: Multiple roles Django 2

2019-07-07 Thread Deepraj Devikar
moldels.py On Sun, Jul 7, 2019 at 9:33 AM laya Mahmoudi wrote: > You should add some code in your settings.py like AUTH_USER_MODEL= > 'appname.modelname' which inherits django user mode. > > > در تاریخ یکشنب

Re: django sessions

2019-07-07 Thread Chetan Ganji
Hii, below answer might ring some bells. https://stackoverflow.com/questions/2551933/django-accessing-session-variables-from-within-a-template Cheers! On Sat, Jul 6, 2019, 5:24 PM Luka Lelashvili wrote: > Hello, how can I access session in my base.html? {% request.session.name > %} doesn't wo

insert or update on table "app_job" violates foreign key constraint "app_job_user_id_f90a6dd9_fk_accounts_user_id" DETAIL: Key (user_id)=(3) is not present in table "accounts_user".

2019-07-07 Thread Aayush Bhattarai
[image: Capture.PNG] *I have used a function-based View to get data from post Request. I need to get many data that also include a primary key field too. I need to push data into two models. While doing so, I encountered an error.* #accounts models.py from django.db import models class User(

Help

2019-07-07 Thread Yeashin Rabbi
Hi Everyone, I have a model with a manyTomany field. I've created an update view for this model and the widget for manyTomany field is FilteredSelectMultiple. How to render the selected value for the manyTomany field in right side box of FilteredSelectMultiple widget while visiting the page?

having problem in login rest API

2019-07-07 Thread laya
Hi, Please help me in this part, I stuck in some days, My project is about a university system which professors and students can sign up and login. I use Custom User Django which inherits User Django Model. It should be mentioned that login is by identity number and Student-no and Professor-no.

Re: having problem in login rest API

2019-07-07 Thread Aldian Fazrihady
It is in user object instead of student object, right? Regards, Aldian Fazrihady http://aldianfazrihady.com On Mon, 8 Jul 2019, 11:12 laya, wrote: > Hi, > > Please help me in this part, I stuck in some days, > > My project is about a university system which professors and students can > sign

RE: having problem in login rest API

2019-07-07 Thread laya
Yes Check_password attribute is in Django user model and when I write Customuser. Objects.filter() it errors that Student_no is not an attribute for User Django Model. Sent from Mail for Windows 10 From: Aldian Fazrihady Sent: Sunday, July 7, 2019 9:18 PM To: django-users@googlegroups.com Subje