Re: Process Related Object when Saving

2012-05-15 Thread ghachey
Hi again; Looking at the source code I realised that form.save_m2m() must be called. def save_related(self, request, form, formsets, change): form.save_m2m() for formset in formsets: self.save_formset(request, form, formset, change=change) if not change:

Process Related Object when Saving

2012-05-15 Thread ghachey
Hi; I am trying to generate a printable report when saving objects for the first time. This is easy enough except I can't easily access related objects by overriding save() as they are not saved yet, nor are they available within the save() method. The new ModelAdmin.save_related() in Django 1.4

Re: how to layout a "big" project in django 1.4 - best practices ?

2012-05-15 Thread Phang Mulianto
Hi.. For the app, i like to use loose couple method from project dir so i can reuse and plug my app in other project easily. I learn it from a book call practical django apps. And i want ask about settings.py, if we make the settings become a folder and put dev.py, prod.py, any step to make

Re: Required True to Generic Relations

2012-05-15 Thread Guevara
Solution: http://pastebin.com/011WsfzD Regards. On 15 maio, 23:43, Guevara wrote: > Hi all! > > I need a required true in Generic Relations. > Have this code: > > # Models > class Client(Person): >     addresses = GenericRelation(Address) > > class Address(models.Model):

django 1.4 : gunicorn can't find static files. settings option

2012-05-15 Thread Bolang
Hi, I just started to using django 1.4 with gunicorn 0.14.3 With ./manage.py runserver , i can start django properly and django can find my files in static directory. Then i use gunicorn and then gunicorn can't find my files in static directory. I have tried these combination gunicorn

Required True to Generic Relations

2012-05-15 Thread Guevara
Hi all! I need a required true in Generic Relations. Have this code: # Models class Client(Person): addresses = GenericRelation(Address) class Address(models.Model): # others fields content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField()

Can't locate 'media' directory

2012-05-15 Thread django-user59
Hi, I attempted to add 'media' directory to the root of my project and placed a css file and some ajax javascript. The server runtime is unable to locate it. Can someone help? I have the following in settings.py MEDIA_ROOT = os.path.join(ROOT_PATH, 'media') MEDIA_URL =

How do I install the module

2012-05-15 Thread django-user59
Hi, I attempted to download and use one of the sources for examples - the "bashoneliners" project from: http://code.google.com/p/bashoneliners/ However, it complains that django_openid_aith is not found. I downloaded the django_openid_auth module from the location

Re: Use Django to implement my GUI!

2012-05-15 Thread Eugène Ngontang
Hi Jani! Now you can understand what i meant, but I'm not just try to mec things complicated. I'm not talking here about my technical implementation, but i'm describing the needs/contraints, and my app architecture to you. - The remote clients are at the heart of the software system, since

Re: Can I override get_object() of a generic view?

2012-05-15 Thread Kurtis Mullins
Hey, I'm not really sure what you're trying to do here. You're using a CreateView (which is built for creating new objects) and overriding the get_object(self, queryset=None) method (found in SingleObjectMixin -- https://github.com/django/django/blob/master/django/views/generic/detail.py) to, I'm

Re: Django AJAX forms and views

2012-05-15 Thread Kurtis Mullins
I'll try to help out a bit. The first problem I see is in your Javascript. I believe your JQuery selector is supposed to be the field's ID -- so, for example, $("#csrfmiddlewaretoken"). Next, in your view -- I don't see where you're actually returning any data. You should use Firebug or the

Re: sweat-equity

2012-05-15 Thread Mike Dewhirst
Marcin Some changes to increase coherence and a new Project Bootstrap page to prompt incorporation of the project. https://github.com/mdewhirst/sweat-equity/wiki/_pages I will take it to my lawyer before starting and I'll post the changes then. Thanks Marcin Mike On 15/05/2012 10:41pm,

Django AJAX forms and views

2012-05-15 Thread Joel Khan
I have a form that is used to add an item where 2 dropdowns are populated using different database than the database where the form will be submitted. I would like to add AJAX to the drop downs where selecting one item in the first drop down will auto populate data in the 2nd drop down using AJAX.

Inline formset for django project

2012-05-15 Thread William Ibarra Rodriguez
H! i need a way to use a inlineformset in my app, anyone knows how to use the inline tabular o stack formset of the admin site in an app?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

how to layout a "big" project in django 1.4 - best practices ?

2012-05-15 Thread Michael Palumbo
Hi, I have found lots of posts on how organizing a kinda big project with Django =<1.3 but I was wondering what could be the best option with Django 1.4 since the default layout has changed. I have found just this post on the internet talking about structuring a django 1.4 project:

Re: Django virtualenv, pythonpath issues

