Re: Looping through a specific number of times with a for loop

2008-06-19 Thread Catalyst
On Jun 19, 11:54 am, Tim Chase <[EMAIL PROTECTED]> wrote: > >   For example at the template level... > > >     {% for news in latest_news_list last 10 %} > > >   I'm hoping this would grab the latest 10 objects in the > > latest_news_list. Does anyone know the best way to do this, or have > >

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-19 Thread Juan Hernandez
me 2 :D On Fri, Jun 20, 2008 at 10:42 PM, k0001 <[EMAIL PROTECTED]> wrote: > > Can I jump into the "THANKS" bandwagon? > > Thanks. =) > > On Thu, Jun 19, 2008 at 11:41 PM, Gene Campbell <[EMAIL PROTECTED]> > wrote: > > > > Just wanted to "THANKS" for an absolutely awesome web dev

Automatic Update of template

2008-06-19 Thread [EMAIL PROTECTED]
Hi, I am writing a web based chat client in Django framework. When ever I receive a message, I get that in a python function which is in the same file as my views. Can I directly pass this data to the template (by using response_to_render ) to update the template? Could someone suggest a way to

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-19 Thread k0001
Can I jump into the "THANKS" bandwagon? Thanks. =) On Thu, Jun 19, 2008 at 11:41 PM, Gene Campbell <[EMAIL PROTECTED]> wrote: > > Just wanted to "THANKS" for an absolutely awesome web dev > framework. > > > > --~--~-~--~~~---~--~~ You received

Re: Models advice

2008-06-19 Thread [EMAIL PROTECTED]
I haven't looked through it fully, however you don't need to create the primary keys, they are automatically created. On Jun 19, 8:38 pm, joshuajonah <[EMAIL PROTECTED]> wrote: > I am making a database of advertisers, product categories, products > (advertiser+product category), retailers, and

Thanks!!!!!!!!!!!!!!!!!

2008-06-19 Thread Gene Campbell
Just wanted to "THANKS" for an absolutely awesome web dev framework. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 9:11 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > This is just one of those areas that we haven't got around to > documenting yet. It doesn't mean we don't want to document this > feature - it just means other things have taken priority. We're always > open to

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 8:01 PM, Marty Alchin <[EMAIL PROTECTED]> wrote: > In fact, I'm confident enough that they're not going anywhere that I'm > in the process of documenting them on dead trees. I already beat you to it, at least partially (got some uses of get_model() in my book). --

Re: get_models

2008-06-19 Thread Russell Keith-Magee
On Fri, Jun 20, 2008 at 9:59 AM, Beetle B. <[EMAIL PROTECTED]> wrote: > > Thanks for all the replies. > > Wonder why they didn't add it to the documentation...seems like a > useful function. I'm one of "Them", and the answer is simple - we've been busy, and documentation doesn't write itself.

Re: get_models

2008-06-19 Thread Beetle B.
Thanks for all the replies. Wonder why they didn't add it to the documentation...seems like a useful function. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Models advice

2008-06-19 Thread joshuajonah
I am making a database of advertisers, product categories, products (advertiser+product category), retailers, and retailers stock (retailer + products) Here is my diagram of the topology: http://www.joshuajonah.com/database.png Here's my models.py: http://dpaste.com/57676/ Do you see any

Re: get_models

2008-06-19 Thread Marty Alchin
On Thu, Jun 19, 2008 at 8:29 PM, James Bennett <[EMAIL PROTECTED]> wrote: > If these functions were to change, Django itself would need to undergo > not-insignificant refactoring. And since such a refactoring is not on > the table, they're not going to change. *SPOILER ALERT* In fact, I'm

URL templatetag with URL naming not working

2008-06-19 Thread kimus
Hi, URL templatetag with URL naming not working for me. application urls.py urlpatterns = patterns('', (r'^feeds/', include('blocks.apps.aggregator.urls')), ) aggregator urls.py urlpatterns = patterns('', url(r'^(?P\d+)/$', 'blocks.apps.aggregator.views.feed_list', name="feed-detail"), )

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 7:02 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Short version: See also long version: http://www.b-list.org/weblog/2007/nov/03/working-models/ If these functions were to change, Django itself would need to undergo not-insignificant refactoring. And since such a

