Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 5:41pm, Mike Dewhirst wrote: invalid syntax (admin.py, line 1) Your original error indicated there is an admin.py but with an error on line 1 or a missing admin.py which you have confirmed. That is the problem. To get your models to appear in the admin app you need an

Re: How can I load a custom template filter which is in my project directory ?

2012-02-14 Thread Thomas Rega
Am 14.02.12 21:28, schrieb Nolhian: Hello everyone, In my template I put : {% load pygmentize %} But I got : TemplateSyntaxError at / 'pygmentize' is not a valid tag library: Template library pygmentize not found, tried

Re: Admin error

2012-02-14 Thread Stanwin Siow
it is to no avail think that's only for modifying the admin. Best Regards, Stanwin Siow On Feb 15, 2012, at 2:41 PM, Mike Dewhirst wrote: > On 15/02/2012 5:10pm, Stanwin Siow wrote: >> Yes i have gone through the tutorial. >> >> And i've gotten my website up and running. >> >> But when i

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 5:10pm, Stanwin Siow wrote: Yes i have gone through the tutorial. And i've gotten my website up and running. But when i want to enable admin it gives me that error. Try creating a file called admin.py in the same directory as models.py and put this in it ... - - - - - - -

Re: Admin error

2012-02-14 Thread Stanwin Siow
Yes i have gone through the tutorial. And i've gotten my website up and running. But when i want to enable admin it gives me that error. Here is my urls.py: from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 4:59pm, Stanwin Siow wrote: it's supposed to be django's admin page. Not quite. Can you give me an overview of what you have done with Django so far? For example, have you gone through the tutorial? I don't have an admin.py in my project folders Best Regards, Stanwin Siow

Re: Admin error

2012-02-14 Thread Stanwin Siow
it's supposed to be django's admin page. I don't have an admin.py in my project folders Best Regards, Stanwin Siow On Feb 15, 2012, at 1:46 PM, Mike Dewhirst wrote: > On 15/02/2012 4:39pm, Stanwin Siow wrote: >> Hi there, >> >> i'm getting this error when trying to get the default admin

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 4:39pm, Stanwin Siow wrote: Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Could you post the contents of the offending file (admin.py) here? Any ideas where to rectify this? Thanks in advance Best

Admin error

2012-02-14 Thread Stanwin Siow
Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Any ideas where to rectify this? Thanks in advance Best Regards, Stanwin Siow -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Need details re: deletion of a referenced model instance

2012-02-14 Thread Marc Aymerich
On Tue, Feb 14, 2012 at 8:02 PM, Jeff Blaine wrote: > Hi all, > > I'm having trouble detecting changes that happen to a M2M field behind the > scenes: as a result of one of the *referenced objects being deleted* > > I'm using Django 1.3.1 with PostgreSQL 8 > > Let's say we

Re: Packaging and transferring code

2012-02-14 Thread Joseph Student
Thanks, Chris. We'd be looking to redevelop the framework a bit before we installed. I believe the system has a Python Lib directory included. Essentially, we're looking to use a modification of the existing code to build another site. On Tue, Feb 14, 2012 at 5:37 PM, Chris Czub

Re: Packaging and transferring code

2012-02-14 Thread Chris Czub
That really depends on the app and how everything is configured. For example, where are you installing the required Python packages? Do you have a Python lib directory in the application or are you using one of your system's Python include paths? It should not be *too* difficult but depending on

Packaging and transferring code

2012-02-14 Thread Tom
How time-consuming/difficult is it to package, transfer and deploy the code of a fully developed site from one host to another? Can a non- Python/Django dev do this easily? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Need details re: deletion of a referenced model instance

2012-02-14 Thread akaariai
On Feb 14, 9:02 pm, Jeff Blaine wrote: > Hi all, > > I'm having trouble detecting changes that happen to a M2M field behind the > scenes: as a result of one of the *referenced objects being deleted* > > I'm using Django 1.3.1 with PostgreSQL 8 > > Let's say we have the

Re: Database image from models

