amar
Yes u can create one py file and u can insert in database using Python script
amar
Database testing use Python faker module to test all field and capacity of data to insert numbers of field at a same time
Anonymous
I am trying to paginate with infinite scroll with waypoint.js
Anonymous
Waypoint.js is making two ajax calls with same page number resulting in duplication
Anonymous
I have checked there is only one infinite-more-links element
Anonymous
How to make only one request with waypoint so as to avoid duplication
Anonymous
Can we use postgresql in pythoneanywhere free account
Rohan
Rohan
I don't think so
Rohan
Heroku does provide database for free but upto 10k rows only
Anonymous
Rohan
Mirco
It's the 10th times he forwards the same question
I know it's just asking, but we are trying to help him, there's no need to forward the same thing n-times
And don't call me nigga pls 😁
Rohan
Rohan
Deserves a warn
Anonymous
agian 😞, Exception Type: OperationalError at /register/
Exception Value: no such table: auth_user
got this error
Mirco
Anonymous
Anonymous
Jimmies San
Any help
let me check my crystalball to see your unshared source code
Anonymous
JSONDecoderError????
Anonymous
Hi I'm getting
Anonymous
Traceback (most recent call last):
File "test.py", line 50, in <module>
delete_resource(2)
File "test.py", line 49, in delete_resource
print(r.json())
File "/home/sree/miniconda3/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/home/sree/miniconda3/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/home/sree/miniconda3/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/sree/miniconda3/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Anonymous
def delete_resource(id):
data = {
'id':id,
}
r = requests.delete(BASEURL+ENDPOINT,data=json.dumps(data))
print(r.status_code)
print(r.json())
delete_resource(2)
Rammanoj
do the api send any json response after perfoming the request ?
Anonymous
No responce
Anonymous
Hey could anyone tell me any other online source for learning django other than the official documentation...
Anonymous
Regarding translating my code :
I have to run command
makemessages --all.
there's a problem
It marks all strings that I have marked in my code. But what about internal string? Like errors on forms? How to mark them and get them inside .po file?
Sebuhi
Anonymous
How can i get queryset with related fields value. I’m getting related’s datetimefield with annotate max. I can not get related row’s another field which row has max datetimefield.
Anonymous
Can anyone help, Im stack on this for two week
Anonymous
Mirco
Read better how to config Django on PA
Anonymous
Anonymous
Le me try this on heroku😔
Nithin
Hi, I am trying to implement permissions for a sales analytics SAS app written in DRF.
The stores are classified into regions and regions into countries. The user can have permissions like view_analytics, Upload_data, approve_forecast etc. And the user can have there set of permissions for a store, region or country.
If its for a region the permission applies to all stores in that region and so on. The user can either choose custom permissions or choose a predefined role like view_all, edit_all.
Now whats the best way to implement this? I have looked into many libraries like django guardian , authority etc. None seems to satisfy all the needs. If i am implementing everything from scratch I am afraid it will be a lot of work and will miss some optimizations like permission catching.
Mirco
Belmo NaTazu
Hi, show your code please
Mirco
It looks like you are reinventing the wheel
Django already has a LoginView that you can use
Mirco
By rewriting what Django devs have written ?
Mirco
You wanna try something new but your code looks like a normal login view already implemented in Django
Mirco
So you wanna just override the default form , not logic right ?
Mirco
So you can inherit from LoginView and override form class , so you can use your form and keep logic of LoginView
Aakash
how start django learning?
Aakash
any tutorials for it
Aakash
??
Ronald
that’s what got me going
cvam
what is best way to create a new page for each article in the blog app...any suggestion , link
Disekurity
cvam
cvam
path('post/<int:pk>/', views.post_detail, name='post_detail'), how to make the new url looks like the post title in the database
Disekurity
Disekurity
Your question*
Mirco
Anders (izzno / gooood) 🇳🇴
python manage.py collectstatic --no-input
Output:
0 static files copied to '/app/staticfiles', 9 unmodified.
I added some new JS files and I can see them in the static production folder which means it got collected. (And they work) Anyone seen this ?
Anders (izzno / gooood) 🇳🇴
I can even see by the timestamp it was created by that command...
Husanboy
Hello everyone , who can recommend book from DJANGO RESTFRAMEWORK for beginners??
(Will be very useful with practise which include realtime projects)
Anders (izzno / gooood) 🇳🇴
Husanboy
Anders (izzno / gooood) 🇳🇴
yw ;)
Ivan
Hello everyone. Someone can give advice? ... I have to do a registration web page, it has information about courses, every course has the number of available tickes... so, I have to automatically refresh that number when someone registers on it...
cvam
Use a slug
hey can you please give a source im tired of trying
Anonymous
wtf?
Anonymous
wordpress?
Ronald
Ronald
Django got acquired by WP