Re: Initializing a form.

2008-06-19 Thread Nathaniel Whiteinge
On Jun 19, 4:36 pm, Adi <[EMAIL PROTECTED]> wrote: > In order to set up the initial values on a couple of fields of my > form, I need to pass in a couple of model objects to my ModelForm's > init method. Try this:: class YourForm(forms.ModelForm): class Meta: ...

Re: get_models

2008-06-19 Thread Russell Keith-Magee
On Fri, Jun 20, 2008 at 7:06 AM, Beetle B. <[EMAIL PROTECTED]> wrote: > > Hi, > > I needed a way to get a list of all models in a Django project. > > I was told in IRC that I can use get_models from django.db.models. > > I'm not sure this is documented in the docs. Is it "safe" to use (as > in

Re: Why PostgreSQL?

2008-06-19 Thread Russell Keith-Magee
On Fri, Jun 20, 2008 at 4:11 AM, AmanKow <[EMAIL PROTECTED]> wrote: > >> Already logged:http://code.djangoproject.com/ticket/3615 > > I took a look at that ticket, and there was a comment at the end > pointing to a mysql function that checks for constraint violations... > >

Re: Some Django unit tests fail...

2008-06-19 Thread Russell Keith-Magee
On Fri, Jun 20, 2008 at 1:07 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > On 6/19/08, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Yes, it is the intention. If Django requires test database with > charset UTF8, IMHO it should create it using related clause. as well > as proper engine

Displaying a select field only when more than one choice is available

2008-06-19 Thread Fabien
Hello, I'm trying to extend the Select widget to only display the field if more than one choice is available. How can I check the available choices in the __init__() when I'm extending the SelectWidget : class OptionalSelect(forms.Select): def __init__(self, attrs=None, choices=()):

get_models

2008-06-19 Thread Beetle B.
Hi, I needed a way to get a list of all models in a Django project. I was told in IRC that I can use get_models from django.db.models. I'm not sure this is documented in the docs. Is it "safe" to use (as in this method and its behavior is not expected to change in the future)? Thanks.

Re: Confused by ImportError: cannot import name models

2008-06-19 Thread Karen Tracey
On Thu, Jun 19, 2008 at 5:37 PM, Tim <[EMAIL PROTECTED]> wrote: > > Hi all - > > This is my first post to the group; I am a new Django user and am very > enthusiastic about working with the framework. However, I am having > trouble with one thing in particular. I am trying to set up Review >

Re: error on manipulator fields

2008-06-19 Thread Karen Tracey
On Thu, Jun 19, 2008 at 6:21 PM, TiNo <[EMAIL PROTECTED]> wrote: > Hi, > > (Django version 0.97-pre-SVN-7633) > > I am trying to use a custom modelfield. When I try to ad an entry in > the admin, i get: > > --- > TypeError at

Initializing a form.

2008-06-19 Thread Adi
In order to set up the initial values on a couple of fields of my form, I need to pass in a couple of model objects to my ModelForm's init method. What is the right way to write the __init__ method so that it works both when I initialize it with form data and without form data. How do i call the

error on manipulator fields

2008-06-19 Thread TiNo
Hi, (Django version 0.97-pre-SVN-7633) I am trying to use a custom modelfield. When I try to ad an entry in the admin, i get: --- TypeError at /admin/klanten/klant/add/ __init__() got an unexpected keyword argument 'is_required'

Confused by ImportError: cannot import name models

2008-06-19 Thread Tim
Hi all - This is my first post to the group; I am a new Django user and am very enthusiastic about working with the framework. However, I am having trouble with one thing in particular. I am trying to set up Review Board, a Django project supporting code reviews, and am having problems with the

Re: Remove empty value ('---------') from HTML SELECT choices

2008-06-19 Thread Nathaniel Whiteinge
On Jun 19, 3:45 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote: >                 if self.instance.state == 'processing': >                     queryset = queryset.exclude(state='new') The above lines aren't quite right ``self.instance`` is an instance of your ``SomeModel`` and presuming

