Django Tutorial - User Specific Pages/Access

preview_player
Показать описание
This django tutorial covers how to restrict access to pages or information to specific users. This is extremely useful for things like blog posts where you only want specific people to be able to edit/view etc.

Want a sneak peak into my life? Follow my Instagram @tech_with_tim where I'm going to be filming a video each morning sharing my goals for the day and what I have planned:

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
- Tech With Tim
- Django Tutorial
- Django User Specific Access
- Django User Specific Data
- Python Tutorials
Рекомендации по теме
Комментарии
Автор

Thanks for the great staff content Tim :-), but there is no tutorial on how to deploy the projects that we made.

craigchihururu
Автор

If you deleted the db.sqlite and pycaches and its not letting you register new users you need to do the following:

I went into the terminal and typed "python manage.py shell" (after cd'ing to mysite) and then put

>>> from django.contrib.auth.models import User

# At this point, user is a User object that has already been saved
# to the database. You can continue to change its attributes
# if you want to change other fields.
>>> user.last_name = 'Lennon'
>>> user.save()

deaglannolan
Автор

i am getting an error saying main_todolist has no column named user_id. Can anyone help me solving the problem?

tusharjain
Автор

When I try to make migrations, I got this error:
You are trying to add a non-nullable field 'user' to todolist without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Quit, and let me add a default in models.py

edwardnovais
Автор

Please cover custom user models too, if you can. Great content! Greetings

PlaneToTheBrainES
Автор

Deployment Tutorial please? Btw great course :)

saarang
Автор

I followed along without issue until this episode.
"table main_todolist has no column named user_id"

I don't understand why I'm getting this error.

jackneely
Автор

Hey Tim,


When I go to the create page and try to create new I get a 'AnonymousUser' object has no attribute 'todolist' error which then traces back to I log out and when I try to create a new user it seems fine however, when I try to login with that new user it gives me the "Please enter a correct username and password. Note that both fields may be case-sensitive." Despite just creating that user (I am definitely typing the username and password in correctly). So it seems like I am unable to login with any user including admin. You probably are unable to tell me specifically how to fix this but any help would be very appreciated.

kylemacri
Автор

Is there a way to fix this migration issue without having to delete your entire database?

Miggy
Автор

Hm, I wish you would have commented on WHY you had to change those parameters, NULL=True and "related_name"... Changing your model to work around an issue you don't fully understand is often not the best solution, so why not comment on that decision and show why it's right in this case?

GeneralBlorp
Автор

When I clicked Create New... it doesn't show the added one

GAFM
Автор

Hey Tim.... I‘m Holger from Germany and I really like your vids. Thanks for sharing your experience. What I would really like to know more about is the deployment steps... I can‘t find good videos about how to deploy the whole package with python backend to a host/Webserver. Maybe you could make a video about it?

holgertangemann
Автор

Hi Tim, love the videos! Any chance you could find the time for a deployment video?

oscarwignall
Автор

Hi Tim. Will you at some point be following up with a deployment tut?

hbk-rg
Автор

Hey Tim, so I remember you saying in one of your previous videos you would show us how to host our website for free. Will you still get to that? If not, could you maybe point in a general direction with a link/company name? Thanks!

Timo-moor
Автор

please make complete series of django tim. thank you and god bless you.

rayganmudberry
Автор

Can someone help me with this error:
main_todolist has no table user_id
I've tried everything but can't figure out why I keep getting this error

mohammedfahadts
Автор

Thanks Tim. At the beginning of this playlist, you said you would cover the deployment of the django website. I watched the whole playlist and that did not happen. Is there a video missing?
btw, the views functions take request as an argument, not response.

Alshafi
Автор

I have been trying to figure out this thing since long. Many tutorial exclude this part and it really becomes difficult to develop web application after that. Most tutorial teach you login and register but they exclude this part. The concept has been explained really well.

ayushganguli
Автор

Thanks, I was looking for this, how to get user specific objects in page.

vanshbhardwaj