Anonymous
You don't need to copy the venv directory. Just the pip list or pip freeze
Raam Goulikar
override the save() function in the model you want to save them
Thanks for this. Another issue i face is i dont get any solution if need to use the values from parent table to derive columns in the child table do you have any suggestions?
swagBit
Hai there, I'm interesting to do an app with Django and react. But I didn't know much more about react.Please suggest any useful tutorials and videos for building an app with Django and react. Thanks.
Maksim
You need make only rest api on django and use it on react
Anonymous
What is the purpose of using MEDIA_URL='/media/' and STATIC_URL='/static/'
Mirco
What is the purpose of using MEDIA_URL='/media/' and STATIC_URL='/static/'
This will be what you will see into the address panel of your browser or network tab It's the generic url to your statics
Anonymous
How to see our database in admin panel after deployment on Heroku web server ?
Ghorz
Django 3.0 BETA 1 REALEASED. https://www.djangoproject.com/weblog/2019/oct/14/django-30-beta-1-released/
chicoMTZ
read a couple pages of this https://docs.djangoproject.com/en/2.2/topics/auth/default/#permissions-and-authorization
This doesn't help, I don't see there where I can add fields to the permission's table
raven
There are many use cases of having virtual env 1. Think of like you have one project you made today with django version 2.2 and in future you want to try django 3 if you did that your old project will start giving problems as now your machine have v3 but your old code knows only v2. 2. Easy Deployment : You can easily create a requirement file with pip freeze when working in venv .if you did that without environment it will list down all packages in your system which will be of no use.
Денис
This doesn't help, I don't see there where I can add fields to the permission's table
https://docs.djangoproject.com/en/2.0/topics/auth/customizing/#custom-permissions
Денис
but this is the last time I googled that for you
chicoMTZ
I have been reading that doc, with that, I can add field neither
chicoMTZ
*I can not add
Максим
Hi all
Максим
https://pastebin.com/fU6wCWr5
Максим
my question is on 1st line
Максим
can anyone help me ?
Максим
how can i get only name field from route model? class StatSerializer(serializers.ModelSerializer): route = RouteSerializer() # pay_btn = PayButtonSerializer() # car = CarSerializer() # driver = DriverSerialzier() class Meta: model = Stat fields = ("route__name", "pay_btn", "car", "driver", "time")
Максим
this code returns The field 'route' was declared on serializer StatSerializer, but has not been included in the 'fields' option.
Андрей
One for all Route model and another one for Router.name
Максим
so it will look like this { 'route': { 'name':'name' } }
Максим
can i do simple {'route_name':'asdasd'}
Андрей
to_representation method can be usefull, but if you want POST data you should use something else
Максим
only GET data
Андрей
override to_representation()
Андрей
def to_representation(self, instance): """Convert username to lowercase.""" ret = super().to_representation(instance) ret['username'] = ret['username'].lower() return ret
Андрей
ret['route'] = instance.route.name
Rocky
Anyone help me, how to iterate two objects simultaneously in single ' for loop'
Anonymous
What Url multi threading?
Rocky
Thnx 🙏🙏
Rocky
Ya
Rocky
but my situation is dffnt
Rocky
for() { for(){} for() {} }
Nikhil
Can django+ html be used to make full operational website that Can be made with CSS +HTML +JAVASCRIPT
Anonymous
Hi guys
Anonymous
any problem if I learning Django V1?
Javi
Django 1.10 support will be dropped in April 2020
Maksim
Maksim
Who can explain how use annotates?
Maksim
Any examples
Amit
Django 3.0 beta 1 released https://twitter.com/djangoproject/status/1183704364017475585?s=19
Amit
👌
Amit
Any one start work on 3.0 ?
Amit
Or use 3.0 ?
Mirco
Any one start work on 3.0 ?
Not recommended until a stable one will drop off But you can start testing it 😁
Amit
😄
m0nte cr1st0
help pls https://stackoverflow.com/questions/58382810/pythonanywhere-django-db-utils-operationalerror-no-such-table
m0nte cr1st0
Mirco
It's not a answer
Yup, he told u you have to use migrate
Ghorz
🤟🏻
Utils has be extensively dismembered
m0nte cr1st0
Yup, he told u you have to use migrate
It's not a solve for this problem.
Ghorz
This doesn't help, I don't see there where I can add fields to the permission's table
I believe you're a pro that's why you want to modify permissions table. Just extend the permissions rather than modify the table.
Mirco
It's not a solve for this problem.
You want your "dinner" ready Try to think about the problem more by yourself, read better docs and then everything will be easier 😊
ignacio
Hello guys, how can i add subdomains to my Django app. Something like this path('', views.index, subdomain='example')
Anonymous
Omar M.
Hello
Omar M.
User Story 1: As a user of jobsforhumanity.com, I want to automatically have jobs which match my needs emailed to me so that I don’t miss out on new job opportunities. Below is a simplified version of my Candidates model and JobListings model. Candidates Experience (e.g. Junior, Intermediate, Senior) Industry (e.g. Accounting, Marketing, Web Design) Purpose (e.g. Climate Change, Plastic Crisis, Ocean Health) Location (Country, City) JobListings Experience (e.g. Junior, Intermediate, Senior) Industry (e.g. Accounting, Marketing, Web Design) Purpose (e.g. Climate Change, Plastic Crisis, Ocean Health) Location (Country, City) User Story 2: As an admin for jobsforhumanity.com, I want to automatically match (based on the 4 criteria above) new jobs that have been added to the database with candidates and send them customised emails every 3 days so that I don’t have to manually trigger the emails to send. I am not looking for the actual code you would write but more an explanation for how you would go about solving this problem, how you would set it up and what services you might use.
Ghorz
Python 3.8 stable release now available https://docs.python.org/3.8/whatsnew/3.8.html
Ghorz
:= better part of it
Mirco
:= better part of it
Golang influencer