2012-05-15 Thread Bill Freeman
To deploy with WSGI you probably want to use Apache with modwsgi. There are other ways, but this is common. modwsgi must be build against the python you want to use, and it should have preferably been built after being configured with --enable-shared. That is the only python that apache will

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Hutch
are you sure this is actually a good idea? in almost all cases serving the image via the actual web server, whose job it is to serve images, is the best idea. either way, you wouldn't use an image field to store base64 data. that's for references to actual files in a filesystem. first you'd

Re: Help - Which IDE is best to use.

2012-05-15 Thread Ali Mesdaq
You make a really good point about starting with Vim. I personally started with Vim and used it exclusively for years and feel all developers need to be at least proficient with it. But just as you should start with Vim you probably also should move on once your intermediate to advanced in

Can I override get_object() of a generic view?

2012-05-15 Thread Jon Paugh
Hello. *How do I override get_object() from a subclass of CreateView? Is there something I'm missing?* I'm trying to override *get_object()* to provide a simple behavior. However, my *get_object()* is never called. Instead, Django complains that I didn't set self.model properly. I opened

Django virtualenv, pythonpath issues

2012-05-15 Thread Otávio Augusto Soares
I'm trying to deploy a django app with virtualenv but I'm not a linux expert user. It's on a shared host. If I type python I got the python 2.4 console. If a type python2.7 I got the 2.7 console. I want to use the 2.7. 1. I installed virtualenv with setuptools in my private

Re: Help - Which IDE is best to use.

2012-05-15 Thread knowledge_seeker
For people used to using Vim in Unix, there is an Eclipse plug-in called Vwrapper. - knowledge_seeker On Tuesday, May 15, 2012 3:16:00 AM UTC-7, Karl Sutt wrote: > > I use Vim, for everything involving writing -- coding, producing > papers/articles/reports, editing existing code and documents.

Re: Help.......!!

2012-05-15 Thread yati sagade
Hi As mentioned earlier, please note that this list is meant to have Django related discussions. And Django != Python unlike Ruby(on Rails). You may want to ask your question in a place like stackoverflow.com. Cheers :) On Tue, May 15, 2012 at 11:40 PM, Tanveer Ali Sha

Re: How to

2012-05-15 Thread Bill Freeman
Which platform? I mostly do Linux. If you don't then the instructions for distribute and pip on pypi may need modification (e.g.; if you don't have curl). Assuming the python you wish to use is already installed, and the old easy_install isn't, you need distribute in order to install pip, see:

Re: Help - Which IDE is best to use.

2012-05-15 Thread Matthew Lai
I use PyCharm, it's a very good IDE, you can download and try first. On Monday, May 14, 2012, Sanjay M wrote: > I am new to Django, and I was confused in choosing a IDE between Eclipse > and aptana studio 3 to edit source code. Kindly suggest me a good one. > > Thank you in advance, > Regards, >

Re: Help.......!!

2012-05-15 Thread Tanveer Ali Sha
Actually i wanna deploy front end user interface with django for network interface projectpls help me to get this On Tue, May 15, 2012 at 1:41 AM, Dennis Lee Bieber wrote: > On Mon, 14 May 2012 20:30:33 +0530, Tanveer Ali Sha > declaimed the

Re: How to

2012-05-15 Thread 马博文
1. install python if you don't have one; 2. download easy_install, and install it; 3. install pip through easy_install; 4. install virtualenv through pip, by using "pip install virtualenv; pip install virtualenvwrapper " 5. mkdir ~/.virtualenv ,in .bash_profile “export

Re: Distributing Django apps

2012-05-15 Thread Eugenio Minardi
I usually keep the configuration files and the statics in a separate process (manual in case of small number of deploys) Eugenio Il giorno 15/mag/2012 13:32, "Steve Kilbane" ha scritto: > I had a look at fagungis, but it didn't seem to be addressing the > issue. I

Re: Database Error at /admin/coltrane/entry/add/

2012-05-15 Thread Furbee
Have you checked your database to see that the field actually exists. If you've added excerpt_html since you ran python manage.py syncdb you won't have the field in the table. You would either need to use South to include it, add it by hand to the table, or delete the table and run python

How to

2012-05-15 Thread Sanjay M
I want to create a virtualenv pip, but I don't know how to Install virtualenv by running pip install virtualenv? Can anyone explain how to setup a virtualenv? Thanks in advance, -Regards, Sanjay M -- You received this message because you are subscribed to the Google Groups "Django users"

Database Error at /admin/coltrane/entry/add/

2012-05-15 Thread Gethin Llyn ab Alwyn
Hello all! I'm following James Bennett's book Practical Django Projects, and I've got stuck at page 65 Chapter 4. On that page, there is an instruction to add an entry through the models created and added to admin interface under "Entries". I can populate the fields through the add link, but when

Re: Middleware order

