These are chat archives for django/django

5th
Jun 2017
Richard Price
@richardjprice
Jun 05 2017 09:21
hello, i'm looking for suggestions for making a third party app implement templates that override another third party app, both would have templates outside of the project folder. One app is my customisation of a third party that I would like to re-use on different in-house projects.
cs89gr
@cs89gr
Jun 05 2017 14:25

can you tell me someone how can auto define name field in my model using name from path image ?because i use multi upload images i want to define names of images automate.
in simple python that look like this this :

filepath = 'C:/Users/username/Desktop/dj/imagename.png' 
layer_name = filepath[:-4].split('/')[-1] # get the layer name

my model :

class MyModel(models.Model):
    name = models.CharField()
    user = models.ForeignKey(User, unique=False)
    upload = models.ImageField(upload_to=user_directory_path)
Georgios Giatsidis
@georgiosgiatsidis
Jun 05 2017 16:46
Hi guys , I use celery for async tasjs and I want to add task Status and progress bar for every task. I found this https://stackoverflow.com/questions/35437668/realtime-progress-tracking-of-celery-tasks but I am not 100% sure about the implementation
John
@flyboy1565
Jun 05 2017 19:35
@cs89gr I think you would do a for loop in your view,
Something like