Re: django + TinyMce

2012-08-20 Thread Kolbe
Here's a good reference. http://www.hackedexistence.com/project/django/video4-tinymce.html On Monday, August 20, 2012 2:36:22 PM UTC+8, Владислав Иванов wrote: > > Hello! I am a novice. I want to install TinyMce on Django. I tried a lot > of lessons posted on the Internet, nothing. 3 days can no

Re: django + TinyMce

2012-08-20 Thread lakesh
http://www.youtube.com/watch?v=bJeTEDRvGVA. Try this... On Monday, August 20, 2012 2:36:22 PM UTC+8, Владислав Иванов wrote: > > Hello! I am a novice. I want to install TinyMce on Django. I tried a lot > of lessons posted on the Internet, nothing. 3 days can not adjust. Please > tell me a link t

Re: Updating a model instance with extra checks.

2012-08-20 Thread Thomas Orozco
As a followup to the suggestion of MyModel.objects.filter(money__gte = value, pk = self.pk).update(F...) Here's an example: We have testapp/models.py: from django.db import models class TestModel(models.Model): balance = models.IntegerField() >>> from django.db.models import F >>> TestMod

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Thomas Orozco
I'd you believe PIL is not picking up your libjpeg when it should be, you could give Pillow a shot ; its basically a PIL installer that makes installation easier. Le 20 août 2012 22:30, "Kurtis Mullins" a écrit : > Whenever you compile PIL, make sure that libjpeg is available to it. You > should

Re: Updating a model instance with extra checks.

2012-08-20 Thread Thomas Orozco
I think I didn't make what I meant clear enough: What do you think about the following: . Insert record . Calculate balance by summing all records before (including) the one you just inserted (and I think you will agree this is not an extremely complex query) . If balance is positive, it's approv

Re: Updating a model instance with extra checks.

2012-08-20 Thread Melvyn Sopacua
On 20-8-2012 19:37, Thomas Orozco wrote: > Circumvent the problem with smarter design: don't store the money on the > object, make the user's money the sum of all their transactions (credit - > debit). > You get lesser performance, but you also get history! This does not circumvent the problem bu

Re: django + TinyMce

