django-apps

Django app for image crop using a cropping tool

谁说胖子不能爱 提交于 2019-12-20 08:50:55
问题 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 回答1: I think this is something that you will probably be

The true meaning of django project and individual apps in it

本秂侑毒 提交于 2019-12-12 03:55:08
问题 What really is the true meaning of django project and individual apps in it? I mean - AFAIK you cannot create a project and live entirely in that project you created, you have to create an app in that project to be able to actually do something in django. Please correct me if I'm wrong. Now what should really be the structure of a django project? I'm writing an e-shop. Let's say my project is named foo : /foo /foo /settings.py /templates /urls.py /wsgi.py /shop /__init__.py /admin.py /models

error when trying to connect to twitter with django social auth

陌路散爱 提交于 2019-12-12 00:43:24
问题 ImportError at /complete/twitter/ No module named social.pipeline i had this error when i was trying to connect twitter to my project this is the full traceback any body has any idea how to solve it Environment: Request Method: GET Request URL: http://127.0.0.1:8000/complete/twitter/? oauth_token=gqaWZAszthiQJEUaZHF72U1y7hGimCLGSGxr6YLUU&oauth_verifier=YAkKy9Q71YrScl1psUXBApx XeQITAcDm6ObCoxdjc Django Version: 1.5 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django

Embed an optional Django application in another page, if that app is present

泪湿孤枕 提交于 2019-12-11 12:45:32
问题 We have a Django project installed at multiple sites. At a couple of them, there will also be an app which produces a status box which should show on the front page, say. What's the right way to have it show up, if the app happens to be installed. If the app is not present, then nothing should display. I think I could do it by having the status app extend the main index page: {% extends "mainproject/index.html" %} {% block statusboxplaceholder %} <div> status here </div> {% endblock %} Is

Django easy-thumbnails MAX SIZE

旧街凉风 提交于 2019-12-11 12:22:56
问题 is there a way to set a max size for the images uploaded in my django app using easy-thumbnails app? In the settings list I don't see anything about it. 回答1: To cap file size, you might want to do it in the webserver, rather than in Django. Alternatively, you can specify a custom file handler, with which you can raise an error if the file is too big: from django.core.files.uploadhandler import TemporaryFileUploadHandler, StopUpload class SizeLimitUploadHandler(TemporaryFileUploadHandler): def

django image storage cdn

心不动则不痛 提交于 2019-12-11 06:34:45
问题 I have been using rackspace CDN for the last few months with django-imagekit and django-cumulus. And I am not really happy with the results. I seem to get load of errors because of timeouts etc. File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py", line 347, in get_container return Container(self, container_name, count, size) File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py", line 83, in __init__ self._fetch_cdn_data() File "/www/django_test1

ImportError: No module named app_name

萝らか妹 提交于 2019-12-11 05:07:55
问题 I am new to python and I have seen similar questions on SO but not able to figure out whats wrong with my Django app. In settings.py I have added my app in dotted module form : INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'mproject.blog', ) and the Traceback : D:\py pro\mproject>python manage.py runserver 9999 Traceback (most recent call last): File "manage

Can't start accounts app using django-userena

ⅰ亾dé卋堺 提交于 2019-12-11 03:19:04
问题 Tried to install django-userena, and when launching python manage.py startapp polls I get the userena.compat.SiteProfileNotAvailable error. So this is very odd. First of all, official Django docs claims to depricate AUTH_PROFILE_MODULE setting : https://docs.djangoproject.com/en/1.7/releases/1.7/. But /usr/local/lib/python2.7/dist-packages/userena/utils.py raises this error if it can't find AUTH_PROFILE_MODULE setting. Does it mean I can't use userena unless I downgrade to versions 1.6 or

Django Markdown Editor does not show up

牧云@^-^@ 提交于 2019-12-10 11:08:06
问题 I'm creating my very first Django application (I'm also a novice at Python, so the problem could be anywhere.) I'm following this tutorial step by step, to get the HTML editor at 5:53 (here), however I still get the default TextField at http://127.0.0.1:8000/admin/blog/entry/add/ Any help on diagnosing the problem would be appreciated. Thanks! My Files : projects/qblog/blog/admin.py : from django.contrib import admin from . import models from django_markdown.admin import MarkdownModelAdmin

Moving django apps into subfolder and url.py error

情到浓时终转凉″ 提交于 2019-12-09 09:13:42
问题 I have a question about putting django apps into "apps" subdirectory. I have the app called “faktura” in a project_root. I didn’t like the fact it lies there and I want to store all my apps under “apps” subdirectory. So, I found out that I could extend python path to “apps” subdir, so after looking in the internet, I added this string to settings.py: sys.path.insert(0, os.path.join(PROJECT_PATH, "apps")). Then I added the app to INSTALLED_APPS like “faktura”. Everything worked smooth until I