Re: Remove empty value ('---------') from HTML SELECT choices

2008-06-19 Thread Nathaniel Whiteinge
On Jun 19, 3:23 pm, Huuuze <[EMAIL PROTECTED]> wrote: > In this example, what if you wanted to selectively remove a value from > the choice list. For that you'll have to move the field declaration into the form's __init__ method:: class SomeForm(forms.ModelForm): class Meta:

Re: Connection.has no attribute ping -- after recompiling modpython

2008-06-19 Thread l5x
On Jun 19, 8:22 pm, l5x <[EMAIL PROTECTED]> wrote: > Hello, > > Request Method:         GET > Request URL:    https://age86.internetdsl.tpnet.pl/ > Exception Type:         AttributeError > Exception Value:        'Connection' object has no attribute 'ping' > Exception Location:    

Re: eclipse + pydev + auto complete

2008-06-19 Thread Huuuze
You're off by one. The value added to the PYTHONPATH (note, not system path) should be: /Library/Python/2.5/site-packages/ That will trigger the auto-complete for django classes. One warning: auto-completion for Model.objects is broken. PyDev will flag that as an error -- the author of PyDev

Re: Remove empty value ('---------') from HTML SELECT choices

2008-06-19 Thread Huuuze
In this example, what if you wanted to selectively remove a value from the choice list. For example, let's say the list contained New, In Process, and Closed. When an item is "In Process", it cannot revert back to "New". As such, "New" should not be displayed amongst the choices if "In

hashed primary keys

2008-06-19 Thread phillc
Is there anyway to make the primary key of a model a hash of some sort? some of these primary keys will be public facing, and i'd rather them not be counting up sequentially. in my current implementation, i have left the primary key alone and have made a unique field that creates a hash and

ModelForm Question

2008-06-19 Thread Adi
Lets say I have a model: class Foo(models.Model): name = models.charField() age = models.IntegerField () Then I create a form like this: class FooForm (ModelForm): salutation = forms.ChoiceField(choices=common.SALUTATION_CHOICES, label="Salutation") class

Re: Why PostgreSQL?

2008-06-19 Thread AmanKow
> Already logged:http://code.djangoproject.com/ticket/3615 I took a look at that ticket, and there was a comment at the end pointing to a mysql function that checks for constraint violations... http://forge.mysql.com/tools/tool.php?id=11 Way too mysql guruish for me, but it looks

Re: Nested Dictionaries in Django Templates

2008-06-19 Thread phillc
you are implementing logic into the templates, which django templating attempts to prevent. On Jun 17, 12:27 pm, Keybo <[EMAIL PROTECTED]> wrote: > Hello, >        I have a question regarding displaying information in django > templates. I would like to display a nested dictionary(Hash) in the >

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-19 Thread felix
I second that. I've just spent the day quite happily refactoring my app to use nifty model inheritance ... and the admin doesn't work. whoops. I think this should be stated in the docs for sure. On Jun 2, 4:44 pm, ekellner <[EMAIL PROTECTED]> wrote: > Is newforms-admin any closer to being

Re: Title: Once again, subclassing User, UserProfile, Multiple User types...

2008-06-19 Thread phillc
"You have to add a User, then add a Student, and then make sure that you get the right User attached to the student" or, "Well you don't see the Student's first name and last name, in the Student listing because those are really attributes of the User."" could have your save method automatically

Re: little problem with the django template language

2008-06-19 Thread phillc
yes they are strings, yes in python if you do if item1: pass it will evaluate the string as a true/false depending on existance. however, comparing two strings for equality... checks if they are equal. {% if item1 %} {% if item2 %} blah {% endif %} {% endif %} On Jun 19, 1:50 pm, mark

Re: Url tag issues

2008-06-19 Thread phillc
use of named urls will probably make that a ton easier On Jun 19, 11:45 am, "Emily Rodgers" <[EMAIL PROTECTED]> wrote: > Hi, > > I have been hitting a brick wall so many times now on this that it is > starting to hurt!! Please help if you can... > > I have an index page, and I want my function

Re: Implementing a new idea