2012-08-20 Thread Amyth Arora
you are getting the error because you are not register the tinyMCE correctly, the line that is causing this error is: admin.site.register(TinyMCEAdmin) you need to specify a model class as the first argument and then the ModelAdmin class, for example: admin.site.register(TinyMCEModel, TinyMCEMod

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Kurtis Mullins
Whenever you compile PIL, make sure that libjpeg is available to it. You should see a message showing you what is available when you install PIL. On Mon, Aug 20, 2012 at 3:33 PM, MN TS wrote: > Yes. > > Png and GIF are ok. > > > On Mon, Aug 20, 2012 at 8:00 PM, Amyth Arora wrote: > >> did you tr

Re: [ImageField -Upload a valid image]

2012-08-20 Thread MN TS
Yes. Png and GIF are ok. On Mon, Aug 20, 2012 at 8:00 PM, Amyth Arora wrote: > did you try uploading any other images ? > > > On Mon, Aug 20, 2012 at 12:58 AM, MN TS wrote: > > Hello everybody. > > > > I've problem. When i upload image and submit i got follow form error. > >- Upload a valid

ManyToManyField errors.

2012-08-20 Thread MN TS
Hello I'm new in Django using 1.4version. So got some error. 'myapp.models.AdversiteImages'> has no ForeignKey to * MODEL* class AdversiteImages(models.Model): image = models.FileField(u'Photo' , upload_to='adversiteimage/%Y/%m/%d', null=True, blank=True) class Adversite(models.Model):

Re: ImproperlyConfigured at /

2012-08-20 Thread Satinderpal Singh
On Mon, Aug 20, 2012 at 5:24 PM, Amyth Arora wrote: > Hey, Thanks for the kind help. > > seems you are using django 1.4. FYI -> Yes, you are right. > django.template.loaders.app_directories.load_template_source has been > deprecated so you should rather use > django.template.loaders.app_directorie

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Nick Apostolakis
On Mon, Aug 20, 2012 at 8:18 PM, Jojo wrote: > what is the meaning of the fuzzy mark? > > fuzzy is some kind of auto translated field. it may be correct or not. when you are sure that the translation is correct, you remove the fuzzy annotation and then the translation works fine -- -

Re: Updating a model instance with extra checks.

2012-08-20 Thread Thomas Orozco
A few suggestions : Circumvent the problem with smarter design: don't store the money on the object, make the user's money the sum of all their transactions (credit - debit). You get lesser performance, but you also get history! Maybe you could try (not sure about that): MyModel.objects.filter(m

Re: Updating a model instance with extra checks.

2012-08-20 Thread Alexis Roda
Al 20/08/12 18:53, En/na Sebastien Flory ha escrit: Hi everyone, I'm looking for the proper django way to do an update of an attribute on my model instance, but only if the attribute current value is checked agains't a condition, in an atomic way, something like this: def use_money(self, value)

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Jojo
what is the meaning of the fuzzy mark? Il giorno venerdì 17 agosto 2012 23:11:25 UTC+2, Tomas Neme ha scritto: > > > For example for this link > > > > {% trans "contacts" > %} > > > > I have the msgstr="Contactos". I expect to see "Contactos" in the > browser, > > but I still see "contacts"

Updating a model instance with extra checks.

2012-08-20 Thread Sebastien Flory
Hi everyone, I'm looking for the proper django way to do an update of an attribute on my model instance, but only if the attribute current value is checked agains't a condition, in an atomic way, something like this: def use_money(self, value): begin_transaction() real_money = F('money')

Re: skip fixtures loading on 'manage.py test myapp'

2012-08-20 Thread Anton Baklanov
and, if anyone is interested, here is the answer - http://south.readthedocs.org/en/latest/settings.html#south-tests-migrate On Mon, Aug 20, 2012 at 7:36 PM, Anton Baklanov wrote: > Hi Melvyn! > > Just tested it on dummy project, and you are right - django itself does > not do anything like that.

Re: skip fixtures loading on 'manage.py test myapp'

2012-08-20 Thread Anton Baklanov
Hi Melvyn! Just tested it on dummy project, and you are right - django itself does not do anything like that. Problem is in South - when i remove it from INSTALLED_APPS 'manage.py test myapp' does not load any fixtures except 'initial_data'. So, i'm going to south sources now. Thanks! On Mon, A

Re: django + TinyMce

2012-08-20 Thread Владислав Иванов
Thank you all. I used a tutorial *Amyth*, but I still could not run-error 'MediaDefiningClass' object is not iterable. The following are my files, help reshist problem. *admin.py* from dipkurs.models import Disciplina, Raboty, Tipes from django.contrib import admin from tinymce.widgets import

Separating models from proxies conflicts

2012-08-20 Thread Nacho Mas
I'm trying to separate my models from my proxies in order to maintain the functionality more easily. The point is that, as my models.py started to grow over and over, I decided to create a new file in each app (proxies.py) where I'd define my proxies. I used to work like this: # models.py clas

Re: Need Django experts to explain some of my questions in bay Area, CA

2012-08-20 Thread Daniel Sokolowski
Feel free to call our office and ask for me - (613) 817-5159 On Monday, 20 August 2012 00:05:01 UTC-4, Nirmal Sharma wrote: > > Hi, > I am building a website for non-profit work using Django but i got stuck > at one place. > It would be great if somebody help me in resolving some of my question.

ANN: eGenix mxODBC Connect - Python Database Interface 2.0.0

2012-08-20 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Connect Python Database Interface Version 2.0.0 mxODBC Connect is our commercially supported client-server product for

Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Joseph Mutumi
You would be good to organize your configuration. Try creating a file under /etc/apache2/vhosts.d/ Probably my_domain.com (substitute my_domain.com with your actual domain). And move all the configuration to it: ServerAdmin webmaster@my_domain.com DocumentRoot /usr/local/django/mysite/med

Re: Best way to export data from Django?

2012-08-20 Thread Tom
Thanks Melvyn. Using model_to_dict I can now see the ID. Tom On Saturday, August 18, 2012 12:15:58 AM UTC+1, Melvyn Sopacua wrote: > > On 17-8-2012 18:41, Tom wrote: > > > I'm able to export the data this way, but I can't get the attributes > > of the full model as I would as if I was using the

Re: Best way to export data from Django?

2012-08-20 Thread Tom
Hi Kurtis Perhaps I'm doing something wrong – I am looking at the dump in the console (I have debug mode turned on) and in the post data I'm only seeing the following csrfmiddlewaretoken u'pPjBtpAXdODSvuEYjGPNok5WaGDvxQp4' pub_date_0 u'2012-08-17' question u'2011-01-01' pub_date_1 u'12:0

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Amyth Arora
did you try uploading any other images ? On Mon, Aug 20, 2012 at 12:58 AM, MN TS wrote: > Hello everybody. > > I've problem. When i upload image and submit i got follow form error. >- Upload a valid image. The file you uploaded was either not an image or > a corrupted image. > > I reinstall

Re: ImproperlyConfigured at /

2012-08-20 Thread Amyth Arora
Hey, seems you are using django 1.4. FYI -> django.template.loaders.app_directories.load_template_source has been deprecated so you should rather use django.template.loaders.app_directories.Loader Just change : django.template.loaders.app_directories.load_template_source TO django.template.loade

Re: Need Django experts to explain some of my questions in bay Area, CA

2012-08-20 Thread Amyth Arora
Hey Nirmal, Could you please post here, what problem are you facing. Thanks On Mon, Aug 20, 2012 at 9:35 AM, Nirmal Sharma wrote: > Hi, > I am building a website for non-profit work using Django but i got stuck at > one place. > It would be great if somebody help me in resolving some of my que

Re: django + TinyMce

2012-08-20 Thread Amyth Arora
Hey there, i could not really find a detailed step by step tutorial on setting tinyMCE on django, so i did one for you and for others, you can check it out here http://techstricks.com/django-tinymce-tutorial-step-by-step/ and feel free to ask any question if you face any problems On Mon, Aug 20, 2

Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Joris
The DocumentRoot directive is missing from the httpd.conf, indicating you did not send all the required data. This may be because your attachment is incomplete: There is an include statement in your httpd.conf: "Include /etc/apache2/conf.d/*.conf" All files from that conf.d folder are also pro

Re: django + TinyMce

2012-08-20 Thread Aljoša Mohorović
HTMLField() is probably the easiest way to use django-tinymce: http://django-tinymce.readthedocs.org/en/latest/usage.html#the-htmlfield-model-field-type let me know if you have any issues. Aljosa -- https://twitter.com/maljosa https://github.com/aljosa -- You received this message because you a

Re: django + TinyMce

2012-08-20 Thread miigaa ..
http://django-tinymce.googlecode.com/svn/tags/release-1.5/docs/.build/html/installation.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send

Need Django experts to explain some of my questions in bay Area, CA

2012-08-20 Thread Nirmal Sharma
Hi, I am building a website for non-profit work using Django but i got stuck at one place. It would be great if somebody help me in resolving some of my question. I need only an hr of you. Regards ~Nirmal -- You received this message because you are subscribed to the Google Groups "Django use

Re: django + TinyMce

2012-08-20 Thread Aljoša Mohorović
skip step #4, 1-3 should be enough: http://django-tinymce.readthedocs.org/en/latest/installation.html#id2 Aljosa -- https://twitter.com/maljosa https://github.com/aljosa -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

ImproperlyConfigured at /

2012-08-20 Thread Satinderpal Singh
I have to deploy osmeditor on my system, and download code from the link: http://wiki.openstreetmap.org/wiki/Editors/Django The database used in this was postgis, but i have mysql on my system, as the tables was successfully made by changing in the settings.py file, but on running it in the browser

Re: django + TinyMce

2012-08-20 Thread Diego pascual lopez
Hi, Try this link https://github.com/aljosa/django-tinymce Regards. On Mon, Aug 20, 2012 at 8:36 AM, Владислав Иванов wrote: > Hello! I am a novice. I want to install TinyMce on Django. I tried a lot > of lessons posted on the Internet, nothing. 3 days can not adjust. Please > tell me a link to

Re: deprecation warning from HttpResponseRedirect(reverse(...))

2012-08-20 Thread Paul Backhouse
Just importing a function from django.views.generic will trigger the warning. So I'd check your code for imports. I made tracking down the source of these warnings a little easier by putting stacklevel into simple.py: https://code.djangoproject.com/ticket/18780 On Sat, 2012-08-18 at 05:58 -0700,

Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Seyfullah Tıkıç
httpd.conf file is in the attachment. 2012/8/20, Joseph Mutumi : > Hello, > > Could you post the VirtualHost configuration for Apache? > That would greatly help us help you. > > Regards > > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç wrote: > >> Hello, >> >> I read the article below. >> htt

Re: Distinct Values in ModelChoiceField

2012-08-20 Thread Melvyn Sopacua
On 20-8-2012 0:16, Joseph Mutumi wrote: > That particular field at times appears multiple times in the database. How > do I make it > only have distinct values? > > This is a snippet, drop down will have repeated values if same color is > entered: > > class FavoriteColor(models.Model): > col

Re: problems in installing django on windows 7

2012-08-20 Thread Jani Tiainen
I've also written blog entry about slightly more complicated and more complete guide to get smooth ride with django and windows. http://djangonautlostinspace.wordpress.com/2012/04/16/django-and-windows/ 18.8.2012 6:54, Amyth Arora kirjoitti: If you still face problem you can go through this t

Re: skip fixtures loading on 'manage.py test myapp'

2012-08-20 Thread Melvyn Sopacua
On 19-8-2012 19:05, Anton Baklanov wrote: > When I'm running 'manage.py test myapp' it loads all fixtures that are in > 'myapp/fixtures' directory. Are you sure about that? I think it only loads what is loaded also with syncdb, so initial_data.*. > And what I want is to find a way to tell django