Anonymous
Like ofc when someone signs in you do create a session cookie
Anonymous
And then you can verify each time the user access the website if he is signed in or not
Anonymous
Ahh, in your case it's definitely the login view
mλdcodez
Yep
mλdcodez
I'm using a view to render login page
inchidi
Where. In login view?
its pretty simple
if request.user.is_authenticated():
# do something if the user is authenticated
mλdcodez
mλdcodez
Thanks 😊
inchidi
how is your login views looks like?
mλdcodez
mλdcodez
inchidi
mλdcodez
oh thanks 😊
mλdcodez
mλdcodez
okay
inchidi
also i thought you want to redirect, why render? its different tho
mλdcodez
mλdcodez
i get it now 😊
mλdcodez
Mouleswaran
Hi there
Mouleswaran
I want to develop a web application which will get input of server and credentials -> login and execute commands on Linux box -> capture the output and give success or failure response in web
Mouleswaran
Is is achievable using django
Django Bot
>> Links
- Creating Dynamic Forms with Django | Caktus Group
N S
How to edit data in the models without updateview
inchidi
inchidi
Abhi
Hi guys
Abhi
I want to learn django 2.0
Abhi
Where to start?
Abhi
Also I want to know about the use of files like manage.py and view.py
Rohan
Rohan
docs.djangoproject.com
Django Bot
>> Blogs
- Always return namespaces in Django REST Framework
>> Links
- orsinium/djburger: Framework for big Django projects
- yasintoy/Vecihi: Build Your Own Photo Sharing App in 5 minutes
- Introduction · Django Girls Tutorial
- Dockerizing a Python Django Web Application - Semaphore
inchidi
inchidi
New to Django? here is some resource to start
Official docs tutorial
Step by step tutorial
Video tutorial
Another video tutorial
Books
Django by Example
Tango With Django
Django Bot
>> Links
- Creating Sitemaps in Django - OverIQ.com
N S
then with View?
I need to update multiple records can you show how it is actually done
inchidi
Mahesh
Abhay:
Guys I was updating my Ubuntu to 18.04 and it got switch off in between..
E it's not booting up
Wht may I do...??
Now black screen is coming
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
https://www.caktusgroup.com/blog/2009/08/14/creating-recursive-symmetrical-many-to-many-relationships-in-django/
inchidi
Django Bot
>> Links
- GitHub - areski/django-nvd3: Django wrapper for nvd3 - It's time for beauti
- Schau dir "Building Amazing Data Dashboards With Django And D3JS" auf YouTu
Anonymous
Excuse me
There are dango rest full api ?
I need help
I make a api for post file
And with admin i can creat file objects but with post man it said (""detail": "Authentication credentials were not provided.")
I send to it all of file that is make in models
How i can fix it??
Anonymous
I didnt know how most edit it :(
inchidi
have you authenticated?
N S
This is my models @inchidi
Anonymous
HI YES BUT I FIX IT
I DIDNT write my info in athentication part in postman and i think my model has a problem :))
Daniel
BRANHCES lol... wtf
Django Bot
>> Links
- Talk Python to Me: #161 Django 2.0
- Tips for Building High-Quality Django Apps at Scale
- pennersr/django-trackstats: Keep track of your statistics
inchidi
you want to update or add multiple rows(data)?
inchidi
which one? coz you said update here but your comment said add
inchidi
to create many row/data at once you can use this and for update you can use this
Django Bot
>> Links
- Modern DevOps with Django | Jacob Cook
Django Bot
>> Links
- Django: How to Extend The User Model (aka Custom User Model) - William S. V
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
Are there any way to upload multiple images to ImageField in a model?
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
I wrote a Image model that have ForeignKeyField to a (post model) so every post can have multiple images.. but my problem now is that i have 4 applications that have models also requires multiple images.
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
I think making an image model for every content type that requires multiple images is repetitive and against DRY
Django Bot
>> Links
- Populate your Django test database with pytest fixtures | FlowFX
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
Arjun
One to many field?
inchidi
inchidi
inchidi
https://docs.djangoproject.com/en/2.0/topics/db/models/#abstract-base-classes
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
from anotherApp.models import Article
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
but i have Offer model that requires multiple images too
inchidi
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
so, there's no workaround to make models.ImageField accept multiple images per Article object?
if that's true then i'll have a look on the abstract base classes.
𝒟𝑜𝓃𝒬𝓊𝒾𝓍𝑜𝓉𝑒
Django Bot
>> Links
- DataTable with support for Django Formset : Blueprints : OpenStack Dashboar
- Building a combined stream of recent additions using the Django ORM
Mi
I've coded my first django rest API and this is fucking awesome
Mi
Nothing to do with other 'productive' frameworks
Mi
I love it 😍
Abhi
I created a postgres database instance using command docker run --name postgres -it -e POSTGRES_USER=mannu -e POSTGRES_PASSWORD=mysecretpassword postgres
Abhi
i ran into this container shell
Abhi
created a database name itoucan and granted all the previleges to user 'mannu'