Re: Creating business logic & pragmatic learning site

2008-01-05 Thread hoamon
http://www.djangobook.com/ http://www.djangoproject.com/documentation/ On Jan 6, 2:30 pm, tjunning <[EMAIL PROTECTED]> wrote: > Hi, > Does anyone have a sample code that you can share with me sinceI want > to understanf where to put a business logic. For example if I'm > creating a online store,

Re: Fields not displaying in the admin interface

2008-01-05 Thread shabda
Damn, I am feeling so stupid now :( . Thanks, that was the problem! On Jan 6, 11:30 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 06-Jan-08, at 11:52 AM, shabda wrote: > > > I have an app, and that app is included in the installed_apps in > > settings.py. Whn I run manage.py runserver, ta

Re: Shared hosting with FastCGI, problems

2008-01-05 Thread Milan Andric
On Jan 5, 7:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Hello, > > I'm hoping to rework my website into Django, but am having trouble at my > shared hosting provider (HostMonster). > > They don't support mod_python, so Hostmonster said to add this to .htaccess > for FastCGI: > >AddHandler

Creating business logic & pragmatic learning site

2008-01-05 Thread tjunning
Hi, Does anyone have a sample code that you can share with me sinceI want to understanf where to put a business logic. For example if I'm creating a online store, how do I calculate the cart? Second, in a manytomany relationship how do I put filtering function, for example is like in CRM apps, a

Re: Fields not displaying in the admin interface

2008-01-05 Thread Kenneth Gonsalves
On 06-Jan-08, at 11:52 AM, shabda wrote: > I have an app, and that app is included in the installed_apps in > settings.py. Whn I run manage.py runserver, tables referred in the app > are created. However none of the entities in that table are displayed > in the admin interface, which shows table

Fields not displaying in the admin interface

2008-01-05 Thread shabda
I have an app, and that app is included in the installed_apps in settings.py. Whn I run manage.py runserver, tables referred in the app are created. However none of the entities in that table are displayed in the admin interface, which shows tables from contrib.sites and contrib.auth. What could I

Re: How to exclude field from geneated ModelForm, but not from admin interface

2008-01-05 Thread Malcolm Tredinnick
On Sat, 2008-01-05 at 22:43 +0300, Alexander Chemeris wrote: > Hi, > > Is there any way to exclude field from being generated by > ModelForm, but still be present on admin interface? If I pass > 'editable=False' to some element, it is not possible to > enable it in admin interface - I tried to l

Re: dynamically assigning a field value

2008-01-05 Thread Malcolm Tredinnick
On Sat, 2008-01-05 at 04:12 -0800, pinco wrote: > Hi, > > I'm trying to figure out how to solve the following issue without > succeed. > > I have a model like this: > > class Product(models.Model): >... >measure_cm = models.FloatField(...) >measure_in = models.FloatField(...) > .

Re: auto-escaping and auto generated RSS feeds

2008-01-05 Thread Malcolm Tredinnick
On Sat, 2008-01-05 at 03:30 -0800, [EMAIL PROTECTED] wrote: > Hi all, > > I used to let Django generate my rss feed automatically (i didnt > create any template for it). Since the autoescaping feature in the > development version, my feeds are also escaped. > Is there any way to disable it other

Re: Django on MediaTemple (dv) howto?

2008-01-05 Thread Graham Dumpleton
On Jan 6, 11:01 am, Josh Ourisman <[EMAIL PROTECTED]> wrote: > Perhaps also worth > mentioning, is that if I don't put 'SetEnv PYTHON_EGG_CACHE /home/ > django/.python-eggs' in my vhosts.conf I get errors saying that / > root/.python-eggs is unreadable, though I have no idea why it should > be try

Shared hosting with FastCGI, problems

2008-01-05 Thread Michael Hipp
Hello, I'm hoping to rework my website into Django, but am having trouble at my shared hosting provider (HostMonster). They don't support mod_python, so Hostmonster said to add this to .htaccess for FastCGI: AddHandler fcgid-script .fcgi I did that and my html sites still work, but when I

Re: Django on MediaTemple (dv) howto?

2008-01-05 Thread Josh Ourisman
Ok, Django is installed and my vhosts.conf is successfully sending requests to Django. But now when I try to go to my site I get this error: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/ap

Re: testing and request.META['REMOTE_ADDR']

2008-01-05 Thread Thomas
Malcolm, thanks for the answer. I should have better read src of client.py. default for query environment can be overridden like so: c = Client(REMOTE_ADDR ='127.0.0.1') - this solves my problem! > Work out which standards are relevant. If REMOTE_ADDR *must* be supplied > by all web servers, th

Re: per-site cache for subdomains

2008-01-05 Thread omat
Sorry, it was a stupid mistake, nothing to do with the above middleware and the cache system. My middleware above works fine for caching pages that differ by their subdomains. On Jan 5, 8:58 am, omat <[EMAIL PROTECTED]> wrote: > Hi, > > Django's per-site cache does not take sub domains into ac

Re: How to exclude field from geneated ModelForm, but not from admin interface

2008-01-05 Thread Muchanic
Don't set editable=False, instead, just set the fields class properties in the Admin inner class and the Meta inner class (on the ModelForm). Alexander Chemeris wrote: > Hi, > > Is there any way to exclude field from being generated by > ModelForm, but still be present on admin interface? If I pa

Re: Django is more?

2008-01-05 Thread Sean Perry
Jeff Anderson wrote: > Does anyone else use django for a framework? > > Jeff Anderson > Django is the back end for my home multimedia system (-: The web interface is nice, but during initial design I have simple scripts like the following which plays a random 3 songs from each artist in the

How to exclude field from geneated ModelForm, but not from admin interface

2008-01-05 Thread Alexander Chemeris
Hi, Is there any way to exclude field from being generated by ModelForm, but still be present on admin interface? If I pass 'editable=False' to some element, it is not possible to enable it in admin interface - I tried to list it in Admin.fields, but such combination lead to KeyError "Could not f

Re: Experimental port of Django to Java

2008-01-05 Thread [EMAIL PROTECTED]
Interestingly enough I played around with implementing the admin interface this morning. In an hour or so i got basic listing and updating done, I'll probably look into how you did the associations. thanks > since you are working with hibernate you might also be interested in > my project wher

Re: Presence of ForeignKey in list_display kills admin list view

2008-01-05 Thread Lee Hinde
On Jan 5, 8:12 am, "Antonio Ognio a.k.a gnrfan" <[EMAIL PROTECTED]> wrote: > On Jan 4, 8:11 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > > > I got some help on #django today that  helped with this. Thanks! > > Could you share a bit of that bit us? > > I hit the same issue yesterday. Just found my

permissions and inline editing

2008-01-05 Thread GuyBowden
Hi, I'm just on my first Django project (not counting the tutorial!) so forgive me if this is a dumb question Anyways I'm implementing a web publishing system - whereby registered users can login and post articles. However I don't want those articles to be "published" until they've been approve

Re: Question re: defining nature of relationship with ManyToManyFields

2008-01-05 Thread J. Clifford Dyer
See ticket #6095. There's been quite a bit of discussion about it, including a bit on django-dev. Cheers, Cliff On Sat, 2008-01-05 at 00:32 -0800, Topher wrote: > Okay, I found one workaround in the archives (http://groups.google.com/ > group/django-users/browse_thread/thread/11d4a135c929ab7d

Re: Experimental port of Django to Java

2008-01-05 Thread kahless
On Jan 4, 9:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > newforms, etc.). I choose to use Hibernate and Freemarker for the > Model and Template but these could be easily switched out. since you are working with hibernate you might also be interested in my project where i tried to port

Outputting a M2M within a signal

2008-01-05 Thread Tane Piper
Hey folks, I have a model that is used to create a config file on the system, it works ok except for one field. Within my Repo model I have a M2M relationship with InstalledExtentions like this: class Repo(models.Model): """A repo represents a physical repository on the hg system path"""

per-site cache for subdomains

2008-01-05 Thread omat
Hi, Django's per-site cache does not take sub domains into account. I derived my own middleware to handle subdomains by modifying the key_prefix: from django.middleware.cache import CacheMiddleware class SubdomainCacheMiddleware(CacheMiddleware): def process_request(self, request):

Re: Presence of ForeignKey in list_display kills admin list view

2008-01-05 Thread Antonio Ognio a.k.a gnrfan
On Jan 4, 8:11 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > I got some help on #django today that helped with this. Thanks! Could you share a bit of that bit us? I hit the same issue yesterday. Just found my way around by defining custom methods in the model class then adding them to the list_di

GeoDjango - error running GDAL tests

2008-01-05 Thread Hancock, David (dhancock)
I am getting the error message: "OGRException: Could not register all the OGR data source drivers!" (See the traceback below.) I also see this traceback trying to use the DataSource example (importing a zipcode shapefile). The test_geos.run() tests all pass. I can run ogrinfo from the command line

science project:

2008-01-05 Thread money
science project: DNA,RNA,MICROCELL,&RIBOSOMES collect all details open a www.myproo.blogspot.com enjoy and usefull. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

science project:

2008-01-05 Thread money
science project: DNA,RNA,MICROCELL,&RIBOSOMES collect all details open a www.myproo.blogspot.com enjoy and usefull. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: PyAMF nogo, try DjangoAMF

2008-01-05 Thread akaihola
DjangoAMF almost worked for us except for two problems: - with hundreds of object it started to corrupt data - it needs the S2Flex2 library on the ActionScript side Since the December alpha version we have switched to PyAMF which works nicely with the native mx:RemoteObject mechanism. --~--~-

Re: PyAMF 0.1.0 alpha

2008-01-05 Thread akaihola
I've been following the development of PyAMF because we need this kind of remote object support between Django and Flex in one of our projects. I just wanted to let everyone know that since this alpha release PyAMF really rocks. There's example code for the Django gateway and some decent document

django-websearch

2008-01-05 Thread shabda
Many of us would like to do a search for our website from within django. With django-websearch[1] you can do a search for your site, any general search on the web. I had talked about this a long time ago here[2], and had the code, but never got around to posting this online. The usage instruction

Re: dynamically assigning a field value

2008-01-05 Thread gordyt
Howdy pinco, Off the top of my head I don't see away to avoid the test, but you could bundle it into a method of the Product class: def get_preferred_measure(self, request): if request.session['user_preference'] == "cm": return self.measure_cm return self.measure_in --gordy --

dynamically assigning a field value

2008-01-05 Thread pinco
Hi, I'm trying to figure out how to solve the following issue without succeed. I have a model like this: class Product(models.Model): ... measure_cm = models.FloatField(...) measure_in = models.FloatField(...) ... The fields contain the same information (a relevant dimension of a pr

auto-escaping and auto generated RSS feeds

2008-01-05 Thread [EMAIL PROTECTED]
Hi all, I used to let Django generate my rss feed automatically (i didnt create any template for it). Since the autoescaping feature in the development version, my feeds are also escaped. Is there any way to disable it other than creates a template with the {{autoescape off}} ? Thanks, francoi

Re: WYSIWYG Editfor for the Admin Interface (Not TinyMCE or FCK)

2008-01-05 Thread FrostedDark
Anybody have any thoughts? --~--~-~--~~~---~--~~ 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

Re: Tutorial 2 admin Template not found

2008-01-05 Thread yak-man
I got the svn version, and "installed" from it into my Python2.5.1 - on Windows... After reading this, I looked at the site-packages/django/contrib/admin directory -- it was missing the media and templates directories... I gave up, and svn'd into my Python area too (and all seems well now). Is

Re: Question re: defining nature of relationship with ManyToManyFields

2008-01-05 Thread Topher
Okay, I found one workaround in the archives (http://groups.google.com/ group/django-users/browse_thread/thread/11d4a135c929ab7d). The workaround is to instantiate the mapping as a model class in and of itself, e.g.: class MappingAlbumSong(models.Model): song = models.ForeignKey(Song) albu