Re: Django + Windows Server 2003 + IIS6 + MSSQL 2005

2012-04-17 Thread Leandro Ostera Villalva
ibe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Regards, Leandro Ostera Villalva, *Read my technical blog <http://leostera.github.com/> Check my latest project

Re: Confused with django model Limit and Offset Implementation

2012-01-27 Thread Leandro Ostera Villalva
AFAIK it is [offset:page] El 22 de enero de 2012 20:40, Swaroop Shankar V escribió: > Hi, > Am trying to create a custom pagination for my project, but am seriously > struck with the django implementation of Limit and offset. I went through > the documents, instead of making me understand how it

Re: Setting Network settings from Python/Django

2012-01-27 Thread Leandro Ostera Villalva
I take it that, at the end of the day, Django is Python code, thus you can execute whatever Python code you want in certain places (like views). Hope that pointed somewhere! El 22 de enero de 2012 01:20, Ganesh Kumar escribió: > Hi guys > > I'm working on a simple web interface for an embedded

Re: How can I go about this?

2012-01-27 Thread Leandro Ostera Villalva
You can still use some of what Donald said to give you an idea of where to start. Have you went thru the tutorials? Do you know the basics? That would give us a better chance to help you! =) El 22 de enero de 2012 00:44, coded kid escribió: > Thanks for the reply. I don't really mean twitter cl

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
AFAIK when you try to access it ( quests[579] ) it gets loaded so performing .delete is possible. My guess is that you are none-ifying the id somehow either by operating with it or by improper redefinition of the id field in your model. El 21 de enero de 2012 18:49, JohnA escribió: > Is your co

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
Doesn't the Create method or the YourModel() constructor initialize the pk ? El 21 de enero de 2012 12:43, JohnA escribió: > How are you finding these objects? That might point to the answer. > > Probably the likeliest explanation is that you are creating the > objects but not saving them. > >

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
No that I know. Can you show us some more code like how you defined the model and how do you come to this id=None issue? El 21 de enero de 2012 09:31, Chris Seberino escribió: > > On Jan 21, 6:44 am, Tom Evans wrote: > > Models are representations of rows in a database. > > Deleting a model ins

Re: what is the best IDE to use for Python / Django

2012-01-27 Thread Leandro Ostera Villalva
I actually use a text editor (Sublime Text 2, simply stunning) and a lot of shell. For projects I have my own git server and hudson-ci which I use locally and can sync with the one we use at work easily, and with little effort those can be integrated into the editor, too, which is wonderfully made

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-27 Thread Leandro Ostera Villalva
Here's a nicer way to do it. CHOICES = list ( (obj.code,obj.name) for obj in Scac.objects.all() ) Or you can always make a static method for it and call Scac.objects_as_list() El 21 de enero de 2012 05:01, Bill Beal escribió: > It looks like the Pythonic way is to create the list in > models.p

Re: Handling copy on a small project

2012-01-27 Thread Leandro Ostera Villalva
I'd vote for putting it in the db too. Flatpages are good to go. El viernes 20 de enero de 2012, Daniel Roseman escribió: > On Friday, 20 January 2012 04:39:44 UTC, Jeremy Boyd wrote: >> >> Hi all, >> >> For my side project, we have the need to rapidly iterate on the app's >> copy. As I see it, w

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
When you have an instance of an object and it has no id (that means, id is set to None) then it actually does not represent any object in your database, ergo, you can't delete it because it's not there. Can you show us the portion of code where you are trying to delete it? El 20 de enero de 2012

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-27 Thread Leandro Ostera Villalva
I'm new to this list but a nice way to share code snippets is thru services like gist. Here's how the first source code would have looked: https://gist.github.com/1651488 Ontopic: I believe that a method called 'as_list' would be more descriptive. Perhaps the manager included in models.Model has

Re: Model-driven Django development

2012-01-27 Thread Leandro Ostera Villalva
Here with django you define models in Python code and the framework autogenerates layers for you to interact with the db. With utilities such as syncb from manage.py or sqlall you can let the framework create a db or just show you the sql behind those models you defined. It's really handy. El 20

Hello there, and sort of a question

2012-01-27 Thread Leandro Ostera Villalva
Hello guys, I'm new to Django and looking for the best way to setup a site as soon as possible. I already went over the basics and did a pair of websites, a blog using some django.contrib stuff incluiding an xml-rpc interface for the metaweblog api and some other apps that I needed (like a random d