2012-02-14 Thread akaariai
On Feb 14, 10:18 pm, galgal wrote: > Is there any free app to generate database image schema from all models > from all apps? I need image with tables and relations shown. > > Thanks for help. django-extensions has a command for that: graph_models.

Re: Database image from models

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 7:18am, galgal wrote: Is there any free app to generate database image schema from all models from all apps? I need image with tables and relations shown. This may help ... http://live.gnome.org/Dia/Python Thanks for help. -- You received this message because you are

How can I load a custom template filter which is in my project directory ?

2012-02-14 Thread Nolhian
Hello everyone, In my template I put : {% load pygmentize %} But I got : TemplateSyntaxError at / 'pygmentize' is not a valid tag library: Template library pygmentize not found, tried django.templatetags.pygmentize,django.contrib.admin.templatetags.pygmentize How can I load it ? I don't want

Database image from models

2012-02-14 Thread galgal
Is there any free app to generate database image schema from all models from all apps? I need image with tables and relations shown. Thanks for help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Django runserver 504 on static assets with IE only

2012-02-14 Thread JC
Hello, I have a linux django 2.7 dev server using runserver 0.0.0.0:8080 serving webpages to a windows host on the same LAN. On all the other browsers (FF, Chrome, Safari), the pages load fine. On IE8 however, my fiddler trace shows that random static assets (css, js, img) aren't loading most

Need details re: deletion of a referenced model instance

2012-02-14 Thread Jeff Blaine
Hi all, I'm having trouble detecting changes that happen to a M2M field behind the scenes: as a result of one of the *referenced objects being deleted* I'm using Django 1.3.1 with PostgreSQL 8 Let's say we have the following simple proof of concept models: class Topping(models.Model):

Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan, On Tuesday, February 14, 2012 10:38:39 AM UTC-8, Jonathan Hayward wrote: Do I need to create a separate application under pim and load " application>.UserProfile"? >From the docs... To indicate that this model is the user profile model for a given site, fill in the setting

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
If I import models, it crashes. The top-level project is pim; under that I have models.py, which contains UserProfile. Specifying pim.UserProfile and pim.models.UserProfile gets two different error messages. Do I need to create a separate application under pim and load ".UserProfile"? On Tue, Feb

Re: Registering a user profile

2012-02-14 Thread Kevin Anthony
Did you include the module in your settings.py? Kevin Please excuse brevity, sent from phone On Feb 14, 2012 1:27 PM, "Christos Jonathan Hayward" < christos.jonathan.hayw...@gmail.com> wrote: > Thank you, little master and creecode. I tried 'pim.UserProfile' and > 'pim.models.UserProfile' and

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
Thank you, little master and creecode. I tried 'pim.UserProfile' and 'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile', which it looks like the documentation calls for, I get: SiteProfileNotAvailable at / Unable to load the profile model, check AUTH_PROFILE_MODULE in

Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan, See the "Storing additional information about users" section in the docs. There it mentions the expected format of AUTH_PROFILE_MODULE. I suspect what you need to do is wrap your

Logging from multiple processes

2012-02-14 Thread JC
Hey guys, Does Django 1.3.1 handle logging from multiple processes or I have to have some special consideration? This document may be related: https://code.djangoproject.com/wiki/LoggingProposal but its two years old so I was wondering maybe Django now supports this? Thanks! JC -- You

IntegrityError while testing

2012-02-14 Thread xina towner
Hello, I get this error when I try to test my app. I'm using mysql. I think it's when django tries to delete the table. I've tried with all On delete options and the error keeps happening. IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails

Re: Model field that links to a page ID, or external URL

2012-02-14 Thread Diederik van der Boor
Op 13 feb. 2012, om 18:50 heeft Jonathan Paugh het volgende geschreven: > Each model supports a get_absolute_url(self) method, which allows you to > retrieve each object's url in whatever way you want, including pulling > values from self (i.e. the model object.). Returned urls are in serveral >

Re: Comments Not Displaying

2012-02-14 Thread Tom Evans
On Tue, Feb 14, 2012 at 2:45 PM, coded kid wrote: > Below the status. I'm not sure if I fixed this. How will I make it > display comment? Please. > This page has some hints: https://docs.djangoproject.com/en/1.3/ref/contrib/comments/#displaying-comments Cheers Tom --

