These are chat archives for django/django

Jun 2017
Pavel Burns
Jun 15 2017 09:07 UTC

hello , im have a problem with
I do everything according to the instructions, but not as on the backend does not want the image editing window (settings):

from easy_thumbnails.conf import Settings as thumbnail_settings


) + thumbnail_settings.THUMBNAIL_PROCESSORS

from image_cropping import ImageCroppingMixin

class AdminCourse(ImageCroppingMixin, admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}

from image_cropping import ImageRatioField
 image_preview = models.ImageField(verbose_name='picture')
    cropping = ImageRatioField('image_preview', '430x360')
Somebody uses the package?
And is there an alternative
Roman Tolkachyov
Jun 15 2017 09:11 UTC
@63phc look at (stable solution)
Pavel Burns
Jun 15 2017 09:37 UTC
@romantolkachyov thx ,but it's not what I need, need cropping images
Roman Tolkachyov
Jun 15 2017 09:38 UTC
Pavel Burns
Jun 15 2017 09:45 UTC
@romantolkachyov need such a cropping to most choose the size of the image in the admin area
It seems I found, I will use
Jun 15 2017 15:21 UTC
interested in creating a "helpdesk/FAQ' chat bot with django
Jun 15 2017 15:55 UTC
to get a session id and know wich user is logged only with the Token?
is there a way to*
Jun 15 2017 16:07 UTC
Roman Tolkachyov
Jun 15 2017 17:04 UTC
@fabiand93 what "Token" you talk about?
Jun 15 2017 17:05 UTC
I'm creating a middleware to check if a user is active so if y use a request.META'HTTP_AUTHORIZATION' I get on a str the token
with that user I want to check the last time active of the user
@romantolkachyov that's the main idea
J. Dalton Childers
Jun 15 2017 21:50 UTC
Hey everyone, I’m working on a model design and I’m little stuck. I’m got this model called Proposal and for each model instance I have a PI (Principal Investigator) with one or more Co-PIs. I was thinking I could just do a FK for the PI, since this individual is significant to the record, but I can’t think of the best way to handle the Co-PIs. It’d be nice if they could both pull names from a separate table, because I’d like for some auto-complete (with possible editing) to take place. For each PI or Co-PI I will need to store their name, email, department. I thought about a JSON field for the Co-PIs with a FK relation to the PI table…but I don’t know if that’d work the way I think it will or how to handle that on the front-end. :worried:
J. Dalton Childers
Jun 15 2017 22:04 UTC
Or maybe a many-to-many, but I’ll need to create the Co-PI if they don’t exist.