Re: Could I succeeded Mysql-python install ?

2013-03-25 Thread Yoh Kohno
snow, Navid and all I'm shameful, but this problem is solved myself. I use django.cgi , and The couse of this problem is nothing discribed in cgi as follows: === import site site.addsitedir('/home/username/local/lib/python2.7/site-packages')

Re: Stuck trying to get certain results with Django ORM and also raw sql - couldn't figure out how to achieve results either way

2013-03-25 Thread chefsmart
I gave up trying to get it all in one query and am currently using the following two raw sql queries. Of course, one might as well go through the ORM as it gets simpler when broken down into two distinct queries. fetch_purchase_orders_having_matching_delivery_orders = """ SELECT

Re: [django-users] Limit uploaded image properties

2013-03-25 Thread Nikolas Stevenson-Molnar
I think you can get at a file's size with the 'size' attribute (in bytes). Conceivably you could stick it inside a "clean" method for your form and do it that way. class MyForm(forms.Form): ... def clean_image(self): image = self.cleaned_data['image'] if image.size >

Re: [django-users] Limit uploaded image properties

2013-03-25 Thread Shawn Milochik
It's easy to do it by file size in your server config. For example, in nginx or Apache. You shouldn't have to set it in Django, and I don't believe Django provides any ability to cap it. https://docs.djangoproject.com/en/dev/topics/http/file-uploads/ -- You received this message because you are

[django-users] Limit uploaded image properties

2013-03-25 Thread Leonardo S
Hi, Is there a recommended way to limit an uploaded image, either at resolution or size in bytes ? And how to do it in Django ? Regards, Leonardo -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: [pinax-users] Installing Pinax 0.7 on Ubuntu

2013-03-25 Thread Stephen Marie-Rhodes
Hi Christos… IRC is probably your best bet… mailing list been quite for a while :) #pinax on Freenode - Stephen On Monday, 25 March, 2013 at 6:42 PM, Christos Jonathan Hayward wrote: > I've been working to make a 0.7 Pinax social project work with current > versions of Django and Pinax,

Re: Installing Pinax 0.7 on Ubuntu

2013-03-25 Thread Bill Freeman
If the official site isn't there, that doesn't bode well for ongoing support. I don't think that using Pinax for a project (2 to 3 years ago) saved me any time. Perhaps you should consider another approach? Bill On Mon, Mar 25, 2013 at 6:42 PM, Christos Jonathan Hayward <

Installing Pinax 0.7 on Ubuntu

2013-03-25 Thread Christos Jonathan Hayward
I've been working to make a 0.7 Pinax social project work with current versions of Django and Pinax, and it's been a time sink: we're talking zero to sixty for one week and counting for a timesaver for the web framework for perfectionists with deadlines. I realized today that I was maybe halfway

Re: Lost CSS & Javascript in Django Admin

2013-03-25 Thread Branko Majic
On Mon, 25 Mar 2013 18:12:44 -0300 Tim Cook wrote: > The Apache error.log has these types of entries: > "GET /static/admin/css/base.css HTTP/1.1" 404 > "GET /static/admin/css/dashboard.css HTTP/1.1" 404 > "GET /static/admin/js/actions.js HTTP/1.1" 404 Did you follow-through the

Re: Lost CSS & Javascript in Django Admin

2013-03-25 Thread James Schneider
This is probably a STATIC_URL issue. Check to make sure it is set correctly and that you've run manage.py collectatatic and that apache, etc. is set to serve those files directly. The dev server does some funny magic behind the scenes to get these files served up. -James On Mar 25, 2013 2:12 PM,

Lost CSS & Javascript in Django Admin

2013-03-25 Thread Tim Cook
Hi All, I have a Django app running behind Apache according to the WSGI instructions: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ I modified my project IAW Two Scoops of Django instructions so that I have separate settings files and different directories. (see layout

Re: Could I succeeded Mysql-python install ?

2013-03-25 Thread Navid Shaikh
Hi Yoh, Could I succeeded install ?? Can you mentioned/write here where you have imported/used MySQLdb module in your code? One easy way to test is: Open Python/IPython shell, try importing MySQLdb module like; >>> import MySQLdb If no error pops up, it is installed properly. Navid

Could I succeeded Mysql-python install ?

2013-03-25 Thread snow leung
Easy to know if successed, Try this at python: Import MySqlDb Mind the upper yourself.have fun! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Could I succeeded Mysql-python install ?

2013-03-25 Thread snow leung
Easy to know if successed, Try this at python: Import MySqlDb Mind the upper yourself.have fun! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Could I succeeded Mysql-python install ?

2013-03-25 Thread snow leung
Easy to know if successed, Try this at python: Import MySqlDb Mind the upper yourself.have fun! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
I see what you mean. I had in mind details such has the template inheritance, as for the conception I'll find out my own right way. On Monday, March 25, 2013 8:27:05 PM UTC+1, Shawn Milochik wrote: > > On Mon, Mar 25, 2013 at 3:16 PM, Benjamin Marsili > wrote: > > I

Re: What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
Hey Cal, Firstly, I will not keep a blog up to date. But rest assured I will find my way to contribute back to the community. Secondly, I want to say thanks for taking the time to share your thoughts and experience. I never stop learning new things and this is a great opportunity for me to

Re: What are the steps to build a website?

2013-03-25 Thread Shawn Milochik
On Mon, Mar 25, 2013 at 3:16 PM, Benjamin Marsili wrote: > I am afraid to make mistakes ;). Since there is only one correct way to do > things in Python, I don't want to hack my way around and waste my time after > a few weeks. When there's only "one correct

Re: What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
Tom, I build some websites with PHP a long time ago. So I have the concepts, but I miss the tools. Django seems awesome so I decided to give it a try while I start my own project. I am doing point 1) & 2), along the way I came here to check if I'm not heading to a wall. 3) awesome, I'll

Re: What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
I am afraid to make mistakes ;). Since there is only one correct way to do things in Python, I don't want to hack my way around and waste my time after a few weeks. On Monday, March 25, 2013 1:03:28 PM UTC+1, Frankline wrote: > > My advice: Stop making resolutions and just start something. You

Re: What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
Tim, This looks very promising, I will give it a try. Thanks. On Monday, March 25, 2013 12:58:02 PM UTC+1, Tim Cook wrote: > > You obviously have a lot of questions, with a lot of variability in the > answers. > I highly recommend: https://django.2scoops.org/ > > --Tim > > > On Mon, Mar 25,

Re: delete obsolete content type entries...

2013-03-25 Thread chris
It seems that stale content types return `None` for `ContentTpye.model_class()` , so the following deletes all stale content types. I would back up and test this extensively first though because deleting content type you don't want to is dangerous. for c in ContentType.objects.all(): if not

Re: Python path in new 1.4 project structure?

2013-03-25 Thread Shawn Milochik
On Mon, Mar 25, 2013 at 12:56 PM, Carsten Fuchs wrote: >> !!! PONTIFICATION ALERT !!! >> Don't do that. > > Uhh, about the first word, I didn't find it in any dictionary. > Is this somehow related to pope Franziskus? ;-) > >From

Re: Python path in new 1.4 project structure?

2013-03-25 Thread Carsten Fuchs
Hi Bill, thank you very much for your clear and detailed reply! All problems resolved. Am 22.03.2013 20:52, schrieb Bill Freeman: !!! PONTIFICATION ALERT !!! Don't do that. Uhh, about the first word, I didn't find it in any dictionary. Is this somehow related to pope Franziskus? ;-) So

Re: Create Django web apps with drag and drop interface builder

2013-03-25 Thread timothy crosley
Hi Gabriel, Thanks for your response, Do you have an further information on how Servoy is built - or any particular features you think I should take inspiration from? I went to there site and tried to download it, and was only able to after creating an account and filling out a survey. Even

how to copy a cart session

2013-03-25 Thread slim
Hello everyone, I have an e-commerce site A user arrives without first logging in, adds a few things to their cart, a session is established for this user, and then proceeds to the checkout. the command is then saved in database. Now I need the user to log in and see their recent

Re: What are the steps to build a website?

2013-03-25 Thread Cal Leeming [Simplicity Media Ltd]
Oh and also, you should consider maybe keeping a journal of your experiences and put a few hours aside to write up a blog post to help other people in the future.. if you haven't got a blog, then even just a detailed mailing list email would suffice :) One of the reasons Django is such a

Re: What are the steps to build a website?

2013-03-25 Thread Cal Leeming [Simplicity Media Ltd]
Hi Benjamin, Some others have already made some good suggestions, so I'll throw some general comments in. Tim made a good suggestion of 2scoops, you could also try; http://learnpythonthehardway.org/book/ http://www.djangobook.com/en/2.0/index.html In my own personal opinion, I think you would

Re: What is the difference in the 1.5.x branches for instance, vs 1.5

2013-03-25 Thread Huy T
Thank you Karen! Thinks makes sense for me, such that if wanting to stay on a long term stable version of 1.5, would pull 1.5.x The question was set forward after reading about that memory leak caused issue in a separate mail. On Mon, Mar 25, 2013 at 8:10 AM, Karen Tracey

Re: What are the steps to build a website?

2013-03-25 Thread Tomas Ehrlich
> You can't do it perfectly the first time. The only way to do it well > is experience. The only way to get experience is to make mistakes. I disagree. When you make mistake, you know what's wrong, but you still don't know, what's right. You need to learn, how to make things right. To Benjamin:

Re: What are the steps to build a website?

2013-03-25 Thread Shawn Milochik
On Mon, Mar 25, 2013 at 8:03 AM, Frankline wrote: > My advice: Stop making resolutions and just start something. You will be > happier if you do. Along the way, you'll have gained an understanding of > your project to so much more. That is how I learned. > > Do not be afraid

Re: An alternate cry for help

2013-03-25 Thread Bill Freeman
I used pinax for a project several years ago. I did not enjoy it, but maybe it has gotten better. Its focus, as I understood it, was to provide a collection of apps that implemented one group's idea of a full featured social site, and which had been tweaked to work together. The client required

Re: What is the difference in the 1.5.x branches for instance, vs 1.5

2013-03-25 Thread Karen Tracey
On Sun, Mar 24, 2013 at 11:39 PM, Huy T wrote: > Is it better practice to pull from 1.5.x vs the master? I am unclear as to > the difference unless it eventually is rolled into the master. > > 1.5.x branch has bug fixes made after the release of 1.5. It will never be rolled

Re: What are the steps to build a website?

2013-03-25 Thread Frankline
My advice: Stop making resolutions and just start something. You will be happier if you do. Along the way, you'll have gained an understanding of your project to so much more. That is how I learned. Do not be afraid to make mistakes along the way. On Mon, Mar 25, 2013 at 2:58 PM, Tim Cook

Re: What are the steps to build a website?

2013-03-25 Thread Tim Cook
You obviously have a lot of questions, with a lot of variability in the answers. I highly recommend: https://django.2scoops.org/ --Tim On Mon, Mar 25, 2013 at 8:17 AM, Benjamin Marsili wrote: > Hey everyone, > > I am trying to design a website from scratch

Re: Help with Dynamic ChoiceField

2013-03-25 Thread Dilip M
On Mon, Mar 25, 2013 at 4:54 PM, Dilip M wrote: > Hi, > > I am trying to fill in *choices *for MultipleChoiceField in runtime. I > am using formWizard and trying to return the dictionary using get_form_kwargs. > > > I am able set the *initial* for CharField but not *choices

What are the steps to build a website?

2013-03-25 Thread Benjamin Marsili
Hey everyone, I am trying to design a website from scratch using django, it's my first time using it and I read the basic tutorials. Now it's time to get things done and I wonder where to begin. I don't want to make design mistakes. Let's take an internet website for example. There would be a

Storing a related queryset in attribute clears session

2013-03-25 Thread Francesc Ortiz
Hi, I opened this as bug report, but I would like to get an feedback here: https://code.djangoproject.com/ticket/20129#ticket Copy/pasted bug report: I have a very weird behavior with this piece of code that took me some hours to find out: class ModelA(models.Model, AbstractModel) ...

What is the difference in the 1.5.x branches for instance, vs 1.5

2013-03-25 Thread Huy T
Is it better practice to pull from 1.5.x vs the master? I am unclear as to the difference unless it eventually is rolled into the master. Also, when using pip to install, I am launching the command: pip install -v git+https://github.com/django/django.git@1.5.x But have also seen #egg=django ,

Could I succeeded Mysql-python install ?

2013-03-25 Thread Yoh Kohno
Nice to meet you, everyone ! I can use English very very little. But I want to ask you the question. Now, I'm building the rental server what use django. But, the page is "500 Internal Server Error" and I see the log message as follows:

Stuck trying to get certain results with Django ORM and also raw sql - couldn't figure out how to achieve results either way

2013-03-25 Thread chefsmart
Please see simplified django model representation on pastebin In this scheme of things, there are several SiteOffice objects that are governed by a single HeadOffice object (I haven't included either in the pastebin code). The head_office instance generates a

Help with Dynamic ChoiceField

2013-03-25 Thread Dilip M
Hi, I am trying to fill in *choices *for MultipleChoiceField in runtime. I am using formWizard and trying to return the dictionary using get_form_kwargs. I am able set the *initial* for CharField but not *choices *for MultipleChoiceField. I am trying to show up dynamic choices based on the

Create Django web apps with drag and drop interface builder

2013-03-25 Thread Gabriel - Iulian Dumbrava
Hi Tim, I have not tried webbot yet, but I would also like to make a suggestion. Take a look on how Servoy is built. It is also kind of a framework to build database intensive apps both for web and smart client. They have built it on top of eclipse, so they were able to leverage on that.