Re: A lots of foreign keys - Django Admin

2012-09-25 Thread rentgeeen
I postet the query above in the 1st post, it takes like 17secs, 1 of them like 60 secs SELECT `auto_type`.`id`, `auto_type`.`client_id`, `auto_type`.`category_id`, `auto_type`.`subcategory_id`, `auto_type`.`project_id`, `auto_type`.`title`, `auto_client`.`id`, `auto_client`.`title`, `auto_categor

Re: A lots of foreign keys - Django Admin

2012-09-25 Thread Jani Tiainen
26.9.2012 3:08, rentgeeen kirjoitti: I did that already, removed the field_to and make them as normal primary keys, the problem is when I put FK fields into "list_display" admin it still takes SQL 60 secs to process, if I remove them all is ok and App works great. so weird On Tuesday, 25 Septe

Re: Getting Started

2012-09-25 Thread Laxmikant Gurnalkar
Hi, Extending to Jani Tiainen-- Or you have not properly installed Django, It looks like manage.py is missing. In any of the version manage.py comes by default. Use 7-zip to unzip the django tarballs on windows machine. regards, Laxmikant On Mon, Sep 24, 2012 at 9:37 PM, Greg L

Re: Inheritance and default value

2012-09-25 Thread Laxmikant Gurnalkar
Hi winniehell, I think this will help you. Dummy.__dict__.update({"myfield":42}) regards --Laxmikant Gurnalkar On Tue, Sep 25, 2012 at 4:17 PM, winniehell wrote: > Hello list! > > I try to overwrite a default value of a field in a subclass of an > abstract model. This is how I do it curr

Re: eCommerce Solutions

2012-09-25 Thread carlos
noup :( sorry only try use mezzanine cms!! On Tue, Sep 25, 2012 at 7:30 PM, T.J. Simmons wrote: > Thanks Carlos, I meant to include Cartridge in my list - potentially > instead of Plata, actually. Do you have any experience with it? > > On Tue, Sep 25, 2012 at 4:38 PM, carlos wrote: > >> Hi, may

Re: eCommerce Solutions

2012-09-25 Thread T.J. Simmons
Thanks Carlos, I meant to include Cartridge in my list - potentially instead of Plata, actually. Do you have any experience with it? On Tue, Sep 25, 2012 at 4:38 PM, carlos wrote: > Hi, maybe try with > http://mezzanine.jupo.org/ and http://cartridge.jupo.org/ > > cheer, > > > On Tue, Sep 25, 20

Re: A lots of foreign keys - Django Admin

2012-09-25 Thread rentgeeen
I did that already, removed the field_to and make them as normal primary keys, the problem is when I put FK fields into "list_display" admin it still takes SQL 60 secs to process, if I remove them all is ok and App works great. so weird On Tuesday, 25 September 2012 02:01:17 UTC-4, Jani Tiain

Re: django epydoc style documentation ?

2012-09-25 Thread Russell Keith-Magee
On Tue, Sep 25, 2012 at 5:16 PM, django_noob wrote: > Hi everyone, > > Is django documentation available in some other foramt, like epydoc or > javadoc foramt anywhere? > Django documentation is quite detailed, but I would prefer to have it > different format, more api-like ? > > Just to be sure,

Re: eCommerce Solutions

2012-09-25 Thread carlos
Hi, maybe try with http://mezzanine.jupo.org/ and http://cartridge.jupo.org/ cheer, On Tue, Sep 25, 2012 at 2:57 PM, T.J. Simmons wrote: > Hi all, > > I've got a store I need to get up and running in just over a month. I'm > trying to pick an eCommerce solution but there just seems to be a lack

eCommerce Solutions

2012-09-25 Thread T.J. Simmons
Hi all, I've got a store I need to get up and running in just over a month. I'm trying to pick an eCommerce solution but there just seems to be a lack of conversation (at least, that I've been able to find) regarding the different Django solutions. Do you guys have any experience with any of t

Re: [need advice and suggestion] questions about generating static web page.

2012-09-25 Thread Ezequiel
On Tuesday, September 25, 2012 3:11:45 PM UTC-3, bruce wrote: > > Dear All, > I am a novice. > Currently, > I am thinking to build a simple static personal web page generator for the > people in my group. So, they can login my django powered site and input > their info, such as name, title, pho

Re: questions about generating static web page.

2012-09-25 Thread bruce
Thanks very much! Let me post the class in my models.py so, in the models.py, there are three classes: person, section and item. a person has several sections. each section contains several items. class Person .. class Section(models.Model): person = models.ForeignKey(Person)

Re: django<-->twitter bootstrap philosophy

2012-09-25 Thread Vincent Fulco
Yes, thanks. Templating remains the last piece of the puzzle I have yet to really work on and it wasn't clear how different it was from a framework. Appreciate your explanation. V. On Tuesday, September 25, 2012 11:40:36 AM UTC-5, azizmb.in wrote: > > I think you have confused things a little

Re: Step up to the plate

2012-09-25 Thread Alex Glaros
Two volunteers have stepped forward but need a little energy from the community to get the project going. Could you give them a hand? more details: http://gov-ideas.com/startup-and-employment-program.htm contact info: http://gov-ideas.com/contact.htm thanks! Alex On Thursday, September 6, 201

Re: questions about generating static web page.

2012-09-25 Thread Bill Freeman
I, and probably others, would need a more detailed description of these tables and how they are to be used, before we could offer help on them. On Tue, Sep 25, 2012 at 3:22 PM, bruce wrote: > Thanks!! > Yes. This is exact what I did. > Actually, I finish this in the admin template. > But my quest

Re: questions about generating static web page.

2012-09-25 Thread bruce
Thanks!! Yes. This is exact what I did. Actually, I finish this in the admin template. But my question is: the template may contain some tables. These tables may have different number of rows and columns. so, in the model, there will be an additional class mytable. mytable should contain th

Re: sqlite datetime issue with django

2012-09-25 Thread Bill Freeman
When django reads the data back, does it reconvert it to your timezone? If so, why is it a problem that it is stored as UTC in the database? On Tue, Sep 25, 2012 at 2:19 PM, puneet loya wrote: > Hi, > > I m having problems with sqlite insertion. > > When i enter datetime object using django into

Re: questions about generating static web page.

2012-09-25 Thread Bill Freeman
It sounds a bit like you want a profile app. It's model holds those things beyond what is already in auth User, which could include one or more text fields, perhaps using TinyMCE or markdown. There is plumbing in Django whereby if you specify such a model in settings.py it will get attached OneTo

Re: questions about generating static web page.

2012-09-25 Thread Amyth Arora
sorry, changeuserdata = UserData.objects.filter(userid=1) to userdata = UserData.objects.filter(id=userid) On Wed, Sep 26, 2012 at 12:15 AM, Amyth Arora wrote: > What do you mean by generating a Static HTML page for each user? > > From what i understand you can simply have a profile layout's

Re: questions about generating static web page.

2012-09-25 Thread Amyth Arora
What do you mean by generating a Static HTML page for each user? >From what i understand you can simply have a profile layout's html template and use simple template tags to retrieve user data. For example: 1. Define a UserData class in your models.py that will basically store all the user data.

Re: Django on Bluehost

2012-09-25 Thread Gladson SimplĂ­cio Brito
https://www.appfog.com/ 2012/9/24 Babatunde Akinyanmi > If cloud, I like dotcloud > > On 9/24/12, Alec Taylor wrote: > > You will probably crap-out with Bitbucket. Go to a cloud provider > instead. > > > > For example, Red Hat OpenShift offers their IaaS platform for free (ATM > > anyway). > >

sqlite datetime issue with django

2012-09-25 Thread puneet loya
Hi, I m having problems with sqlite insertion. When i enter datetime object using django into sqlite, sqlite is converting the datetime to UTC and storing it. Hence the datetime inserted in the sqlite db is incorrect. My timezone in UTC+05:30 and the datetime inserted is in UTC. Any suggesti

questions about generating static web page.

2012-09-25 Thread bruce
God. The original subject is too long. I made the Subject shorter. Thanks, Bruce On Tuesday, September 25, 2012 2:11:45 PM UTC-4, bruce wrote: > > Dear All, > > I am a novice. > Currently, > I am thinking to build a simple static personal web page generator for the > people in my group. S

[need advice and suggestion] questions about generating static web page.

2012-09-25 Thread bruce
Dear All, I am a novice. Currently, I am thinking to build a simple static personal web page generator for the people in my group. So, they can login my django powered site and input their info, such as name, title, photo, education background and etc. Then, the person's static web page will

Re: AttributeError on _strptime_time

2012-09-25 Thread Victor
MadeR did you ever get to the bottom of this error? I am using python2.6.5, django1.3.1, and tastypie0.9.7 with a mysql5.1 back end. Its a real doozy, I have never seen it when developing locally, but once a week or so I'll get an email from my production django server that has something like th

Re: content management in django

2012-09-25 Thread Paul Backhouse
On Tue, 2012-09-25 at 06:35 -0700, eclypcix wrote: > What I should have asked, is it okay to store all the site's html > content in a database? Is it usually done that way? > I'm not sure what you mean by "all the site's html". You wouldn't have _all_ the sites html in the database, django genera

Re: django<-->twitter bootstrap philosophy

2012-09-25 Thread azizmb.in
I think you have confused things a little. Bootstrap is a CSS framework, and makes it easy to *style* your pages, and includes a few javascript libraries. Django on the other hand, is an MVC as you mentioned. Bootstrap operates completely in the browser and handles only styling, and not templating.

Re: What's the best way to save generated images?

2012-09-25 Thread JC Briar
Okay, this may not be the most efficient implementation, but it works: # create temporary file tmpfile = tempfile.TemporaryFile() *write to tmpfile* # wrap temporary file with django.core.files.File fileContents = django.core.files.File(tmpfile) fileContents.size = tmpfile.tell() # a

Re: why Eclipse showed "Undefined Variable"

2012-09-25 Thread Maysxuan
Thank all of you , and the answers are all correct . I choosed "I believe this is what you actually want to do: 'zxfca.views.hello' instead of zxfca.views.hello" . On Tuesday, September 25, 2012 11:10:42 PM UTC+8, Maysxuan wrote: > *I am new to Python & Django ,and I created a test project for

django<-->twitter bootstrap philosophy

2012-09-25 Thread Vincent Fulco
Been thru the Django manual, bootstrap website instructions and other resources a few times so have working understanding of MVC structure. However, the incorporation of bootstrap throwing me off a little. Working on a ecommerce idea, for now plan is to create homepage (using bootstrap) as a

Re: why Eclipse showed "Undefined Variable"

2012-09-25 Thread Luiz A. Menezes Filho
Because there's no variable called zxfca. I believe this is what you actually want to do: 'zxfca.views.hello' instead of zxfca.views.hello Att, On Tue, Sep 25, 2012 at 12:10 PM, Maysxuan wrote: > *I am new to Python & Django ,and I created a test project for Django in > Eclipse ,then got a "Und

Re: why Eclipse showed "Undefined Variable"

2012-09-25 Thread Paul Backhouse
On Tue, 2012-09-25 at 08:10 -0700, Maysxuan wrote: > I am new to Python & Django ,and I created a test project for Django > in Eclipse ,then got a "Undefined Variable". > > And who would tell me what happened? > > (Attachment is the screenshot) > You've imported "hello" from "zxcfa.views". S

Re: save() got an unexpected keyword argument 'force_insert'

2012-09-25 Thread Dan Gentry
To address the original question, I saw a similar error when overriding the save() function of a model. The solution was to include *args and **kwargs in the function definition: def save(self,*args, **kwargs): # your custom code here # super(MyModel, self).save(*args, **kwa

Re: Using email instead of username for registration and login

2012-09-25 Thread Tom Christie
This should cover it: https://github.com/dabapps/django-email-as-username For compatibility with django-registration you'll also want to take a look at the thread on this ticket: https://github.com/dabapps/django-email-as-username/issues/17 Cheers, Tom On Tuesday, 25 September 2012 02:

Re: Django project and SVN loads older code versions

2012-09-25 Thread Joris
The reason why you are seeing this behaviour is because apache caches the compiled python scripts. As apache has multiple threads, some still carry old information, and some new. As HTTP is stateless, this is why you get inconsistent behaviour. The situation is resolved by either reloading apac

Re: Can I simply disable the CSRF? crazy

2012-09-25 Thread puneet loya
Thank you all for your suggestions :) :) On Mon, Sep 24, 2012 at 7:56 PM, Nicolas Patry wrote: > If you are access to the form (meaning you are in the dom), and if you > don't mind using jQuery, there is the even simpler: > > >> $.post("/some/url", $("#someform").serialize(), function(data){ >>

Re: content management in django

2012-09-25 Thread eclypcix
@jonas, @Paul Backhouse thank you for your answers! I thought about using CMS but considering this is my first project I would like to do most of the work from scratch, that way I will have more control over the result and will learn more in the process. TinyMCE looks like something I had in m

Re: Django project and SVN loads older code versions

2012-09-25 Thread Leonardo Giordani
Let me understand: you commit code to a SVN repository and put in in production? Did you restart Apache? Leo 2012/9/25 Gjorge Karakabakov > I can't explain it but Django + SVN for code version control loads older > buggy versions of files every time i hit refresh on the web site i'm > working o

Inheritance and default value

2012-09-25 Thread winniehell
Hello list! I try to overwrite a default value of a field in a subclass of an abstract model. This is how I do it currently: https://gist.github.com/3781124 Is there any better way? As far as I know the _meta-class API is subject to change. Just to be clear about that: I can not move myfield out

django epydoc style documentation ?

2012-09-25 Thread django_noob
Hi everyone, Is django documentation available in some other foramt, like epydoc or javadoc foramt anywhere? Django documentation is quite detailed, but I would prefer to have it different format, more api-like ? Just to be sure, in this kind of format: http://epydoc.sourceforge.net/api/ Help

Re: GeoDjango and shapefiles

2012-09-25 Thread Coulson Thabo Kgathi
but what u sayin is possible seems to be exactly what i want to do -- 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/-/43S6ZQ_viHkJ. To post to this group, send

Django project and SVN loads older code versions

2012-09-25 Thread Gjorge Karakabakov
I can't explain it but Django + SVN for code version control loads older buggy versions of files every time i hit refresh on the web site i'm working on. So if I changed something in a file 2 days ago (made lots of commits since then) it will show up now. Next time I hit refresh another change

Django - Lotus Notes

2012-09-25 Thread Markus Christen
I have to create a web-service and i hope it works with Django. My plan is connecting to a Lotus Notes database. Can this work? If yes, how? Else no, how can i do this, witch programm do i need? I will programm it based on a Python language. I am a new programmer and used Python just for one we

Re: GeoDjango and shapefiles

2012-09-25 Thread Coulson Thabo Kgathi
I think the problem is how do i do this whr do i get infor on how to do it, thsi server -- 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/-/akOd33EuxG8J. T

Re: GeoDjango and shapefiles

2012-09-25 Thread Jani Tiainen
25.9.2012 11:53, Coulson Thabo Kgathi kirjoitti: can geoDjango produce maps offline though, because i am trying to have an app that shows locations of places using markers on the map. OFFLINE WITHOUT INTERNET -- You received this message because you are subscribed to the Google Groups "Django us

Re: GeoDjango and shapefiles

2012-09-25 Thread Coulson Thabo Kgathi
can geoDjango produce maps offline though, because i am trying to have an app that shows locations of places using markers on the map. OFFLINE WITHOUT INTERNET -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web

ANN: eGenix mxODBC 3.2.1 - Python ODBC Database Interface

2012-09-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.2.1 mxODBC is our commercially supported Python extension providing

Re: Django 1.4 and google app engine

2012-09-25 Thread Derek
Then you should not be using GAE. From http://en.wikipedia.org/wiki/Google_App_Engine#Differences_between_SQL_and_GQL "Unlike a relational database the Datastore API is not relational in the SQL sense." On Saturday, 22 September 2012 23:00:50 UTC+2, neixetis wrote: > > Thank you ver much for a

Re: Getting instance of current in django site admin

2012-09-25 Thread Derek
You have not supplied enough information to make this an answerable question. What is not happening that you expect should be happening? On Saturday, 22 September 2012 06:32:12 UTC+2, Krish wrote: > > I have following code in my admin.py > > class PackageForm(forms.ModelForm): > activity = form