Abdulloh
thanks @lnxpy @Anksak
Abdulvoxid Dadamirzayev
I need help guys
Ismael
don't ask to ask, just ask
Abdulvoxid Dadamirzayev
I have an error like: Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
Alex
{% if post.picture %} <img src=...> {% else %} <img src="default.png"> {% endif %}
Or better use default filter. `src={{ url|default:"<thumbnail_url>"}}
Ankit
Anyone have any idea how can I redirect to another page if unique together error occurs ?? I know I can show error message but I want to redirect to another page If form.is_valid() false Else : If unique_together = True Rediect to another page Here I want to check which error it is and want to redirect if unique_together Thank you for your valuable time ❤️
Anonymous
anyone please help how to collectstatic on production
Anonymous
please explain dude
Anonymous
do you have any link or something for it
Gil
do you have any link or something for it
If not specifing your problem.... google with a generical concepts..... as your ask
Anonymous
dude it's obvious that i didn't Find anything on Google that's why I'm asking here
Gil
dude it's obvious that i didn't Find anything on Google that's why I'm asking here
Django official docs.... golden docs https://docs.djangoproject.com/en/3.1/howto/static-files/
Santosh
please explain dude
Python manage.py collectstatic
Ajmal
I install django website but my works not visible in that Web page
Ajmal
It means just do python manage.py runserver
Sadra
anyone please help how to collectstatic on production
First, defined the static_root and static searchers in your settings.py, then run python manage.py collectstatic. Nicely Done. :D
Ajmal
What do you mean by install
I do urls path but did not work
Sadra
I do urls path but did not work
Depends. Show me your root url configs, app urls, and views.
Sadra
Use a pastebin service please.
Deku
Hey.. Can anyone help me by giving an approach for shifting some models from one app to other safely!
Alex
Hey.. Can anyone help me by giving an approach for shifting some models from one app to other safely!
literally first link in the google by "django move model to another app" https://stackoverflow.com/questions/25648393/how-to-move-a-model-between-two-django-apps-django-1-7
Sadra
Hey.. Can anyone help me by giving an approach for shifting some models from one app to other safely!
Hey. Even though it's implementable, it's not a good idea. Mostly we separate the apps in order to split the models and the existences.
Alex
Hey. Even though it's implementable, it's not a good idea. Mostly we separate the apps in order to split the models and the existences.
> Even though it's implementable, it's not a good idea. It's implementable and absolutly ok.
Alex
Sorry, but wanted advise from you people if anyone has already done it. As it would be more safe and reliable.
I can give you 2 advices - don't experiment on production server and make backups. Now you are ready to face everything. Good luck
Sadra
Also suggests you to avoid creating a separated API app outer the app directory.
Sadra
Sorry, but wanted advise from you people if anyone has already done it. As it would be more safe and reliable.
1. Learn better app management. 2. What Alex said, "don't experiment on production server and make backups".
Deku
Thanks!😄
Sadra
❤️👍
Taranjeet
I want to create a simple SQL query. Select Count(Case when addedOn > 'some date' then 1 end) From mytable I wrote it using annotations. But the actual query generated by django has a group by clause of the ID. I don't want that. I don't want to know the exact query just tell me how can we eliminate that last group by clause
Taranjeet
AliReZa
'Title' object is not iterable
AliReZa
'Title' object is not iterable
class SlideShows(models.Model): id = models.AutoField(primary_key=True) titles = models.ForeignKey(Title,on_delete=models.CASCADE)
AliReZa
whats the problem?
Taranjeet
'Title' object is not iterable
You are trying to iterate over the Title. Most probably with a for loop. And that's not possible.
AliReZa
You are trying to iterate over the Title. Most probably with a for loop. And that's not possible.
class SlidesSerializers(serializers.ModelSerializer): titles = TitleSerializers(many=True,read_only=True) class Meta: fields = ['id', 'titles'] model = models.SlideShows
AliReZa
this is my serializer
AliReZa
class GetSlides(APIView): def get(self, request): queryset = SlideShows.objects.all() serializers = SlidesSerializers(queryset, many=True, context={'request' : request}) return Response(serializers.data, status=status.HTTP_200_OK)
AliReZa
and my view
AliReZa
i don't understand your mean
Taranjeet
i don't understand your mean
Can u show the traceback.
AliReZa
Can u show the traceback.
picture is lock in group i send screen shot in your pv
Denis
Hi! Need advice. There is a page that has a button that I can click and initiate the process on the server via Websocket. I get information about process via Websocket. How can I close and reopen the page to see the current status of the process, not at first, without a disconnect?
Sumit
Hi there! I need a help. I want to add username in the domain as subdomain like in wix.com. How can I do this in django?
Sumit
I want to add slug as subdomain. How can I do this?
AliReZa
Abdulvoxid Dadamirzayev
hi there! I have an error like django.db.utils.OperationalError; no such column: images_image.image?
Werner
But i havent asked you
Abdulvoxid Dadamirzayev
Just migrate the database
Thanks bro. It's working now🙂
🇩🇪 kamoloff 🍁
What is the best tool to setup CI/CD for django?
Anonymous
hi are you guys doing python and django in vs code or pycharm
Украинский
hi are you guys doing python and django in vs code or pycharm
I've doing Django with Sublime Text 3. Really.
Anonymous
Hi
M
Any resouce on url patterns matching
Taranjeet
problem is fixed
What was it?
Anonymous
I need a boy friend
Furqan
😂
Tukhtamurod
I need a boy friend
InvalidAddressException
Irrfan
Hi guys Please tell me which one is better Ajax or template language Django?!
Irrfan
depends on use case
So....both are good ?!
Jerwin
Hi guys I'm new to django I'm getting template does not exist error help me resolve this
Jerwin
I'm using version 3.1.3