django-apps

Django app for image crop using a cropping tool

假如想象 提交于 2019-12-02 16:26:13
I need an app for crop an image in the client side, I mean, using a cropping tool like Jcrop jquery plugin. I found this tools: django-image-cropper django-image-cropping django-imagehandler django-avatar-crop But the last two depends of admin and the two first seem very coupled to ther own ImageFields and models, any good solution? We are working over a big application with many features and is very difficult change the logic writed I think this is something that you will probably be best off writing yourself as it depends on how your data and models are layed out, whether (and where) you

Asset managers for Django - choose which one? [closed]

£可爱£侵袭症+ 提交于 2019-12-02 14:42:24
I would like to bundle up css and javascript files. I also want to send far-future expire headers to clients, so I need file versioning. A quick search across the Internet has shown there are several asset managers developed for Django. Here is a list of those that I could reach: django-compress django-assets django-assetpackager django-media-bundler django-mediacat django-site-assets django-static-management django-compressor They seem to perform more or less the same job. django-compress, django-compressor and django-site-assets seem to be especially promising at the first glance. I will

Django: best practice for splitting up project into apps [closed]

巧了我就是萌 提交于 2019-11-30 12:59:55
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I'm really struggling with this whole app-idea. I read a lot of tutorials and style guides and I know I should try to create specialized apps, that do exactly one thing. This all makes sense when looking at some simple tutorial project but as soon as it gets to a complex real

Cannot import models from another app in Django

让人想犯罪 __ 提交于 2019-11-30 11:39:34
so I have 2 apps running in the same project. My files are structured as follows: /project_codebase /project __init.py settings.py urls.py wsgi.py ... /app1 ... /app2 ... manage.py So, I for some weird reason have a different name for my base directory (that is, it ends with codebase). Hopefully, that is not an issue. In my settings.py , I have this: INSTALLED_APPS = [ ... 'app1', 'app2', ] Ok, so in my models.py (from app2) , I can easily import models from app1 with from app1.models import * , however, when I use from app2.models import * in my models.py (from app1) , I get an ImportError.

How to keep all my django applications in specific folder

邮差的信 提交于 2019-11-30 10:21:17
问题 I have a Django project, let's say "project1". Typical folder structure for applications is: /project1/ /app1/ /app2/ ... __init__.py manage.py settings.py urls.py What should I do if I want to hold all of my applications in some separate folder, 'apps' for example? So that structure should look like the following: /project/ apps/ app1/ app2/ ... __init__.py manage.py settings.py urls.py 回答1: You can add your apps folder to your python path by inserting the following in your settings.py :

Sharing models between Django apps

ⅰ亾dé卋堺 提交于 2019-11-30 07:19:26
问题 I will be brief: to work in the spirit and idea of a Django app, it is ok for an app to import models from inside another app ? Say, a User statistics app will import models from a User app something like: from users.models import users 回答1: If you're building an internal app that has no chance of ever being released to the public, sure, do whatever you want. If you're building an internal app that has little chance of ever being released to the public, but will possibly be used by future

Django: best practice for splitting up project into apps [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-30 04:19:24
I'm really struggling with this whole app-idea. I read a lot of tutorials and style guides and I know I should try to create specialized apps, that do exactly one thing. This all makes sense when looking at some simple tutorial project but as soon as it gets to a complex real life project, I find myself unable to determine how I should draw the lines between different apps. One of the problems is, that I want to have one site (or multiple sites) where the user sees a lot of different stuff. Stuff that should be from different apps, when following the app design rules. How would I realize

RemovedInDjango19Warning: Model doesn't declare an explicit app_label

大城市里の小女人 提交于 2019-11-30 03:20:34
问题 Have gone through Django 1.9 deprecation warnings app_label but answers couldn't fix my problem, so asking again. I have an app that is added to INSTALLED_APPS in settings. when ever I run manage.py runserver , I get this warning, [trimmed path to project]/catalog/models.py:9: RemovedInDjango19Warning: Model class catalog.models.Category doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will

django-object-permissions Vs django-guardian Vs django-authority

孤街醉人 提交于 2019-11-29 22:13:47
I've found 3 row-level permission solutions for Django 1.2+ django-object-permissions django-guardian django-authority Could someone tell if there is any recommended more than the others, what are their main differences, etc.? I'll start this by saying we use none of these for object level permission - we use our own custom method and I really wish we hadn't. If you can avoid object level permissions at all, do so, they are a pain to organise. This is how I evaluate the 3 apps you've mentioned. Active Development: django-guardian (1 week ago) django-object-permissions (1 year ago) django

Sharing models between Django apps

无人久伴 提交于 2019-11-29 02:53:31
I will be brief: to work in the spirit and idea of a Django app, it is ok for an app to import models from inside another app ? Say, a User statistics app will import models from a User app something like: from users.models import users If you're building an internal app that has no chance of ever being released to the public, sure, do whatever you want. If you're building an internal app that has little chance of ever being released to the public, but will possibly be used by future/current developers, sure, but be sure to document what the app needs to work properly. If you're building an