2008-06-19 Thread phillc
models.Model.save(self) super(ProjectModification, self).save() On Jun 19, 1:41 pm, Adam Fraser <[EMAIL PROTECTED]> wrote: > Signalling worked out for me but it turned out to be more complex than > it needed to be.  Here are some references in case anyone is looking: > >

new forms admin is there an equiv to unique_for_date

2008-06-19 Thread Norman Harman
This is what I'm talking about http://www.djangoproject.com/documentation/model-api/#unique-for-date Searching internets can not find any answer. Thanks, -- Norman J. Harman Jr. Senior Web Specialist, Austin American-Statesman

Re: Looping through a specific number of times with a for loop

2008-06-19 Thread Tim Chase
> For example at the template level... > > {% for news in latest_news_list last 10 %} > > I'm hoping this would grab the latest 10 objects in the > latest_news_list. Does anyone know the best way to do this, or have > some examples set up I could read over? Looks like you want the

Re: little problem with the django template language

2008-06-19 Thread roj
Hi, If you are trying to compare url string then use request.path which will give you URL and split by "/" is that work for you? Cheers! Roj Django Debugging Resource http://django.freelancernepal.com On Jun 19, 6:50 pm, mark <[EMAIL PROTECTED]> wrote: > Hi, > > I am stuck, please help. > >

Looping through a specific number of times with a for loop

2008-06-19 Thread Catalyst
I was trying to figure out the best way to loop through a specific number of objects in a for loop. For example at the template level... {% for news in latest_news_list last 10 %} I'm hoping this would grab the latest 10 objects in the latest_news_list. Does anyone know the best way

Connection.has no attribute ping -- after recompiling modpython

2008-06-19 Thread l5x
Hello, Request Method: GET Request URL:https://age86.internetdsl.tpnet.pl/ Exception Type: AttributeError Exception Value:'Connection' object has no attribute 'ping' Exception Location: /usr/django/django/db/backends/mysql/base.py in _valid_connection, line 162

little problem with the django template language

2008-06-19 Thread mark
Hi, I am stuck, please help. This is what I am trying to do: {% ifequal item1 item2 %} ...do what I want item1 = '/test/something/' item2 = '/test/somethingelse/' or item1 = '/test/' tem2 = '/test/simething' both should evaluate to true and execute the if block. I experimented with

Re: Implementing a new idea

2008-06-19 Thread Adam Fraser
Signalling worked out for me but it turned out to be more complex than it needed to be. Here are some references in case anyone is looking: http://www.chrisdpratt.com/2008/02/16/signals-in-django-stuff-thats-not-documented-well/ http://code.djangoproject.com/wiki/Signals In the end, I simply

Re: Display image in django admin

2008-06-19 Thread Brian Rosner
On Jun 19, 2008, at 11:34 AM, Leon Yeh | New Avenue.net wrote: > > def thumbnail(self): > return "" % (self.photo) After the function add thumbnail.allow_tags = True. Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received

Display image in django admin

2008-06-19 Thread Leon Yeh | New Avenue.net
Hi All, I have a small django admin site that I need to display image into the object list. The photo currently contained the path to image. When got to the page of django admin escape the html output. How can I make it so I can output raw html to the django admin ? class

Re: Some Django unit tests fail...

2008-06-19 Thread Peter Melvyn
On 6/19/08, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > The only obvious thing I can glean from your stack traces is a > possible language problem - the last stack trace is complaining of a > collation mix, which suggests that your MySQL install isn't using utf8 > all the time. Yes, it

Re: Timestamped comment field

2008-06-19 Thread Chris H.
On Jun 19, 12:53 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Hi Chris, > > May be you can try this model : > ... While I could store each comment off as an instance of a Comments model, I don't really have a need to do so. I'm wanting to have the comments stored as a TextField on the main

django having a foreign key from a field in one database to another

2008-06-19 Thread Jeff
so I am using the Multiple Database Branch of django and currently have a an app that uses several databases. one problem I have encountered is that i have a foreign key from a field in one database to a field in another. the error I get is Database1.Table1: 'Table1' is configured to use

django blog which uses staticgenerator?

