Re: Django Admin - customize use jquery inside and custom fields.

2016-07-09 Thread sevenrrainbow
Thanks. On Friday, July 8, 2016 at 7:59:23 PM UTC+3, luisza14 wrote: > > See https://docs.djangoproject.com/en/1.9/topics/forms/media/ > > 2016-07-08 10:58 GMT-06:00 Luis Zárate >: > >> >> 2016-07-08 10:24 GMT-06:00 >: >> >>> and save the new im >> >> >> You can start reading how to set css and js

Re: Django - File or Image Delete

2016-07-09 Thread sevenrrainbow
This way the Image is removed from database, not from the server. On Friday, July 8, 2016 at 6:41:57 PM UTC+3, Mstislav Kazakov wrote: > > Just pass empty value in file field. > If blank=True and null=True, everything should work fine and image will be > removed. > > пятница, 8 июля 2016 г., 17:2

Django - Populating more than one model from the same form ?

2016-07-09 Thread sevenrrainbow
I have a 2 Models, Product and Image. Image has a foreign key to Product. In the form I want to appear information from both the Product and the Image, because are related. I use also GCBV for views, and model for forms. How can be done ? -- You received this message because you are subscribe

Django Admin - customize use jquery inside and custom fields.

2016-07-08 Thread sevenrrainbow
I want to implement in Django Admin a jquery plugin that "adjust" and image(http://guillotine.js.org/), them get the coordinates with ImageKit and save the new image. I need some tutorials and advises how to do it. -- You received this message because you are subscribed to the Google Groups "

Add 2 Models in a ModelForm

2016-07-08 Thread sevenrrainbow
I have a ProductModel and an ImageModel, link thru a ForeignKey to product id. I want the ImageField(from ImageModel) to appear and be processed in the same form with the other ProductModel atributes. I use GCBV for view. How can be done ? -- You received this message because you are sub

Django - File or Image Delete

2016-07-08 Thread sevenrrainbow
The user has the possibility to add/delete image and documents. I used GCBV UpdateView and a FormModel for this. How can I offer the possibility to the user to delete the file/image ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To un

Django - GCBV Instance vs object; when to use ?

2016-07-06 Thread sevenrrainbow
I have two generic class based views, CreateView and UpdateView. I have products and companies, where a company can have multiple products. A user has a company. When a product is added I need to send also the corresponding foreign key and when I edit/update I need to be sure that the prod

Django - Crop Images with jquery and after that save them on cdn

2016-06-09 Thread sevenrrainbow
I'm try to use jquery and python to "crop" a image in Django. I want to work in admin but also in front-end. The user selects a box/rectangle, for the portion of the image that he want to crop. django-image-cropping package is

Re: Django 1.9 - Create an app that use the models from another app and dynamic CBV

2016-06-02 Thread sevenrrainbow
Thanks you James, To make it more clear. Let's say I have companies(entities) and products(sub-entities) to be more clear. Regarding the urls I use the main urls.py to include the urls.py from each app. urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^companies/', include('co

Re: Django Project Structure for mixins - best solution?

2016-06-01 Thread sevenrrainbow
Thank you Mike, I have a project related question also on this group, maybe you have time and take a look, please see the link below: Django Related Project Question

Re: Django Project Structure for mixins - best solution?

2016-06-01 Thread sevenrrainbow
Thank you Mike, I have a project related question also on this group, maybe you have time and take a look, please see the link below: Django Related Project Section

Re: Django Project Structure for mixins - best solution?

2016-06-01 Thread sevenrrainbow
Thank you Mike, I have a project related question also on this group, maybe you have time and take a look, please see the link below: Django Related Project Section

Django Project Structure for mixins - best solution?

2016-06-01 Thread sevenrrainbow
I seen multiple project structure for Django, but they didn't discuss in detail about structuring mixins. I see that some people use mixins.py , others utils folder. Taking in consideration that I have many mixins for views(generic login,authorization and more specific for the project) and

Django 1.9 - Create an app that use the models from another app and dynamic CBV

2016-06-01 Thread sevenrrainbow
I'm creating a basic CMS. The CMS will contain information about different Entities. A normal users can only see the information about the Entities but an editor will have access to an Dashboard were it can add new Entities or updated them. I have an app Entity that use class-based view (CB