Dmitry
Hey, ppl! I've a very actual question: if I want to implement a web app using Django, do I need to split it into small apps? I mean, do I have to implement authorization page and other views separately from each other?
Mohd Zaid
hey there everyone
Chaitanya
I'm a sysadmin and I've to install a django app developed from someone else. I've got following errors: http://paste.scsys.co.uk/596180 How can I fix it? more info: http://paste.scsys.co.uk/596179 Or what may I read to understand the problem?
It may be module dependency error. Ensure you are installing right packages(ver.). Ask your dev team to update the requirements.txt files with right packages and relevant version.
Mohd Zaid
modelname_set.select_related()
Mohd Zaid
what is this select_realated() function
Mohd Zaid
???
Rohan
what is this select_realated() function
https://docs.djangoproject.com/en/3.2/
Kool
Hi guys, I'm having a hard time getting static files to work on heroku. All the other files work except the ones uploaded by the user. I am using whitenoise
Kool
Also where can i get my Django website hosted, seems there are very limited options. I need a service where i just upload my site and make a few changes to the settings file, somewhere where there is technical support. Every other place i go they say they dont offer technical support for django, and they offer only the cpanel, meaning you will have to set everything up yourself, including installing the web server.
Kool
What kinda support you looking for?
As you know, django is quite tricky especially on static files, so I am looking for a hosting service that just allows me to upload my site folder like you do with php sites.
Kool
What kinda support you looking for?
I need support incase i run into technical challenges. I am a developer, but now im having to know how to setup and configure a server since all hosting services im seeing only offer cpanel, and they dont offer any technical support for django sites.
Damir
i just bought virtual machine and configure it with ssh
Ali
Can you show me an example
For example, imagine a user uploads img.png and you store them in /media/avatar/. So the path to the that photo would be /media/avatar/img.png. If u check that url, you will see the photo in your browser. Make sure you've already defined MEDIA_URL in ur settings.
Dmitry
Yes
Wow. Is he really THAT smart? Getting pretty strong Asimov vibes
Dmitry
Depends on you whether you want users to be authorized in the same page they review the posts or separate apps and paths entirely.
Let's say, they need to be authorized only in one module, though some of them (superusers) may have access to all the functionalities, such as adding/deleting records (again, there's an admin module itself where everything can be managed, so why having redundant stuff?) What's your opinion on it?
Lugano
I have this form that you enter latitudes and longitudes and i want it to display a map with that location in a template. How can do this?
Ali
Basically, you need to separate accounting from all other apps.
That's the key. Because you will have lots of operations and tasks in your accounting side of project.
Ali
I have this form that you enter latitudes and longitudes and i want it to display a map with that location in a template. How can do this?
Does Google have any API or something on that?? Try to create an iframe in order to show that.
Dmitry
That's the key. Because you will have lots of operations and tasks in your accounting side of project.
What do you mean by 'lots'? The key feature of my app is such that the students could read online lessons and perform tests. And there will be only one admin who will be adding anything to the DB. Anyway, you're recommending to separate the auth module in order to make it look nicer (good style) and work nicer, am I right?
Dmitry
Authentication is a complex task. It's also customizable. Each developer may want to implement it in his way. I got you. So what's the problem in your case??
The problem is it doesn't work, no matter how I implement it. Seems like the imports in urls are effed up, though I don't see where. So, you recommend to take auth into a separate module, do I get it correctly?
Ali
Guys, two questions! 1. Looking for a doc to implement my view tests. What do u suggest?? 2. Imagine I have tens of Post objects in my DB. I have a search bar in the home page that any user can search through my posts with it. I wanna implement the functionality/queryset that when the user searches through the bar, makes a queryset that selects all those Posts that have the searched keywords available in the title. Search: How Django is good? Output: "Why Django makes Python so good" Any idea??
Ali
I can implement it myself but can't do it work fast in a large scale.
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
edwin
ok
Corteis
please, help I am receiving this error raise NoReverseMatch(msg)... Someone know why?
Avda
Hey am working on a live streaming idea does anyone know how could I stream live through internet ???
Abbas
Hi friends. I want to create multi vendor ecommerce project. I used saleor. but it doesn't support multi vendor. i am new on the django. I want to work open source multi vendor ecommorce project. But i did not find project as i wish. Can you to advise me open source multi vendor ecommerce project in django?
Anonymous
TypeError at /movies/stream/ The fields option must be a list or tuple or "all". Got str. guys why i got this error?
Rutherford
please, help I am receiving this error raise NoReverseMatch(msg)... Someone know why?
Specify a name attribute for the url and then use that name in your template url tag
Mirco
TypeError at /movies/stream/ The fields option must be a list or tuple or "all". Got str. guys why i got this error?
Your fields inside meta is wrong It must be equals to "__all__" or a tuple / list of strings
Rutherford
Anonymous
class WatchListSerializer(serializers.ModelSerializer): class Meta: model = WatchList fields = 'all' class StreamPlatformSerializer(serializers.ModelSerializer): watchlist = WatchListSerializer(many=True,read_only=True) #nested relationship it's connected with related_name class Meta: model = StreamPlatform fields = 'all '
Mirco
now i'm using all for fields
Yeah, it must be fields = "__all__"
Anonymous
Yeah, it must be fields = "__all__"
can i share my screenshot to ur pm?
Mirco
can i share my screenshot to ur pm?
No, you have to share here with pastebin or similar
Mirco
If you write in PM, you will be warned here and blocked by my side 😎
Anonymous
u are danger, joking)
Lucifer
Hello guys Can somebody help me to clone a django project from youtube
Anonymous
see YT Video's description it should been project's github source code link
Jerome
There are addons for that like Cloudinary https://elements.heroku.com/addons/cloudinary
Anonymous
Could not resolve URL for hyperlinked relationship using view name "streamplatform-detail". You may have failed to include the related model in your API, or incorrectly configured the lookup_field attribute on this field.
Jamshid
Guys, can you please help me with "Crypt key is missing" error when creating server in Pgadmin4. What I am doing wrong? When I click save button this error occurring - "Crypt key missing"
Dmitry
Can anybody help me? My Django has stopped working for some reason. I ran the server many times, but yesterday it all just broke down. Whenever I run "manage.py runserver", it tells me that Django is not installed. Any reason behind that?
Dmitry
The only thing I did was accidentally opening the Python installer. But I closed it, did nothing there
Abbas
Do you activate virtualenv?
Dmitry
Do you activate virtualenv?
Nothing happens when I'm trying to activate it. It all went downhill from the moment I opened the freaking installer, lol
Dmitry
It worked perfectly just a couple days ago
Dmitry
Now it seems that I need to reinstall everything because of the broken dependencies or smth of that sort
Abbas
I think you must create a virtualenv and install django
Dmitry
It's installed in my project directory
Abbas
Yes maybe it can help
Abbas
Dmitry
lol, my activate.bat file was corrupted for some reason