2008-06-19 Thread lgr888999
There are a shitload of blogging apps for django, i know. But is there any which supports StaticGenerator that you are aware off? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Select field not generating with form_for_instance?

2008-06-19 Thread Huuuze
Got it worked out using ModelForms. Version 0.96.2 didn't include any of these slick features. For what its worth, I don't believe it would've ever worked using v0.96.2. On Jun 19, 11:01 am, Huuuze <[EMAIL PROTECTED]> wrote: > On Jun 18, 7:32 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > >

Url tag issues

2008-06-19 Thread Emily Rodgers
Hi, I have been hitting a brick wall so many times now on this that it is starting to hurt!! Please help if you can... I have an index page, and I want my function for it (in views.py) to take a number of parameters to decide what to display, but I can't figure out how to do it. The kinds of

eclipse + pydev + auto complete

2008-06-19 Thread tom
hi, I wasn't able to find some information on this list about auto completion with eclipse. I managed to get auto completion for my projects, but not for django stuff. What I want to have for example is, when I enter models. that i get a list of available models, or forms. That's it. I have

Own threaded management command causes UnboundLocalError at different runs/places

2008-06-19 Thread sector119
Hi ALL! Can I use threaded management commands? I write simple data import command from manage.py. This command use threadpool and I sometimes get UnboundLocalError on some variables (they differ) that they referenced before assignment.. Why It can be so? Thanks!

Re: Select field not generating with form_for_instance?

2008-06-19 Thread Huuuze
One additional note: Can you post the code you used to get it working? On Jun 18, 7:32 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 18, 2008 at 4:53 PM, Huuuze <[EMAIL PROTECTED]> wrote: > > > I have the following model: > > > class Publishers(models.Model): > >  books =

Re: Select field not generating with form_for_instance?

2008-06-19 Thread Huuuze
On Jun 18, 7:32 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 18, 2008 at 4:53 PM, Huuuze <[EMAIL PROTECTED]> wrote: > > > I have the following model: > > > class Publishers(models.Model): > >  books = models.CharField(maxlength=1, choices=BOOKS) > > > BOOKS is a tuple: > > BOOKS

Re: ManyToMany Field - is an object in their or not.

2008-06-19 Thread phillc
either way, the database is hit to check that. so if your goal is to minimize, getting true and false instead of the record has no advantage. just check if there is something returned. On Jun 19, 10:14 am, timc3 <[EMAIL PROTECTED]> wrote: > I have a situation where I want a true or false to

Re: Quick way to find list objects close to the current date?

2008-06-19 Thread Norman Harman
mw wrote: > Hello, > > > I was thinking about ways to list some objects that are close to the > current date. I could do this using datetime and just subtract the > two dates, but this seems like something that has probably been done > before. It seems like there would be a more Django way of

Re: Is it bad to use GET parameters for model entities management in my views?

2008-06-19 Thread Doug Van Horn
I would say first that there's more than one way to skin this cat. So if what you're doing works for your team and your users, stick with it. Regarding RESTful URLs, my understanding is that the URL is the noun and the request method is the verb. E.g., http://example.com/somepage/ is your

Re: bug in Django Evolution (was "Why PostgreSQL?")

2008-06-19 Thread bruno desthuilliers
On 19 juin, 03:32, Tim Chase <[EMAIL PROTECTED]> wrote: > > Django Evolution is a slightly different beast - Django Evolution > > isn't part of the core Django project, and if you read the FAQ, I > > don't make the claim that MySQL is equally supported under Django > > Evolution - in fact, I

Re: django-notification management.py not creating notice types.