2012-05-15 Thread Furbee
I don't know, but the revision middleware smells like it could be the culprit. It is the last module in processing the request, and the first one processing the response back up the chain. Maybe it is returning the old data. Just a stab in the dark. Furbee On Tue, May 15, 2012 at 8:23 AM, David

Middleware order

2012-05-15 Thread David
Hi This is how my middleware is currently ordered: 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.gzip.GZipMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware',

Re: Tree hierarchy with prefetch_related()?

2012-05-15 Thread Carsten Fuchs
Dear Russell, thank you very much for your reply, with all the background info and details! It was very helpful! :-D Best regards, Carsten Am 15.05.2012 01:45, schrieb Russell Keith-Magee: On Tue, May 15, 2012 at 1:20 AM, Carsten Fuchs wrote: Dear Django group,

Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-15 Thread German Larrain M.
Andrew, What bothers me is that the redirection setup works perfectly for any value of "anything" or querystring; it only fails for this specific case. How is that possible? Thanks again On Mon, May 14, 2012 at 7:10 PM, Andrew Bruce wrote: > You have passed 'anything' as

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Frank Stüss
Hi, maybe you could use http://djangosnippets.org/snippets/1669/ Greetings Am Dienstag, den 15.05.2012, 17:36 +0530 schrieb Nikhil Verma: > Hi > > I had similar situation where a textfield (which was made a markup > editor by applying css and all) was given where people come in write >

Re: syncdb not creating columns in postgresql database

2012-05-15 Thread Michael Ackerman
Thanks for all the advice, I appreciate it. On Tue, May 15, 2012 at 3:22 AM, doniyor wrote: > sorry for bad advice.. i thought i could work,, > > Am Dienstag, 15. Mai 2012 08:52:35 UTC+2 schrieb lawgon: > >> On Mon, 2012-05-14 at 09:06 -0700, doniyor wrote: >> >

Re: Pass data from html to views.

2012-05-15 Thread voss
Hi Am, thank you so much for the explanation. It is very helpful! And thank you for the idea of using ajax for my problem. I used dajax and it is working nicely! On Tuesday, May 15, 2012 6:37:12 AM UTC-5, doniyor wrote: > > ajax is not that different from dajax.. actually almost same logic..

Re: sweat-equity

2012-05-15 Thread Mike Dewhirst
On 15/05/2012 6:23pm, Marcin Tustin wrote: You will want to have a lawyer advise you on your agreements. Although your drafting is pretty tight, it could be a bit tighter, I'd like to strike a decent balance. My own lawyer is a tad aggressive and to be honest I wouldn't sign anything he

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Nikhil Verma
Hi I had similar situation where a textfield (which was made a markup editor by applying css and all) was given where people come in write anything and discuss about their topics; you can imagine like a forum. So i made some regular expressions to allow videos to show in an iframe and image to

Store base64 data in database with imagefield ?

2012-05-15 Thread bussiere bussiere
Does anyone tried to store only Base64 info in databse of an image instead of a file with django image field ? Do you have any idea how to do it ? Or some hints to give me ? regards and thanks Bussiere "Les nouvelles technologies offrent pleins de nouvelles possibilités, pleins de

Re: Pass data from html to views.