Re: Django forms cache populating form

2012-02-14 Thread Tom Evans
On Tue, Feb 14, 2012 at 1:30 PM, Gabriel Carneiro Novaes wrote: > i'm populating the choices of a form in django, > > The problem is that when i see it in the browser, the year list is fine > according to the database, but when i change some date in database, the year >

Re: Comments Not Displaying

2012-02-14 Thread coded kid
Below the status. I'm not sure if I fixed this. How will I make it display comment? Please. On Feb 14, 12:32 pm, Daniel Roseman wrote: > On Tuesday, 14 February 2012 12:02:58 UTC, coded kid wrote: > > > Hi guys, I'm using Django.contrib.comments in my Django web app. After

Re: Creating a hospital erp (hospital management) in Django

2012-02-14 Thread Alec Taylor
Hi Saadat, I recommend reading a book on Django to get started. All the best, Alec Taylor On Wed, Feb 15, 2012 at 1:12 AM, Saadat wrote: > Thanks Sebastien, I already have the info about the various > departments of the hospital. I also created a sample database with >

Re: Creating a hospital erp (hospital management) in Django

2012-02-14 Thread Saadat
Thanks Sebastien, I already have the info about the various departments of the hospital. I also created a sample database with tables being Patient detail, Then I created the admin interface and I could login and see the app over there. I could also access and edit the details of the tables thru

Re: Creating a hospital erp (hospital management) in Django

2012-02-14 Thread sebastien piquemal
+1 to @Patricio Valarezo's comment : If you want to build a system for hospitals, you've got to know how an hospital works first. So, make interviews, draw mockups, more interviews, code a prototype, more interviews, and so on ... and only then you'll know what you need to do. On Feb 14, 4:07 

Django forms cache populating form

2012-02-14 Thread Gabriel Carneiro Novaes
i'm populating the choices of a form in django, The problem is that when i see it in the browser, the year list is fine according to the database, but when i change some date in database, the year select list doesn't update. http://paste.ideaslabs.com/show/NwAranETeA I try this code, but I

Re: Comment post not allowed (400)

2012-02-14 Thread akaariai
A likely reason for the error is that you are missing all the fields in the form. I haven't used the comments system, so I am not too sure about this. I would add some text (like HERE) as first thing to the "for field in form" loop and see if that gets ever printed. If not, you have taken first

Re: Database test error

2012-02-14 Thread akaariai
On Feb 13, 11:09 am, xina towner wrote: > Hello, I still get this error: > The problem es the order that django creates the tables in the database. > Can I change this? Are you sure the problem is not that importing the tests will generate a query? The offending place

Re: Comments Not Displaying

2012-02-14 Thread Daniel Roseman
On Tuesday, 14 February 2012 12:02:58 UTC, coded kid wrote: > > Hi guys, I'm using Django.contrib.comments in my Django web app. After > installing django comments and setting up all other things, I decided > to give it a try by commenting on my status. > > I commented and I was redirected to

Comments Not Displaying

2012-02-14 Thread coded kid
Hi guys, I'm using Django.contrib.comments in my Django web app. After installing django comments and setting up all other things, I decided to give it a try by commenting on my status. I commented and I was redirected to /comment/posted/. But the problem I'm facing is that, Django comments is

Re: Middleware class to properly format arbitrary data

2012-02-14 Thread Tom Evans
On Tue, Feb 14, 2012 at 11:14 AM, Kevin wrote: > Hello everyone, > >  Before I go ahead and build a simple middleware for this myself, I > would like to know if such a middleware already exists in the wild, so > that I can prevent re-inventing the wheel.  Here's an example,

Middleware class to properly format arbitrary data

2012-02-14 Thread Kevin
Hello everyone, Before I go ahead and build a simple middleware for this myself, I would like to know if such a middleware already exists in the wild, so that I can prevent re-inventing the wheel. Here's an example, if nobody is following what the subject actually means: Say I have a view