Re: Custom template tag problem: "No module named models"

2012-11-08 Thread nolurking
I had the same issue, fixed it with a variation on Jim D.'s solution. import bookmarks then bookmarks.models.Bookmark.objects.filter(...) On Tuesday, October 14, 2008 11:38:20 PM UTC-7, Chris Amico wrote: > > I have a simple bookmarks model based on the one in James Bennett's href="http://code.

Django in virtualenv + nginx + uwsgi set up guide

2012-11-08 Thread Chris Pagnutti
Hi. I'm looking for a recent guide for setting up nginx to serve django projects in a virtualenv via uwsgi. I can find a whole pile of them, but they're all so different, and some are dated. I'm looking for something complete and recent that actually works. Ideally, I'd like it to be for a

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-08 Thread Daniel
Francesco and Elena, I read up on virtualenv and to my understanding, what you said was right - that it sets the PATH for you just by using it. One thing that I'm still not sure on, is that for Linux, you have to specify the 'source' command which will change the environment in place. I'm no

Re: How to call a database function from Django?

2012-11-08 Thread Arnold Krille
On Thursday 08 November 2012 15:17:38 Kurtis Mullins wrote: > I usually create management commands and call that. Here's the docs: > https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ As an alternative you can use django_extensions and create a job. Might be to much when its

Re: Consume Web Service

2012-11-08 Thread Tim Sawyer
I keep it simple and just create the XML manually. Works for me on simple services. http://drumcoder.co.uk/blog/2009/nov/23/running-soap-webservice-without-library/ Tim. On 08/11/12 21:26, Derrick Jackson wrote: Hi all, I have a web service that I need to consume. Do you have any recommend

Consume Web Service

2012-11-08 Thread Derrick Jackson
Hi all, I have a web service that I need to consume. Do you have any recommendations as to what I should be using to consume it? SoapLIb, Suds, etc... -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: How to call a database function from Django?

2012-11-08 Thread Tom Evans
On Thu, Nov 8, 2012 at 7:41 PM, Andre Lopes wrote: > Hi all, > > I need to run a script once a day. The script basically will call a > postgresql function. I've google and I found a solution just like > this. The problem is that does not work. > > [code] > import os > os.environ['DJANGO_SETTINGS_M

Re: How to call a database function from Django?

2012-11-08 Thread Kurtis Mullins
I usually create management commands and call that. Here's the docs: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ On Thu, Nov 8, 2012 at 2:41 PM, Andre Lopes wrote: > Hi all, > > I need to run a script once a day. The script basically will call a > postgresql function

How to call a database function from Django?

2012-11-08 Thread Andre Lopes
Hi all, I need to run a script once a day. The script basically will call a postgresql function. I've google and I found a solution just like this. The problem is that does not work. [code] import os os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from myapp.models import * MyModelClass.object

Re: Help with error uploading files

2012-11-08 Thread Carlos Aguilar
The screenshot is captured with chrome extension, then, capture all page and save to png. The problem is caused by s3_folder_storages. I am replacing the DEFAULT_FILE_STORAGE bY s3boto storage. I think as field is ImageField png or jpg are valid images Best Regards On Thu, Nov 8, 2012 at 1:21

Re: How to crop image ?

2012-11-08 Thread Kurtis Mullins
(However, I don't know of any ways to crop images before upload ... except maybe with Flash or Java) On Thu, Nov 8, 2012 at 1:25 PM, Kurtis Mullins wrote: > I've used JCrop in combination with a custom Django Form and PIL before. I > had good results. > > > On Thu, Nov 8, 2012 at 8:09 AM, Gink L

Re: How to crop image ?

2012-11-08 Thread Kurtis Mullins
I've used JCrop in combination with a custom Django Form and PIL before. I had good results. On Thu, Nov 8, 2012 at 8:09 AM, Gink Labrev wrote: > How to crop image before upload ? > I found this project: > https://github.com/jonasundderwolf/django-image-cropping, but it does not > work well. >

Re: Help with error uploading files

2012-11-08 Thread Carlos Aguilar
Yesterday doing few test I note that the problem is causes by the following configs DEFAULT_FILE_STORAGE = 'waitress.apps.venues.storage.CachedS3BotoStorage' DEFAULT_S3_PATH = "media" I test 2 file storages one is s3_folder_storages.s3.DefaultStorages. I am using the same config in other projec

Re: reading raw binary data from clob columns using oracle backend

2012-11-08 Thread Ian
On Wednesday, November 7, 2012 6:16:23 AM UTC-7, MichaƂ Nowotka wrote: > > Hello, > I'm working with oracle legacy DB and need to read and write binary data > (png images, and and MDL *Molfiles*). > Django's inspectdb command generated text fields for these columns, saying > that's only a guess.

Re: Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
Correction: My URL tag does not include the quotes. Should be: {% url admin:jsi18n %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ifbpxbJtw_wJ. T

Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
Using Django 1.3, I'm declaring a javascript file in the Media class of a ModelForm. For the jsi18n javascript catalog, the examples show the path hard coded: js = ('/admin/jsi18n/') However, I want to make this a little more portable by replacing the path with a reverse() call. I tried

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-08 Thread Francesco Serafini
Elena, I think the place where should be put a warning about which django-admin.py script has to be run is here. Hence when the reader is going to install virtualenv. Hoping this help Franz 2012/11/8 Elena Willia

Re: 1.5: syntax of AUTH_USER_MODEL

2012-11-08 Thread Michael K
On Monday, October 29, 2012 11:09:11 AM UTC-4, Tomas Neme wrote: > > > This is, IMO, the biggest and most stupid problem in django core > design, because it stops you from having an otherwise completely legal > configurations, like having a 'cms.plugins.picture' app alongside a > 'myproject.cu

coding advise / associating a class with a table row

2012-11-08 Thread Gene Horodecki
Hi there, I seem to find a particular scenario a lot and I'm wondering if someone can help me with it. I'm working on a project where I am selecting from a series of actions to take on a server. These actions need to be defined in a child class because there is code associated with them. How

Re: Access queryset in get_context_data()?

2012-11-08 Thread Arturo Fernandez
Hi! You can use access to queryset through kwargs dictionary: qs = kwargs['object_list'] Don't forget that *object_list *is the variable used by Django's class view. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on t

How to crop image ?

2012-11-08 Thread Gink Labrev
How to crop image before upload ? I found this project: https://github.com/jonasundderwolf/django-image-cropping, but it does not work well. Does someone know other solutions ? Thanks, -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-08 Thread Elena Williams
Francesco and Daniel, This is an interesting problem with the tutorial! We will have to make sure that it's changed -- obviously the tutorial needs to be clearer! Any suggestions you guys have about how/where we could insert some information that could make this clearer *please* point out where i

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-08 Thread Francescos
Good good! So, this means I was executing the wrong django-admin.py file. Daniel, I'm curious about your question, too. Because I though that activating virtualenv the path is automatically set to the specified environment and then no need to include the right django-admin.py file into some envi