2012-05-15 Thread doniyor
ajax is not that different from dajax.. actually almost same logic.. but look, i try to explain how it should work.. your index.html click me and your ajaxfunction in the head of this index.html is this. function ajaxfunction(){ wanted_value = $("input[name='wanted_value']").val();

Re: Distributing Django apps

2012-05-15 Thread Steve Kilbane
I had a look at fagungis, but it didn't seem to be addressing the issue. I didn't give much detail before, so that's not a surprise. :-) So: Stage 1: person X develops an open source Django app. Stage 2: person X makes the app sources available somewhere (say, github). Stage 3: person Y

Re: syncdb not creating columns in postgresql database

2012-05-15 Thread doniyor
sorry for bad advice.. i thought i could work,, Am Dienstag, 15. Mai 2012 08:52:35 UTC+2 schrieb lawgon: > > On Mon, 2012-05-14 at 09:06 -0700, doniyor wrote: > > delete your app from INSTALLED_APPS and syncdb, AND list it again in > > INSTALLED_APPS and syncdb again.. > > > > if it doesnot

Re: configure FileZilla upload destination!!

2012-05-15 Thread doniyor
okay thanks, but what about just pulling from repo instead of using ftp ? is it also a solution for this? Am Dienstag, 15. Mai 2012 10:53:32 UTC+2 schrieb @timkofu: > > You would configure the FTP daemon to allow that, yes. I use rsync or scp > and make sure the user I'm SSH-ing as has RW

Re: Help - Which IDE is best to use.

2012-05-15 Thread Karl Sutt
I use Vim, for everything involving writing -- coding, producing papers/articles/reports, editing existing code and documents. It is not an IDE, but a text editor, and it is absolutely excellent. Once you learn Vim, you'll never want to use anything else (this is the case for me, at least). The

Re: Help - Which IDE is best to use.

2012-05-15 Thread cougar cougar
ulipad , free and build with wxpython 2012/5/14 Sanjay M > I am new to Django, and I was confused in choosing a IDE between Eclipse > and aptana studio 3 to edit source code. Kindly suggest me a good one. > > Thank you in advance, > Regards, > Sanjay M > > > -- > You

Re: Help - Which IDE is best to use.

2012-05-15 Thread cougar cougar
Pycharm 2012/5/14 Sanjay M > I am new to Django, and I was confused in choosing a IDE between Eclipse > and aptana studio 3 to edit source code. Kindly suggest me a good one. > > Thank you in advance, > Regards, > Sanjay M > > > -- > You received this message because you

Re: How to get the Exception Type

2012-05-15 Thread bruno desthuilliers
On May 15, 1:29 am, LJ wrote: > I am trying to add exception handling to my application. > I have been reading the documentation on Django > Exceptions:https://docs.djangoproject.com/en/dev/ref/exceptions/ > I also found the list of Exceptions (both Django and Python). > But

Re: How to get the Exception Type

2012-05-15 Thread bruno desthuilliers
On May 15, 2:31 am, Nikolas Stevenson-Molnar wrote: > You could also log the whole stack trace using the traceback > module:http://docs.python.org/library/traceback.html Or just use logging.exception, that takes care of all the gory details in a single and simple call:

Re: configure FileZilla upload destination!!

2012-05-15 Thread Timothy Makobu
You would configure the FTP daemon to allow that, yes. I use rsync or scp and make sure the user I'm SSH-ing as has RW permissions on the desired folder. On Tue, May 15, 2012 at 9:00 AM, doniyor wrote: > Hi Nik, thanks for help, but look, is it possible to configure

Re: syncdb not creating columns in postgresql database

2012-05-15 Thread Timothy Makobu
You might want to look into using South http://south.aeracode.org/ At first i thought it was cool, then I needed to alter a table with important data on it, and that's when I saw it's usefulness. On Tue, May 15, 2012 at 9:52 AM, kenneth gonsalves wrote: > On Mon,

Re: Help - Which IDE is best to use.

2012-05-15 Thread Timothy Makobu
PyCharm. Spend the $$, its worth it. On Tue, May 15, 2012 at 10:13 AM, Phang Mulianto wrote: > Again? > > Well i just use a simple text editor > On May 15, 2012 2:53 PM, "Harold.Miao" wrote: > >> it is not a free sw >> >> 2012/5/15 Ezequiel Bertti

Re: sweat-equity

2012-05-15 Thread Marcin Tustin
You will want to have a lawyer advise you on your agreements. Although your drafting is pretty tight, it could be a bit tighter, and there are certain legal issues that arise, such as how a "project" can own anything (such as copyrights). You'll likely want a jurisdiction and choice-of-law clause

Re: Help - Which IDE is best to use.

2012-05-15 Thread Phang Mulianto
Again? Well i just use a simple text editor On May 15, 2012 2:53 PM, "Harold.Miao" wrote: > it is not a free sw > > 2012/5/15 Ezequiel Bertti > >> 10x pycharm... >> >> the best one... >> >> the only one made to work with python and django... >> >> >>

Re: Help - Which IDE is best to use.

2012-05-15 Thread Harold.Miao
it is not a free sw 2012/5/15 Ezequiel Bertti > 10x pycharm... > > the best one... > > the only one made to work with python and django... > > > On Tue, May 15, 2012 at 12:28 AM, Rivsen wrote: > >> Maybe you can try Sublime Text 2. It's a good IDE or

Re: syncdb not creating columns in postgresql database

2012-05-15 Thread kenneth gonsalves
On Mon, 2012-05-14 at 09:06 -0700, doniyor wrote: > delete your app from INSTALLED_APPS and syncdb, AND list it again in > INSTALLED_APPS and syncdb again.. > > if it doesnot work, do this: > > delete your db, then syncdb, then list your app in INSTALLED_APPS and > syncdb again. this is

Re: Use Django to implement my GUI!

2012-05-15 Thread Jani Tiainen
Hi, Now it starts to make "sense". I just wonder why are you trying to build something so extremely complicated? What is the rationale behind to have additional middleware layer between web ui and the server backend? Wouldn't it be sufficient to have architecture like: Browser <-> django

Re: configure FileZilla upload destination!!

2012-05-15 Thread doniyor
Hi Nik, thanks for help, but look, is it possible to configure the httpd.conf or anything which is responsible for upcoming files so that all files which i upload thru filezilla comes directly to that new folder i created for my djangoproject code to live? or do i have to copy files everytime