two questions about data model
Hello: I am trying to control the html display size of a CharField using length keyword. However, I got the following error when doing syncdb __init__() got an unexpected keyword argument 'length' I am using django svn release. I didn't find length keyword in django document, but learned it from the django usergroup. Another question is in my data model I have entered_by = models.ForeignKey(User) when doing syncdb I got the following where imagefile is a table name. Accessor for field 'entered_by' clashes with related field 'User.imagefile_set'. Add a related_name argument to the definition for 'entered_by'. Thanks, Harry --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: a question about flatpage
Jake: Thanks for the help. I did not have flatpages/default.html. By creating that file, the problem was solved. Hai jake wrote: > hai - > > this error message is coming from your server, not django (though it > probably originates with django). so you might check the server logs > (yours are probably in /var/log/httpd/error_log). > > the first django-related issue i would check though: do you have a > template file for your flatpages? it should live in > 'flatpages/default.html' in your templates folder. > > -jake > > Hai Dong wrote: > >> Hello: >> >> I got a strange problem with flat page. I created a test flatpage called >> "/test2/". I know the flatpage middleware is working, since if I enter >> /test/ as my url I will get page not found (404) error. However, if I >> enter /test2/ I got the Internal server error. I have attached both >> errors below. I'd appreciate if anyone can help identify the issue. >> Thanks, Hai >> >> >> Page not found (404) >> >> Request Method: GET >> Request URL: http://72.52.81.31/test/ >> >> Using the URLconf defined in |powerphoto.urls|, Django tried these URL >> patterns, in this order: >> >>1. ^powerphoto/ >>2. ^admin/ >> >> The current URL, |test/|, didn't match any of these. >> >> >> >> >> Internal Server Error >> >> The server encountered an internal error or misconfiguration and was >> unable to complete your request. >> >> Please contact the server administrator, [EMAIL PROTECTED] and inform them >> of the time the error occurred, and anything you might have done that >> may have caused the error. >> >> More information about this error may be available in the server error log. >> >> >> >> >> >> >> >> > > > --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
a question about flatpage
Hello: I got a strange problem with flat page. I created a test flatpage called "/test2/". I know the flatpage middleware is working, since if I enter /test/ as my url I will get page not found (404) error. However, if I enter /test2/ I got the Internal server error. I have attached both errors below. I'd appreciate if anyone can help identify the issue. Thanks, Hai Page not found (404) Request Method: GET Request URL:http://72.52.81.31/test/ Using the URLconf defined in |powerphoto.urls|, Django tried these URL patterns, in this order: 1. ^powerphoto/ 2. ^admin/ The current URL, |test/|, didn't match any of these. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
multi level category table with parent_id field
Hello, I was wondering how to use django to achieve the following application. Suppose my articles are organized in categories, subcategories, and subsubcategories. Database wise it will be good to have a category table with a parent_id referring to itself. I don't know how to achieve this by django database model, and also the __unicode__(self) function. I'd appreciate if anyone can give me some hints about this issue. Thanks, Hai --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
a question about site framework
Hello: I got a question. What if I have two sites, and each site has several categories (where articles belong to). For such kind of case what is the best way of utilizing the site framework. Thanks, Harry --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---