Answer the question
In order to leave comments, you need to log in
Django Anonymous access?
Hello!
I have the following models.py:
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
class Article(models.Model):
article_title = models.CharField(max_length=100)
article_text = models.TextField()
article_date_create = models.DateTimeField(default=timezone.now)
article_date_modify = models.DateTimeField(default=timezone.now)
article_access = models.BooleanField(default=True)
article_autor = models.ForeignKey(User)
article_tag = models.ManyToManyField(Tags)
from django.views import generic
class FullView(generic.DetailView):
template_name = 'blog/full.html'
model = Article
context_object_name = 'fullpost_blog'
Answer the question
In order to leave comments, you need to log in
We use
https://docs.djangoproject.com/en/1.9/ref/contrib/...
it might be worth making a landing page for such users, where they could log in or create an account
stackoverflow.com/questions/5433172/how-to- redirec...
and add a get parameter next stackoverflow.com/a/13595154
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question