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
Mirco
How to make only one request with waypoint so as to avoid duplication
Man pls stop to ask this question so many times We have understood you have this issue
Anonymous
Can we use postgresql in pythoneanywhere free account
Rohan
I don't think so
Rohan
Heroku does provide database for free but upto 10k rows only
Anonymous
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
Deserves a warn
Anonymous
agian 😞, Exception Type: OperationalError at /register/ Exception Value: no such table: auth_user got this error
Jimmies San
Any help
let me check my crystalball to see your unshared source code
Anonymous
let me check my crystalball to see your unshared source code
https://github.com/django-webapp/webapp Changed db from postgres to sqllite
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?
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
Firdaus
Hey could anyone tell me any other online source for learning django other than the official documentation...
Any of the top Google search should be worth following. Try to avoid any that's using Django version older than 1.11.
Anonymous
https://github.com/django-webapp/webapp Changed db from postgres to sqllite
Guys, still didn't find the solution, any one faced this before
Mirco
Guys, still didn't find the solution, any one faced this before
I don't think localhost is correct as database host, PythonAnywhere exposes its DB to a specific host
Mirco
Read better how to config Django on PA
Anonymous
Read better how to config Django on PA
I tried all the ways by google, but i didn't found cause for that error
Mirco
I tried all the ways by google, but i didn't found cause for that error
Into Python Anywhere config page , you should find database host url You should use it into your Django settings https://tutorial.djangogirls.org/en/deploy/
Anonymous
Into Python Anywhere config page , you should find database host url You should use it into your Django settings https://tutorial.djangogirls.org/en/deploy/
I am able to view my site but the issue with database only, whenever i try to login or register getting the error
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.
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?
Ronald
how start django learning?
by building something. 😄
Aakash
any tutorials for it
Aakash
??
Ronald
any tutorials for it
yeah dude. I learnt with Django for Entrepreneurs on youtube
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
BlogList and BlogDetail
Consider this in MVT way
cvam
BlogList and BlogDetail
i want to know that the best way using view
Disekurity
i want to know that the best way using view
Yeah that's what I told you CBV or FBV depends on you
Disekurity
Hey could anyone tell me any other online source for learning django other than the official documentation...
I have some collection of django books(paid) and tutorials. If you're interested, you can hit my inbox for business😊
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
Your question*
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) 🇳🇴
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
Doug
hey can you please give a source im tired of trying
instead of int:pk use slug:post_title and then pull it from the database that way inside of your view
Doug
hey can you please give a source im tired of trying
https://wellfire.co/learn/fast-and-beautiful-urls-with-django/
Anonymous
wtf?
Anonymous
wordpress?
Ronald
Django got acquired by WP