2008-06-19 Thread Rajesh Dhawan
On Jun 19, 10:08 am, timc3 <[EMAIL PROTECTED]> wrote: > > Renaming models to notification here is not a good idea (see below for > > the reason) > > > > def create_notice_types(app, created_models, verbosity, **kwargs): > > > > > > > dispatcher.connect(create_notice_types, > > >

Re: Some Django unit tests fail...

2008-06-19 Thread Russell Keith-Magee
On Thu, Jun 19, 2008 at 10:08 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > > I've found this same problem last week both on a Linux system and on a > Windows one. > The common factor was they were systems where the 'stack' has had just > been installed > Python 2.4 and Python 2.5

ManyToMany Field - is an object in their or not.

2008-06-19 Thread timc3
I have a situation where I want a true or false to whether an object is in a manytomany. For instance, I have my users, and have created (separate to the standard django groups) a groups table called GroupsOfUser with a relationships defined as: group_members = models.ManyToManyField(User,

Re: From ASP to Django

2008-06-19 Thread PFL
I had to make a similar argument at my job. You are going to have to convince people who are rightly skeptical, wont appreciate the all the core technological arguments, and really only care about time and cost. So, make a business case, not a technical case. Focus on: 1) tangible business

Re: django-notification management.py not creating notice types.

2008-06-19 Thread timc3
> Renaming models to notification here is not a good idea (see below for > the reason) > > >     def create_notice_types(app, created_models, verbosity, **kwargs): > > > > >     dispatcher.connect(create_notice_types, > > signal=signals.post_syncdb, sender=notification) > > The sender here must

Re: Some Django unit tests fail...

2008-06-19 Thread Ramiro Morales
On Thu, Jun 19, 2008 at 10:27 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > Hi all, > > I wanted to make sure that all unit tests will pass after #3030 fix > and run Django unit tests on trunk updated to r7703 on Windows, Python > 2.4 and MySQL 5.0.37. > > But I found that some test failes: > >

Re: From ASP to Django

2008-06-19 Thread Tim Chase
> boss care about the technology, as long as it works. They will > not pay for an upgrade of the back-end to newer technology, > unless I can back up this decision with valid points. So why > should they switch to something like Django? I can come up > with technological points, such as

Re: Some Django unit tests fail...

2008-06-19 Thread Russell Keith-Magee
On Thu, Jun 19, 2008 at 9:27 PM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > Hi all, > > I wanted to make sure that all unit tests will pass after #3030 fix > and run Django unit tests on trunk updated to r7703 on Windows, Python > 2.4 and MySQL 5.0.37. I'm not seeing any failures at the moment;

Some Django unit tests fail...

2008-06-19 Thread Peter Melvyn
Hi all, I wanted to make sure that all unit tests will pass after #3030 fix and run Django unit tests on trunk updated to r7703 on Windows, Python 2.4 and MySQL 5.0.37. But I found that some test failes: 1. If I've run all tests, I get error: Traceback (most recent call last): File

Re: From ASP to Django

2008-06-19 Thread Dan
Microsoft ditched classic ASP. "It's unsupported" usually carries some weigth as an argument with bosses. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: From ASP to Django

2008-06-19 Thread Shane Emmons
ASP will cost more. Windows Servers are more expensive, not to mention the developer studio costs. What database backend are they using? If it is MS SQL then there is another large cost that could be removed by using Postgre or MySQL. Then just slip it to them that Google uses Python, not

From ASP to Django

2008-06-19 Thread gnijholt
Ok I need some thoughts on the following. For a client, we need to redesign their website. The back-end was coded a couple of years ago in classic ASP. It's fairly complex, with a webshop, uploading and parsing of excel files with new collections of clothing, and stuff like that. It took people

Re: Is it bad to use GET parameters for model entities management in my views?

2008-06-19 Thread Vasiliy Gladkov
On 19 июн, 17:42, Bradley Wright <[EMAIL PROTECTED]> wrote: > Hi, > > On Jun 19, 4:31 am, Vasiliy Gladkov <[EMAIL PROTECTED]> wrote: > > > As i want to allow site editor to edit pages in convenient way without > > built-in django admin, i use request.GET parameters like "http:// > >

Re: How can I convert .py file to .pyc file.

2008-06-19 Thread Sudhir Porwal
jitesh wrote: Sorry for my noviceness. Is it possible to handover an application to my client without giving the source code because I don't want to open the source code OR is there any way to convert .py file to .pyc or .exe file. Any help is appreciated. In python, the compiled

Re: How can I convert .py file to .pyc file.

2008-06-19 Thread Daniel Hepper
> Try py2exe www.py2exe.org Besides being Windows only, Py2Exe just bundles your byte code with an interpreter in a convenient package. The byte code can still be extracted and decompiled. It just raises the bar. FWIW, I think if you use an interpreted language, you just have to live with the

Re: How can I convert .py file to .pyc file.

2008-06-19 Thread Daniel Hepper
Python source code (.py) is automatically compiled to byte code (.pyc) when you import a module. More info here: http://effbot.org/zone/python-compile.htm However, it seems that pyc files can still be decompiled, google for "uncompile pyc" for more info. HTH, Daniel Am Donnerstag, den

Re: How can I convert .py file to .pyc file.

2008-06-19 Thread Alex Gusarov
Try py2exe www.py2exe.org --~--~-~--~~~---~--~~ 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 email to [EMAIL

How can I convert .py file to .pyc file.

2008-06-19 Thread jitesh
Sorry for my noviceness. Is it possible to handover an application to my client without giving the source code because I don't want to open the source code OR is there any way to convert .py file to .pyc or .exe file. Any help is appreciated. --~--~-~--~~~---~--~~

CSS retrieval

2008-06-19 Thread Aldo Bergamini
Dear list, I have a question that I could not solve by 'list archival peeking'. Although I got a couple of messages hinting at the same problem I have, I did not find one pointing to the solution. It's about Firefox and it's access to the basic css files for Django. If I a access my

Re: django-registration with my custom user profile

2008-06-19 Thread pihentagy
You didn't provide the 'dob' parameter. On Jun 13, 12:02 pm, Chr1s <[EMAIL PROTECTED]> wrote: > Hi thanks for your replay, > It is the second situation, I re-write the form.py like this > > class RegistrationForm(forms.Form): >   (other stuff  ) > def save(self,

Re: newbie: Filter an inclusion tag

2008-06-19 Thread pihentagy
Thanks! Saved my day :) On Jun 17, 2:32 am, Ned Batchelder <[EMAIL PROTECTED]> wrote: > I think this will work: > >     {% filter truncatewords:10 %} >     {% i18n_attr auction 'description' LANGUAGE_CODE %} >     {% endfilter %} > > --Ned.http://nedbatchelder.com > pihentagy wrote: > > Hi all!

Re: Trouble querying across relationships

2008-06-19 Thread Arien
On Wed, Jun 18, 2008 at 11:21 PM, Austin Govella <[EMAIL PROTECTED]> wrote: > I'm pulling all events for a city: > > events = Event.objects.filter(city=city) > > Each event can have a set of attractions like food, dancing, drama, > djs, live music, art, etc. > > How do I query the list of

Re: Is it bad to use GET parameters for model entities management in my views?

2008-06-19 Thread Bradley Wright
Hi, On Jun 19, 4:31 am, Vasiliy Gladkov <[EMAIL PROTECTED]> wrote: > As i want to allow site editor to edit pages in convenient way without > built-in django admin, i use request.GET parameters like "http:// > localhost:8000/somepage?action=edit" Like inline editing (Flickr-style), right? > A

Re: Django HTML Editor

2008-06-19 Thread Gene Campbell
I just wrote that I use jEdit and although it's not great, I don't care. But, now after reading this thread, I'm starting to care. I'm learning python and django at the same time, and having some handy "code intelligence" would be nice - linking method usages to defs and code completion. I

Re: Trouble querying across relationships

2008-06-19 Thread Daniel Roseman
On Jun 19, 5:21 am, Austin Govella <[EMAIL PROTECTED]> wrote: > I'm confused on what part of the docs I'm supposed to reference: > *http://www.djangoproject.com/documentation/db-api/ > > I'm pulling all events for a city: > > events = Event.objects.filter(city=city) > > Each event can have a set

Re: Why PostgreSQL?

2008-06-19 Thread Peter Melvyn
On 6/19/08, AmanKow <[EMAIL PROTECTED]> wrote: > Absolutely. I am not pointing fingers, but throwing my two cents into > the answer to "Why PostgresSQL?" I think, given the current state of > MySQL, the problems I outlined are very strong arguments for using > postgres instead of mysql