django tag

257 questions


2 answers
49 views
0
I'd like to use a function that derives the time that has elapsed since the moment of writing, so please help me

class Post(models.Model): created_date = models.DateTimeField( default=timezone.now ) def elasped_time(self): now = datetime.now() then = self.created_date timedelta = now - then minutes = timed...

2 years ago

1 answers
52 views
0
CSS inline-block margin question.

Hi, everyone.I arranged the images rendered by django like an image gallery by inline-block.But I want to centralize the elements in the container div, but I don't know how ㅠ

2 years ago

1 answers
111 views
0
Python Django Pagination error

I reported the sample code on the Internet to page on DjangoThe contents of the first page come out well, but if you press Next, nothing comes out.In url?I think it's getting weird with page=2, but I ...

2 years ago

1 answers
85 views
0
If django uses openpyxl to load_workbook(), an error occurs.

I'm trying to load the xlsx file using python django and work on it The py file and filename.xlsx are in the same folder.In python environment import openpyxlwb = openpyxl.load_workbook('filename.xlsx...

2 years ago

1 answers
51 views
0
This is a question in the django ManyToMany field.

Hi, everyone.Django relational model question.class Actress(models, model): Actress = models.CharField(max_length=30)class Movielist(models.Model): title = models.CharField(max_length=30) cast = model...

2 years ago

1 answers
89 views
0
I have a question about Django ORM Join.

I'd like to ask you a question about join of Django om.As far as I know, there are two ways to join using querySet.1 model = model.objects.select_related('field_name')2 model = model.objects.prefetch_...

2 years ago

1 answers
97 views
0
This is a question about Form in Django.

I am posting because I have a question on the django regular form.In the book I'm reading now, the content of the model class is class Album(models.Model): name=models.CharField(max_length=50) descrip...

2 years ago

1 answers
45 views
0
MySQLdb connection question in Django.

I started Django, I started with 1.10.I use Python 3.5, but MySQLdb only supports Python 2.So I chose pymysql.However, Django wants to use the session

2 years ago

2 answers
47 views
0
django cannot import * problem

I'm developing a site, but there's an error in the process of creating a login, how do I solve it ㅠ

2 years ago

1 answers
44 views
0
How to migrate if the depth of the Django models folder is not common

Hello, while trying to make a simple web game using django + javascript I'm asking this question because I'm curious about route management.web game project name is lucifer├── lucifer####Client Web Ga...

2 years ago
« - 13 - »

© 2024 OneMinuteCode. All rights reserved.