Mirco
Can anyboday help me in django fileupload code
Have a look at the docs, everything is inside it
international
I tried all possible solution
Anonymous
just use a FielField?
Mirco
Some error are there
Share the code via pastebin
international
No reverse match
AV
So just use html and css
I don't understand how can i do it exactly. I implemented a html template and a style to it, but i'll get this template as plain text
Anonymous
I don't understand how can i do it exactly. I implemented a html template and a style to it, but i'll get this template as plain text
I dont think this is a django problem. You should look into html and css, maybe a tutorial on creating an email template
international
Can anybodody help me uploding file code
international
Sorting
manoj
Can any one pls tell me ,What are the tools we use in django
manoj
Are pycharm ,fabric ,ide are they called tools ,?
Anonymous
🙄 it depends on interviewer
Harsh
How can I control number of connections made to database in a Django rest Framework? I'm using dj_database_url...(conn=600) And it exceeds my database host plans for maximum connections
Charles
How can I create a custom user with username name as the unique field?
Anshu
How can I create a custom user with username name as the unique field?
What's the issue with built in validation. U can use, unique=True,
Aneesh
I have passed a class as a argument. Result = client.publish() Client is the class and publish is a function inside the class. I need to patch this publish function.how to do this in python unittest.any one know about this?
Sherlock
For projects Is using sqlite considered poor choice ? Some say it's not considered as a real database. If I use sqlite , will this downgrade my resume. 🙏
Anshu
For projects Is using sqlite considered poor choice ? Some say it's not considered as a real database. If I use sqlite , will this downgrade my resume. 🙏
sqlite is definitely not fit for production server, It cannot handle too many concurrent queries and request
Anshu
If u r planning on making the project live, definitely not
Anshu
However for testing u can use it
Sherlock
If u r planning on making the project live, definitely not
Ok brother, I'm using this for resume projects
Anshu
Ok brother, I'm using this for resume projects
U can use postgres, it's probably the best out there for django
Sherlock
U can use postgres, it's probably the best out there for django
Ok bro, postgres is just as easy as sqlite? Right brother ??
Anshu
Yea all the heavy lifting is already done by django-ORM. Just configure the server for postgres and u r good to go U can find tutorial for configuration
Anonymous
Sqlite is light weight DB, problem with it is multiple query/connection will lock database that's it
John
rich text field are not added in django admin
Anonymous
If db get's locked then your data is done
Sergio
Hey people, Could anyone help with this error? TemplateDoesNotExist I just wanna prove the reset password endpoint from djoser
Sergio
Thanks in advance!
Benson
Hello guys. So im building a django bank project for fun, and it has 4 main apps -Accounts app- -Transactions app -online banking app -loan processing app Now I appreciate the need for a well designed database and im trying to create models for all the involved entities. i however wonder, is it possible to create a single unified database or model away from the apps then have the views in the individual apps connect to the db? or maybe, could we have a single app having the entire dayabase models then importing the app models to the other apps views? im relatively new to django, and this is the first big project i have undertaken. any help would be appreciated. Thanks in advance!
Damilola
Hello guys. So im building a django bank project for fun, and it has 4 main apps -Accounts app- -Transactions app -online banking app -loan processing app Now I appreciate the need for a well designed database and im trying to create models for all the involved entities. i however wonder, is it possible to create a single unified database or model away from the apps then have the views in the individual apps connect to the db? or maybe, could we have a single app having the entire dayabase models then importing the app models to the other apps views? im relatively new to django, and this is the first big project i have undertaken. any help would be appreciated. Thanks in advance!
The main reason for apps is for modularity. Modularity is a functional paradigm (best practice) for scaling projects. Cloud/Computer is Land, on land you have houses (your project). In those houses you have rooms (apps). There is a reason you have the bedroom and living room and the dining area and the laundry room (For clarity and for functional management). You can chose to separate your softwares into various projects. Or just various apps, depending on what you wish to build and how you want them to scale. For example if you had 2 projects - bank project - loan microfinance project. And they communicated via API You can take down 1 and keep the other running without having to (much) change code
Damilola
Hello guys. So im building a django bank project for fun, and it has 4 main apps -Accounts app- -Transactions app -online banking app -loan processing app Now I appreciate the need for a well designed database and im trying to create models for all the involved entities. i however wonder, is it possible to create a single unified database or model away from the apps then have the views in the individual apps connect to the db? or maybe, could we have a single app having the entire dayabase models then importing the app models to the other apps views? im relatively new to django, and this is the first big project i have undertaken. any help would be appreciated. Thanks in advance!
Either way, it is always best to keep things simple. If we employ that, then "multiple databases" seems complex to maintain/manage and scale. You can make 1 project, multiple apps, 1 database. For models, do an ER diagram or Google one for they type of project you are doing. You can reverse engineer that and use them for models. ER diagrams would show you have the entities relate to each other and what specs each entity has. That in turn transcribed to model fields and model relationships. I hope this helps
Riswandi
not for me too
Anonymous
Any here who can help me
Anonymous
When ever I set up new app register showing error
TЯЕBŌГ
Hello good, first of all I apologize for my English, but I have a very important question: If, for example, I have different types of content (movies, series, video games, etc ...) And I want to make an abstract model because they will share fields such as title, image, description, etc ... I would like to include a category field, but how do I prevent the content from getting mixed up? That is, if the category "action" exists for both movies, series and video games, how would I do so that when I want to get action movies, it does not return video games and series to me?
Jerome
Could try a query with filter( ) and exclude ()
Anonymous
What kind of error
When I try to set up app then perform simple mvt on app that I make
Anonymous
Any here who can set up app
S
Hi! I have list of dictionaries with structure like this: [ { "id": "http://127.0.0.1:8000/api/upload_file/4/", "upload_name": "123", "date_from": "2000-10-05", "date_to": "2000-10-05", "comment": "123", "file": "http://127.0.0.1:8000/files/csv_files/csv_1.csv" }, ... ] My task was to make a link to each copy of the dictionary, so I used HyperLinkedRelatedField for this, but how can I change url in the field "id" to integer value of id, which will be the link? I created this link with the help of this serializer: class UploadFileSerializer(serializers.ModelSerializer): id = serializers.HyperlinkedRelatedField(many=False, read_only=True, view_name='api:customers', lookup_field='pk') class Meta: model = UploadFile fields = 'all'
Michael ✨
Has anyone integrated mercadopago? I have trouble understanding how to do it
Axror
Hi everyone. I have a #question. I used jquery with ajax in my project. And I run python manage.py runserver ajax working well. But in server ajax not working. pls advice me.
Doragonsureiyā
Hi everyone. I have a #question. I used jquery with ajax in my project. And I run python manage.py runserver ajax working well. But in server ajax not working. pls advice me.
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Harsh
How to implement API Key authentication in a Django REST Framework? I want only super user to create an API Key. Repo: https://github.com/YAIFoundation/yaif-url-shortener-api PS: any other suggestions are welcome.
Anonymous
It must be localhost
Axror
😁 check ur template ajax url
other js scripts working well but jquery and ajaxnot working
Axror
I used jquery and ajax for filter. So, ajax works well in my localhost but it not working in server
Axror
yeap
Wanjohi
Anyone who's used django-admin-charts? I need some help with setting dashboard stats criteria
Axror
You mean not working in the Deployed site?
but my other static files working well
William
yeap
In which Heroku or other?
Axror
In which Heroku or other?
other. It is ubuntu server
Axror
and I deployed site with nginx
William
other. It is ubuntu server
Using an apache server?
Aditya
Has anyone used this operation elasticsearch.helpers.bulk()
William
and I deployed site with nginx
https://stackoverflow.com/questions/2451739/django-serving-static-files-through-nginx https://www.digitalocean.com/community/questions/nginx-not-serving-static-files-for-django-app-help
William
and I deployed site with nginx
Check this too https://medium.com/clercode/configuring-django-static-files-with-nginx-1943257c17ad
tushar
hlo
tushar
<a class="btn btn-primary" id="route" href="{% url 'homepage' %}?excel_data={{users}}">GetRoute</a> in users data in json