Anonymous
Could you add more than 200 members?
🅐🅢🅗🅘🅚
Anyone know how to create multiple datas using factory data using the command create_batch(size=10) with different uuid??
It's me
-destop ~/P/P/The-Attic-master> python3 manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/usr/lib/python3/dist-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'bootstrap_themes'
It's me
-destop ~/P/P/The-Attic-master> python3 manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/usr/lib/python3/dist-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'bootstrap_themes'
I did Install django bootstrap form but still I'm getting this
Shaxboz
try: pip install django_bootstrap_themes
It's me
atching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 18, in <module> class Book(models.Model): File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 20, in Book author = models.ForeignKey(Author) TypeError: init() missing 1 required positional argument: 'on_delete'
It's me
atching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 18, in <module> class Book(models.Model): File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 20, in Book author = models.ForeignKey(Author) TypeError: init() missing 1 required positional argument: 'on_delete'
Now I'm getting this
Anonymous
Now I'm getting this
add this author = models.ForeignKey(Author, on_delete=models.CASCADE)
Prince
I add this but error is same no change
Python manage.py makemigrations Python manage.py migrate Thn check
Axror
Good day everyone! I have a #question. I try to create data with generic createview but it don't input sqlite
Prince
doesn't work
You are using two accounts? Coz this answer isn't for u
Shaxboz
I add this but error is same no change
plz check agein and send issues
It's me
plz check agein and send issues
atching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 18, in <module> class Book(models.Model): File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 20, in Book author = models.ForeignKey(Author) TypeError: init() missing 1 required positional argument: 'on_delete'
Prince
It doesn't work
Share code of Book model, See rule5⃣ to check how you can share code
Shaxboz
atching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 18, in <module> class Book(models.Model): File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 20, in Book author = models.ForeignKey(Author) TypeError: init() missing 1 required positional argument: 'on_delete'
plz send store/models.py
It's me
Share code of Book model, See rule5⃣ to check how you can share code
class Book(models.Model): title = models.CharField(max_length = 200) author = models.ForeignKey(Author,on_delete=models.CASCADE) description = models.TextField() publish_date = models.DateField(default = timezone.now) price = models.DecimalField(decimal_places=2, max_digits=8) stock = models.IntegerField(default=0) cover_image = models.ImageField(upload_to=cover_upload_path, default='books/empty_cover.jpg')
It's me
plz send store/models.py
rom django.db import models from django.utils import timezone from django.contrib.auth.models import User class Author(models.Model): first_name = models.CharField(max_length = 100) last_name = models.CharField(max_length = 100) def str(self): return "%s, %s" % (self.last_name, self.first_name) def cover_upload_path(instance, filename): return '/'.join(['books', str(instance.id), filename]) class Book(models.Model): title = models.CharField(max_length = 200) author = models.ForeignKey(Author,on_delete=models.CASCADE) description = models.TextField() publish_date = models.DateField(default = timezone.now) price = models.DecimalField(decimal_places=2, max_digits=8) stock = models.IntegerField(default=0) cover_image = models.ImageField(upload_to=cover_upload_path, default='books/empty_cover.jpg') class Review(models.Model): book = models.ForeignKey(Book) user = models.ForeignKey(User) publish_date = models.DateField(default = timezone.now) text = models.TextField() class Cart(models.Model): user = models.ForeignKey(User) active = models.BooleanField(default=True) order_date = models.DateField(null=True) payment_type = models.CharField(max_length=100, null=True) payment_id = models.CharField(max_length=100, null=True) def add_to_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) preexistting_order.quantity +=1 preexistting_order.save() except BookOrder.DoesNotExist: new_order = BookOrder.objects.create( book = book, cart = self, quantity = 1 ) def remove_from_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) if preexistting_order.quantity > 1: preexistting_order.quantity -=1 preexistting_order.save() else: preexistting_order.delete() except BookOrder.DoesNotExist: pass class BookOrder(models.Model): book = models.ForeignKey(Book) cart = models.ForeignKey(Cart) quantity = models.IntegerField()
Shaxboz
rom django.db import models from django.utils import timezone from django.contrib.auth.models import User class Author(models.Model): first_name = models.CharField(max_length = 100) last_name = models.CharField(max_length = 100) def str(self): return "%s, %s" % (self.last_name, self.first_name) def cover_upload_path(instance, filename): return '/'.join(['books', str(instance.id), filename]) class Book(models.Model): title = models.CharField(max_length = 200) author = models.ForeignKey(Author,on_delete=models.CASCADE) description = models.TextField() publish_date = models.DateField(default = timezone.now) price = models.DecimalField(decimal_places=2, max_digits=8) stock = models.IntegerField(default=0) cover_image = models.ImageField(upload_to=cover_upload_path, default='books/empty_cover.jpg') class Review(models.Model): book = models.ForeignKey(Book) user = models.ForeignKey(User) publish_date = models.DateField(default = timezone.now) text = models.TextField() class Cart(models.Model): user = models.ForeignKey(User) active = models.BooleanField(default=True) order_date = models.DateField(null=True) payment_type = models.CharField(max_length=100, null=True) payment_id = models.CharField(max_length=100, null=True) def add_to_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) preexistting_order.quantity +=1 preexistting_order.save() except BookOrder.DoesNotExist: new_order = BookOrder.objects.create( book = book, cart = self, quantity = 1 ) def remove_from_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) if preexistting_order.quantity > 1: preexistting_order.quantity -=1 preexistting_order.save() else: preexistting_order.delete() except BookOrder.DoesNotExist: pass class BookOrder(models.Model): book = models.ForeignKey(Book) cart = models.ForeignKey(Cart) quantity = models.IntegerField()
did you save?
It's me
Yes
It's me
did you save?
Should I share GitHub link
Prince
Vishnu
ImportError at / Could not import 'rest_framework.schemas.coreapi.AutoSchema' for API setting 'DEFAULT_SCHEMA_CLASS'. ModuleNotFoundError: No module named 'rest_framework.schemas.coreapi'.
Vishnu
can u guys help me with this
Vishnu
i have tried it bro but still the same error
Ashutosh
from project.app2.models import Modern Or from ..app2.models import Model1
Ashutosh
What's best way to import a function or model in any other app
Ashutosh
And one more. Please.. from .models import * Or from .models import Model1
Mojtaba Arezoomand
rom django.db import models from django.utils import timezone from django.contrib.auth.models import User class Author(models.Model): first_name = models.CharField(max_length = 100) last_name = models.CharField(max_length = 100) def str(self): return "%s, %s" % (self.last_name, self.first_name) def cover_upload_path(instance, filename): return '/'.join(['books', str(instance.id), filename]) class Book(models.Model): title = models.CharField(max_length = 200) author = models.ForeignKey(Author,on_delete=models.CASCADE) description = models.TextField() publish_date = models.DateField(default = timezone.now) price = models.DecimalField(decimal_places=2, max_digits=8) stock = models.IntegerField(default=0) cover_image = models.ImageField(upload_to=cover_upload_path, default='books/empty_cover.jpg') class Review(models.Model): book = models.ForeignKey(Book) user = models.ForeignKey(User) publish_date = models.DateField(default = timezone.now) text = models.TextField() class Cart(models.Model): user = models.ForeignKey(User) active = models.BooleanField(default=True) order_date = models.DateField(null=True) payment_type = models.CharField(max_length=100, null=True) payment_id = models.CharField(max_length=100, null=True) def add_to_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) preexistting_order.quantity +=1 preexistting_order.save() except BookOrder.DoesNotExist: new_order = BookOrder.objects.create( book = book, cart = self, quantity = 1 ) def remove_from_cart(self, book_id): book = Book.objects.get(pk=book_id) try: preexistting_order = BookOrder.objects.get(book=book, cart=self) if preexistting_order.quantity > 1: preexistting_order.quantity -=1 preexistting_order.save() else: preexistting_order.delete() except BookOrder.DoesNotExist: pass class BookOrder(models.Model): book = models.ForeignKey(Book) cart = models.ForeignKey(Cart) quantity = models.IntegerField()
You shoudl add on_delete=models.CASCADE or w/e you want to your models.ForeignKey()
Ashutosh
atching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, self._kwargs) File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, kwargs) File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 18, in <module> class Book(models.Model): File "/home/nilesh/Python Tutorials/Python/The-Attic-master/store/models.py", line 20, in Book author = models.ForeignKey(Author) TypeError: init() missing 1 required positional argument: 'on_delete'
You have to define on_delete for foreign key.. Options are models.SET_NULL, models.CASCADE.
Ashutosh
Ok
Mojtaba Arezoomand
from project.app2.models import Modern Or from ..app2.models import Model1
If you wanna import from a sibling app just write sibling_app.models import Model
Ashutosh
That will only works if manage.py, app1, app2 all are in same directory.
Ashutosh
But that's not the case.
Mojtaba Arezoomand
That will only works if manage.py, app1, app2 all are in same directory.
If u wanna import from a directory in another sibling app then Sibling.directory and so on
Mojtaba Arezoomand
But that's not the case.
If im still wrong explain ur directories
Akash
Hello everyone, i am from IIT Patna, I recently learn django,I want to build a project in django, if anyone is making a project in django then I can also help Or we can make it together and can write in our resume so please if anyone is working in something like that than do reply or dm me
Anonymous
Is there a way to compile django code as executable?
Ghorz
Is there a way to compile django code as executable?
Yes research packaging python for Windows
Mojtaba Arezoomand
Hi guys I want to know how to set custom expiration time for a session in django
Eguakhide
Hey mates! Please i am making use of this library, Django~comments~xtd, On a model am using, i am required to create a get_absolute_url method for it as required by this library. My issue is not all arguments comes from the model in the view function Please how do i go around this?, thanks
V
I want to learn Django can anybody help me out
V
I am getting various errors
Raja
I am getting various errors
let us know errors if we can help you
V
Not able to send pics here
V
Because the group has policies
Tukhtamurod
I am getting various errors
Your problem is clear i got it
Jimmies San
Not able to send pics here
Use pastebin to share errors and imagesharing service for printscreen
Anonymous
Hello guys, I am a beginner and I just want some guidance on a project. So anyone who can guide me please dm me
Doragonsureiyā
Not able to send pics here
To share code or error tracebacks, be considerate and use an online pasting service - here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you post a wall of text message (many lines), delete it quick or you may get a warn strike.
Hussein
Hello How can I send the title of the post in the title context class PostDetails(DetailView): model = Posts slug_url_kwarg = 'UNI_Slug' slug_field = 'UNI_Slug' context_object_name = 'obj' template_name='blog/details.html' extra_context = { 'title': 'XXXXX', }
Рачик
can anyone help me pls, i have minvaluevalidator for decimal field weight = models.DecimalField(max_digits=5, decimal_places=2, validators=[MinValueValidator(0.00), MaxValueValidator(50)]) if i use weight = 0.0 or 0.00 - request is valid but i want use min value validator 0.01, i change(MinValueValidator(0.01)), use makemigrations and migrate, use 0.01 - request is not valid, why?
Hasan
How can an anonymous user like or dislike posts?
Hussein
You can add another context other than the model object by using. get_context_object method
I want to send the name of the blog itself, which has been called
Hussein
def PostDetails(request,slug): Post = get_object_or_404(Posts, slug=slug) template = 'universiteler/universite.html' context = { 'obj': Post, 'title': Post.Title, } return render(request, template, context)
Anonymous
What is the issue
ABC
many categories when click on one category then open all post of categories and then click to one post open detail page but when i click on next and previous button to change on this category wise but using url like this http://127.0.0.1:8000/category/Python/python-lists anyone do that so replay please
ABC
if category python so open next and previous python post
Deleted
https://stackoverflow.com/questions/66739227/attributeerror-at-logout-tuple-object-has-no-attribute-backend
Amir m
Hi a question I know how to replace mysql with the default django database I wanted to know how to connect from the django to the database and make changes inside the database ??
ABC
many categories when click on one category then open all post of categories and then click to one post open detail page but when i click on next and previous button to change on this category wise but using url like this http://127.0.0.1:8000/category/Python/python-lists anyone do that so replay please
ABC
if category python so open next and previous python post
Mojtaba Arezoomand
Hi a question I know how to replace mysql with the default django database I wanted to know how to connect from the django to the database and make changes inside the database ??
There is a models.py file when u create app Write your models then do this py manage.py makemigrations Then py manage.py migrate After that if u changed ur model do this again