Anonymous
I need to Filter based column in views....how can I do it
Anonymous
How can i prevent users for re entering a session from which they have logged out
You gonna have option of Loginrequired model ...google it you will get to know
Shekhar
Hi i want the file size in template !! anyone plz
Shekhar
thanks*
Prince
Hi there!! Do anyone has an idea how can we trace the location of a mobile no.(i.e. last when it was switched on or can we get call details)Just got a situation plz suggest if any or is this handled by police only
N S
You gonna have option of Loginrequired model ...google it you will get to know
I tried @cache_control with no_cache true must_revalidate true and no store as true still the problem is not fixed.
Sebuhi
has anyone used paho-mqtt in django? pub/sub through mosquito broker?
Vadim
Hi, everybody. Please tell me how to build a request for models from the database with operators '<=' or '>=' for example
Muflone
field__lte= or __gte=
Muflone
yw
Anonymous
https://pastebin.com/hdFCL1jd
Anonymous
hey i am changing database sql-lite3 to postgresql but i got some error
Sander
Could anyone help me out with this question https://stackoverflow.com/q/56622615/7828662
Aman
I have also tried changing my DB from sqlite to postgress. Its hard and complicated.
Aman
Though I failed
Aman
@Joshualy hey
Mirco
I have also tried changing my DB from sqlite to postgress. Its hard and complicated.
That's why it's better to use same db on dev / prod
Aman
Yes, I realized it later
Aman
Newbie to django
Mirco
It's not a Django "issue" imho , I think the main reason why is lots of developers don't spend enough time to design before writing code
Sebuhi
Yes I am using it right now
Cool it is good to see someone also implementing MQTT with django. Well my concerns is about we will have many devices to connected broker, and publish their data to broker I will need subscribe them and pass it to webscoket using channels in case of actions (by user) i should publish to the device as well
Sebuhi
Ping me If you have any doubts in that
How is your case? What you have to do with mqtt?
Anonymous
How is your case? What you have to do with mqtt?
I am using it to for a gateway , Device to gateway then to cloud
Sebuhi
I am using it to for a gateway , Device to gateway then to cloud
aurdiono or STM ? what broker do you prefer currently?
Naveen
I am not able to resolve this error in my newsletter app . It shows "object of type 'NewsletterModel' has no len()" https://pastebin.com/RiBHQcwE
Shiva
class CoordView(viewsets.ModelViewSet): queryset = Coord.objects.all() renderer_classes = (TemplateHTMLRenderer,) serializer_class = CoordSerializer template_name = 'index.html' Guys I want to return a html page url as response , how to do ?
Anonymous
I’m trying to create a form from two models, one has FK for the other one. Any direction to which approach should I use
Victor
Hello folks, is it ok to have a django app that requires the older version of django (1.10.5) whereas the whole project uses version 2.0.9. Can I have two different versions of django in the same virtualenv?
Muflone
I doubt you could
Victor
There's no way pip would allow it?
Muflone
the only workaround I could think is to make django package private
Muflone
not installed by pip (or moved) but installed into your application
Muflone
and using relative imports... but I still doubt it will works fine everywhere
Victor
And is it possible to have two different venv with different versions of django and then somehow to reffer to them from one project? Is that practice legit?
Muflone
I don't think this is possible
Muflone
you could have two applications run in parallel which communicate via some API
Victor
I am just working on a project and we were sent private django apps one of them requires older django version unlike the entire project and I am trying to figure out whether we were sent a wrong version of the app or I am not suficiantly competent to get it working. I am truly relatively new to django with no comercial dev experience
Muflone
I understand your words but I don't think you can run two versions of the same module at the same time
Muflone
Apart splitting the thing in two projects
Victor
Alright got it
Victor
Thank you buddy
Muflone
Have you tried to test the application with newer Django?
Muflone
Maybe the changes are trivial
Victor
The thing is that this private app have django==1.10.5 specified in setup.py and it reinstalls the current version of django my project uses
Muflone
Try to change it 😄
Victor
And to actually run the project i have to install newer version back, but it is gonna be incompatible with the private app
Victor
I can technically change it but this is private component that we were sent
Victor
Anyway tanks for the answer
Михаил
Any one know ?
Try MethodField
Naveen
I am not able to resolve this error in my newsletter app . It shows "object of type 'NewsletterModel' has no len()" https://pastebin.com/RiBHQcwE
iNcAeLuM
hello guys: i am trying to add this line to my models.py: ´´´ slug = models.SlugField(null=True) ´´´ but when i do python manage.py makemigrations i get this error: django.db.utils.OperationalError: no such column: blog_blogpost.slug
iNcAeLuM
any solution ?
inchidi
I’m trying to create a form from two models, one has FK for the other one. Any direction to which approach should I use
you can try use model form, so you can access related model from its related name
iNcAeLuM
share the full traceback with dpaste.de
https://dpaste.de/vkH1 i just solved it adding that field manually in the database, but i still dont know why i got that error
inchidi
but still dont know why i got that error
because in your migration file you already have that fields but not in your db and you made changes in db manually
inchidi
make sure to stay consistent in using django migrations, dont change your db manually and use migrate instead
iNcAeLuM
because in your migration file you already have that fields but not in your db and you made changes in db manually
now it works fine i didnt change anything in the database i just added a line in models.py and then i did makemigrations and i go t that error
iNcAeLuM
so i opned my database and added that fiield and the run makemigrations
iNcAeLuM
and run well
inchidi
if its okay for you to delete your current database, i recommend you reset migrations to revert things you break
iNcAeLuM
but the point is: yes, i solved the error, but i still dont know why i got that errror
inchidi
but you should remember to never manually change the database again
inchidi
but the point is: yes, i solved the error, but i still dont know why i got that errror
i already answer that question here https://t.me/django/43846