Re: request.user -> logout
On Thu, 2007-11-08 at 23:30 -0800, globophobe wrote: > This is probably a simple question, but once I've a logged-in user > with django.contrib.auth.authenticate what is the recommended way to > log out the user? Having a look in the documentation for the appropriate module is always a good place to start. In this case: http://www.djangoproject.com/documentation/authentication/#how-to-log-a-user-out Regards, Malcolm -- I've got a mind like a... a... what's that thing called? http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
request.user -> logout
This is probably a simple question, but once I've a logged-in user with django.contrib.auth.authenticate what is the recommended way to log out the user? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
strange custome sql
i have such in one app: try: connection = MySQLdb.connect(user="root",passwd="root",host="",db="django") except: print "Could not connect to MySQL server." exit( 0 ) cursor = connection.cursor() cursor.execute( "insert into popo_status( id , author_id , body , type ) VALUES (NULL , '1', body, '1') ") cursor.execute( "select * from popo_status where id=21 ") row = cursor.fetchone() print row[2] 2 excute: 1. cursor.execute( "insert into popo_status( id , author_id , body , type ) VALUES (NULL , '1', body, '1') ") no error, but insert nothing 2. cursor.execute( "select * from popo_status where id=21 ") no error, but ok i cannot image no error exist, but i cannot insert data into table. --~--~-~--~~~---~--~~ 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: booleanfield and required = true
On Fri, 2007-11-09 at 06:26 +, Milan Andric wrote: > > > On Nov 9, 12:02 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > Shouldn't the form give errors and not validate? > > > > Nope. It's a bit tricky, though. The problem is that HTML forms do not > > send *anything* for a checkbox that you don't check. So missing data for > > a checkbox field means it wasn't checked and is, therefore, False. > > > > Seems if I have (pseudocode) > > Form: >f = someField(required=True) > > When I pass no data into that form it should not validate? Just > doesn't seem right? In general, that will be true. However checkboxes are special: no data just means the value wasn't checked in the form, it doesn't mean that form field wasn't processed. It's an HTML oddity that Django has to accomodate. However, now that I'm thinking about this, there might be a bug here. Having required=True should mean you're required to check the box. There was a huge debate about this in a ticket, but the general acceptance amongst the maintainers and frequent contributors who commented was that that was the correct behaviour. I was responsible for checking in the change that makes no data = False for checkboxes (only), but I think I might have broken something in the process. I'll have to look a bit deeper into this at some point. Malcolm -- Why can't you be a non-conformist like everyone else? http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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: booleanfield and required = true
On Nov 9, 12:02 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Shouldn't the form give errors and not validate? > > Nope. It's a bit tricky, though. The problem is that HTML forms do not > send *anything* for a checkbox that you don't check. So missing data for > a checkbox field means it wasn't checked and is, therefore, False. > Seems if I have (pseudocode) Form: f = someField(required=True) When I pass no data into that form it should not validate? Just doesn't seem right? Just so no again if you don't feel like explaining. ;) I appreciate the answer nonetheless. -- Milan --~--~-~--~~~---~--~~ 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: booleanfield and required = true
On Fri, 2007-11-09 at 05:40 +, Milan Andric wrote: > I might be misunderstanding the documentation about BooleanField. > http://www.djangoproject.com/documentation/newforms/#booleanfield > > but it seems if i have : > > >>> class Foo(forms.Form): > bool = forms.BooleanField(required=True) > >>> f=Foo({}) > >>> f.is_valid() > True > >>>f.cleaned_data > {'b': False} > > Doesn't that conflict with what the docs say? > > Shouldn't the form give errors and not validate? Nope. It's a bit tricky, though. The problem is that HTML forms do not send *anything* for a checkbox that you don't check. So missing data for a checkbox field means it wasn't checked and is, therefore, False. We tried making it None for a while, but this was more confusing than not (you'd never get back False, for a start), so we switched to treating it as False. Malcolm -- I just got lost in thought. It was unfamiliar territory. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
booleanfield and required = true
I might be misunderstanding the documentation about BooleanField. http://www.djangoproject.com/documentation/newforms/#booleanfield but it seems if i have : >>> class Foo(forms.Form): bool = forms.BooleanField(required=True) >>> f=Foo({}) >>> f.is_valid() True >>>f.cleaned_data {'b': False} Doesn't that conflict with what the docs say? Shouldn't the form give errors and not validate? This is with lastest svn. Thanks! -- Milan --~--~-~--~~~---~--~~ 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: Dynamic ImageField
Hi Marcin It's working... Thankyou very much :) cschand On Nov 8, 6:46 pm, Marcin Mierzejewski <[EMAIL PROTECTED]> wrote: > Hi, > > Yes, you > can:http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic...http://code.djangoproject.com/wiki/CustomUploadAndFilters > > Regards, > Marcin > > On Nov 8, 2:08 pm, cschand <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > Can we make dynamic ImageFields? upload file to /media/avatar/ > > username or userid/- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: parsing Django RSS feeds for content reposting
> I have a regular RSS feed for a blog created using Django's contrib.feed. > Can some one suggest the best practice to have content from the RSS feed > made available on other web sites probably running PHP of ASP. RSS is a platform independent solution. It is an XML file, so use any programming language to parse the RSS feed to pull what you require. > We are looking at having not just the heading and link, but also some portion > or > whole of the body. The structure of the blog entry is like any classic > Django based blog. I guess you could use the low-level RSS framework [1] to declare and customize content you want to include in the feed. Check up RSS Specifications [2] for more clarity. [1] http://www.djangoproject.com/documentation/syndication_feeds/#the-low-level-framework [2] http://www.rssboard.org/rss-specification Cheers Thejaswi Puthraya --~--~-~--~~~---~--~~ 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: Unexpected logouts with latest from svn
On Thu, 2007-11-08 at 22:53 +, [EMAIL PROTECTED] wrote: > Yesterday I updated my Django svn checkout from r6300 to HEAD > (r6658). After doing this, I began to experience a problem that was > not present before the update. When a user accesses a view that saves > session variables, the view will return the correct output, but the > user will thereafter find himself logged out. Views that do not set > session variables are not impacted. Reverting Django to r6300, with > no change to my code, cures the problem. Well, r6300 was a *long* time ago, so that's a big gap to be guessing about what might have gone wrong. There have been some changes to the session backend since then, but I'm fairly sure we didn't just totally break it. We're now at r6652 on trunk. So if that doesn't work for you, pick a revision halfway betewen 6300 and 6652, update to that and see if the problem appears. If so, go back halfway, otherwise go forwards halfway. Keep bisecting your way through revisions until you find the commit that is the problem. It's a maximum of 9 checkouts you'll have to do (and probably a maximum of 8, since revision numbers include commits to gis, newforms-admin and queryset-refactor branches). That might at least help you find where to look for more debugging. Regards, Malcolm -- Monday is an awful way to spend 1/7th of your life. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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: Will there be a django 0.97 release ?
On Thu, 2007-11-08 at 21:17 +, kahless wrote: [...] > So are there any plans on releasing a 0.97 ? The next release will almost certainly be written as "1.0". Making releases isn't a trivial thing. Along with the stabilisation period prior to a release, there's the implicit "end-of-life" impact on older releases: 0.91 would no longer be in the security updates path. 0.96 users would no longer get the benefit of "new in development version" markers in the documentation (which is how a 0.96 user can tell that the next bit of documentation doesn't apply to them, but they can otherwise use the current documentation, with all the updates and fixes it includes). Everybody has to think about doing the upgrade dance. It's a lot of work to make a release and has wide impact, both good and bad. So we're focusing on making 1.0 the next "big impact" point. Yes, it's not always going to be convenient for people as the gap between the last release and trunk gets ever-wider. That's a problem on every project. If you want to release stuff that works for everybody in circumstances like that, you're unfortunately going to have to think about having two versions for a while. Developing software has these sorts of problems. We all realise that and there's no solution that suits everybody. Bear with us for a bit as we work towards 1.0. Trust me on this: the maintainers want to get it out the door as much as you do. Regards, Malcolm -- For every action there is an equal and opposite criticism. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
> On 08-Nov-07, at 10:42 PM, [EMAIL PROTECTED] wrote: > >> I'm also on webfaction, and like it. The most basic plan is pretty >> skimpy on server RAM (simply enabling debug on my site put it over >> the >> limit, and I was the only one accessing it) > > if you tweak apache a bit and make sure media goes through their > apache, you can safely enable debug even with the 40 mb plan. Oh, and > dont do much with the site on Mondays when they check the RAM > usage ;-) That was with their apache handling media! I think I had some ServerLimit issues as well, though. Thanks for the Monday tip :) --~--~-~--~~~---~--~~ 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: __str__(self) for ManyToManyField
On Thu, 2007-11-08 at 09:11 -0800, Xan wrote: > Hi, > > I have these models: > > class A(models.Model): > > [...] > def __str__(self): > return "(%s, %s)" % (self.estudi, self.curs) > > > class Admin: > pass > > and > > class B(models.Model): > > estudi_oferit = models.ManyToManyField('A', blank=True, null=True) > >class Admin: > list_display = ('tipus', 'codi', 'nom', 'adreca', 'localitat', > 'cp', > 'zona_concurs', 'ordre_concurs', 'estudi_oferit') > > and when I list B elements in admin mode, in puts me address memory of > objects instead of displaying field A as I define in __str__ You have not defined __str__ on B, so this isn't entirely unexpected (although I am not completely sure what you're seeing, but anything is not unexpected here). Note that the estudi_oferit field is many-to-many, so it has no "natural" way to be represented as a string. After all, it could be referring to 10,000 objects at the other end. There's no way to display that naturally. Explicitly define a __str__ method on B that displays the fields you want. Django's default __str__ is rarely the right thing to use. Regards, Malcolm -- The cost of feathers has risen; even down is up! http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
On 08-Nov-07, at 10:42 PM, [EMAIL PROTECTED] wrote: > I'm also on webfaction, and like it. The most basic plan is pretty > skimpy on server RAM (simply enabling debug on my site put it over the > limit, and I was the only one accessing it) if you tweak apache a bit and make sure media goes through their apache, you can safely enable debug even with the 40 mb plan. Oh, and dont do much with the site on Mondays when they check the RAM usage ;-) -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Unexpected logouts with latest from svn
Yesterday I updated my Django svn checkout from r6300 to HEAD (r6658). After doing this, I began to experience a problem that was not present before the update. When a user accesses a view that saves session variables, the view will return the correct output, but the user will thereafter find himself logged out. Views that do not set session variables are not impacted. Reverting Django to r6300, with no change to my code, cures the problem. --~--~-~--~~~---~--~~ 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: Will there be a django 0.97 release ?
> as far as i understand it, django applications are ment to be > pluggable.. how big are the odds that you'll find two applications > which would work with the same django trunk revision ? I didn't mean that your app would stop working at all on any other revisions. Just that you can "officially certify" that it's known to work with a certain revision (that you've had a chance to test). Your users can still use it with future revisions (see below for more thoughts on this.) > SCT is not (just) meant as a final product which runs separately, but > as applications which can be integrated into a django project.. i > can't force people to use a given revision .. having a release which > holds for 2-4 months would make things easier imho .. Not every new trunk commit creates a backward incompability problem. Furthermore, there are around 4 changes a month that are backward- incompatible (based on the list here: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges) and not all of them affect everyone who's using a trunk release. As an example, the change from FloatField to DecimalField in trunk revision 5302 would only prevent your app from working if your app has models that use that field. Perhaps, you want to consult with other app writers (django-tagging, django-voting, registration, etc.) and see how they handle this issue. --~--~-~--~~~---~--~~ 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: Best Django Blogs
A lot of the Blogs on the community aggregator are worth following. To me, the B-List deserves a special mention for its valuable tips and tricks -- it's invaluable to newbies, and often has insightful write ups for the seasoned users as well. Thanks, James! --~--~-~--~~~---~--~~ 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: Will there be a django 0.97 release ?
On Nov 8, 10:53 pm, RajeshD <[EMAIL PROTECTED]> wrote: > I understand the concern, but how does having a 0.97 release change > this for you? There would still be potentially backwards-incompatible > changes moving forward from 0.97 to the next official release. of course there will be backwards-incompatible changes afterwards .. but it would be much easier to keep up with those.. or support both.. i'm not sure when 0.96 was released, but probably >7 months ago .. if there would be an 0.97 release i could create a SCT release and probably stay compatible with django for a couple of months .. > If you just want to be able to announce which snapshot of the Django > trunk your application supports, you could point to the svn release > number (e.g. app supports Django trunk svn release #6650 and that > future releases are not guaranteed to work.) as far as i understand it, django applications are ment to be pluggable.. how big are the odds that you'll find two applications which would work with the same django trunk revision ? SCT is not (just) meant as a final product which runs separately, but as applications which can be integrated into a django project.. i can't force people to use a given revision .. having a release which holds for 2-4 months would make things easier imho .. cu, herbert --~--~-~--~~~---~--~~ 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: context_instance needs documenting on the same page as render_to_response?
> This page doesn't even show up on the first page of results so it > isn't surprising people miss it. Worth adding a mention to the docs? Worth opening a ticket too :) --~--~-~--~~~---~--~~ 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: Multiple arguments to a template filter
On Nov 8, 4:49 pm, jim <[EMAIL PROTECTED]> wrote: > I am writing some custom template filters. How does one transmit > multiple arguments to a filter. eg. > > {{ form.errors|dynamicformfield:"pass",1,"firstname" }} > > my dynamicformfield filter has the following signature: > > def dynamicformfield(value, firstpart, midpart, lastpart): > > I always get a error saying that the filter expects 3 args and I am > sending in only 1. Filters always take either one or two arguments but not more. See: http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters Here's how you can pass in multiple parameters. Change your filter function to take in just one real parameter that multiplexes three comma-separated parameters: def dynamicformfield(value, parts): firstpart, midpart, lastpart = parts.split(',') # you've got your three parameters now to run with The filter usage would be: {{ form.errors|dynamicformfield:"pass,1,firstname" }} In other words, you specify all 3 parts as a single string with comma- separated values that you can then demultiplex in your filter function. --~--~-~--~~~---~--~~ 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: Will there be a django 0.97 release ?
> > So are there any plans on releasing a 0.97 ? I hope you understand my > concerns - django is really great and the trunk is stable but I understand the concern, but how does having a 0.97 release change this for you? There would still be potentially backwards-incompatible changes moving forward from 0.97 to the next official release. If you just want to be able to announce which snapshot of the Django trunk your application supports, you could point to the svn release number (e.g. app supports Django trunk svn release #6650 and that future releases are not guaranteed to work.) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Multiple arguments to a template filter
I am writing some custom template filters. How does one transmit multiple arguments to a filter. eg. {{ form.errors|dynamicformfield:"pass",1,"firstname" }} my dynamicformfield filter has the following signature: def dynamicformfield(value, firstpart, midpart, lastpart): I always get a error saying that the filter expects 3 args and I am sending in only 1. --~--~-~--~~~---~--~~ 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: Problem with "auto_now_add" in Admin interface
On Nov 8, 2:17 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Here's a ticket that looks like it describes your problem: > > http://code.djangoproject.com/ticket/1030 > > It's still open but it looks like the last comment might provide a > workaround, depending on the version of Django you are running. Just a note: the code in that last comment in this ticket has a bug: default=datetime.now() should be replaced with default=datetime.now --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Will there be a django 0.97 release ?
Hi, Sorry if these questions are getting boring since everyone wants to know when the next release (and 1.0) is released .. but i haven't found a answer by searching the forums... After so many backward incompatible changes it would be really nice if there would be a new django release. I want people to use my project (SCT: Sphene Community Tools) but i'm not able to keep up two versions and backport all new features.. it is kind of understandable that not everyone wants to use the latest trunk just to use SCT... (There are currently many problems - i managed to keep up with the newforms clean_data vs. cleaned_data change, but with dozen of other changes and new features i really want/need to use i gave up to support the latest django release.. I'm not asking that there are fewer API changes in django or whatever, just that there is a reasonable django release i can make SCT compatible with.) So are there any plans on releasing a 0.97 ? I hope you understand my concerns - django is really great and the trunk is stable but 1.) there are many users who don't want to use the latest development version from the trunk (or are too lazy to install a svn client - most of the times it is faster to simply click a download url) 2.) i can't create releases for my own software.. it would be ridiculous to create a release which has a dependency on 'the latest development version' .. since this dependency can break every time someone commits something into the django trunk.. thanks & cu, herbert http://sct.sphene.net --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
Is anyone on the MediaTemple Django Container Beta Program? El jue, 08-11-2007 a las 17:59 +, hass escribi�: > I too am on webfaction, it's worth it, and dirt cheap. > > > > --~--~-~--~~~---~--~~ 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: Problem with "auto_now_add" in Admin interface
Here's a ticket that looks like it describes your problem: http://code.djangoproject.com/ticket/1030 It's still open but it looks like the last comment might provide a workaround, depending on the version of Django you are running. Karen On 11/8/07, kevinski <[EMAIL PROTECTED]> wrote: > > > I am building a simple wiki and I am having trouble with my models: > > from django.db import models > > class Wikipage(models.Model): > title = models.SlugField(primary_key=True) > creator = models.CharField(maxlength=25) > post_date = models.DateTimeField(auto_now_add=True) > class Admin: > pass > > class Pageversion(models.Model): > page = models.ForeignKey(Wikipage, edit_inline=models.TABULAR, > num_in_admin=1) > content = models.TextField(core=True) > editor = models.CharField(maxlength=25) > update_date = models.DateTimeField(auto_now_add=True) > > Everything is fine when I submit a Wikipage with 1 Pageversion in the > Admin Interface. > When I try to add a second Pageversion, I get the following error > message. > > "Column was set to data type implicit default; NULL supplied for NOT > NULL column 'update_date' at row 1" > > Any ideas why additional Pageversions do not post an auto_now_add > date? FYI my db is MySQL. > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with "auto_now_add" in Admin interface
I am building a simple wiki and I am having trouble with my models: from django.db import models class Wikipage(models.Model): title = models.SlugField(primary_key=True) creator = models.CharField(maxlength=25) post_date = models.DateTimeField(auto_now_add=True) class Admin: pass class Pageversion(models.Model): page = models.ForeignKey(Wikipage, edit_inline=models.TABULAR, num_in_admin=1) content = models.TextField(core=True) editor = models.CharField(maxlength=25) update_date = models.DateTimeField(auto_now_add=True) Everything is fine when I submit a Wikipage with 1 Pageversion in the Admin Interface. When I try to add a second Pageversion, I get the following error message. "Column was set to data type implicit default; NULL supplied for NOT NULL column 'update_date' at row 1" Any ideas why additional Pageversions do not post an auto_now_add date? FYI my db is MySQL. --~--~-~--~~~---~--~~ 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: parsing Django RSS feeds for content reposting
Thanks. But I am looking at a platform independent solution, if any. Javascript looked to be the only option as a client side script pulling data from Django based web app. RS On Nov 8, 2007 8:37 PM, David Reynolds <[EMAIL PROTECTED]> wrote: > > > On 8 Nov 2007, at 1:49 pm, Ramdas S wrote: > > > Hi, > > > > I do not know how much of this post is relevant from point of Django! > > Here is what I am looking at! > > > > I have a regular RSS feed for a blog created using Django's > > contrib.feed. Can some one suggest the best practice to have > > content from the RSS feed made available on other web sites > > probably running PHP of ASP. We are looking at having not just the > > heading and link, but also some portion or whole of the body. The > > structure of the blog entry is like any classic Django based blog. > > > > Can someone suggest some script or tool where we can have the > > content made available in another web site through some Javascript. > > Take a look at the magpie library [0] for PHP. > > 0 - http://magpierss.sourceforge.net/ > -- > David Reynolds > [EMAIL PROTECTED] > > > > > > --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
I too am on webfaction, it's worth it, and dirt cheap. --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
I'm also on webfaction, and like it. The most basic plan is pretty skimpy on server RAM (simply enabling debug on my site put it over the limit, and I was the only one accessing it), but you'll be fine if you take a bit of care with the setup. Django works straight out of the box, and their support is great. E On Nov 8, 10:27 pm, Joe <[EMAIL PROTECTED]> wrote: > I use webfaction and I've found them to be great. > > J > > On Nov 8, 2:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hi guys. > > These guys seem to have very tempting packages. They say they support > > django. What I'd like to know is what kind of support? Do I have to > > install it on my home folder, or is it preinstalled on their servers? > > Second thing I wanted to ask about, is the speed. My current account > > goes really slow, and it has only one flatpage to handle. How good it > > webhostingbuzz on that issue? > > Thanks in advance > > Yair --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
__str__(self) for ManyToManyField
Hi, I have these models: class A(models.Model): [...] def __str__(self): return "(%s, %s)" % (self.estudi, self.curs) class Admin: pass and class B(models.Model): estudi_oferit = models.ManyToManyField('A', blank=True, null=True) class Admin: list_display = ('tipus', 'codi', 'nom', 'adreca', 'localitat', 'cp', 'zona_concurs', 'ordre_concurs', 'estudi_oferit') and when I list B elements in admin mode, in puts me address memory of objects instead of displaying field A as I define in __str__ How can I modify it? I use 0.96 Thanks in advance, Xan. --~--~-~--~~~---~--~~ 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: The Django admin interface optimized for iPhone/iPod touch
On 11/8/07, Josh <[EMAIL PROTECTED]> wrote: > > What a great idea! I don't (currently) have any devices that would be > able to use this, but I'll keep it in mind. The screenshots look > great too! Thanks Josh! I haven't tried the interface on other devices (e.g. Opera Mini) but it should work. If someone could check this out, it would be most welcomed. Best, Jannis --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Taconite + jquery + Django
Just thought I'd pass this along. I've been lurking about learning as I work on a couple of Django-based projects, and thought it was time to share something back. I've been having a lot of success with this combination in an app I've been tweaking and extending the past week. It's basically a web-based reporting application, reading out of a MySQL db that's updated by other sources. The first version of this, done a couple of years ago in PHP and JS with no framework, did some AJAXy stuff to update parts of the page without a full reload. Version 2 was redone in Django, but the AJAX updates were still hand- coded JS. (Django's serializer was used to return JSON for the updates). After hearing Simon talk about jquery at OSCON, the next time I needed to make substantial changes, I redid the JS part in jquery, which made extending the app with additional reports much simpler. The only problem was, parts of the pages had two different sets of code that fetched data from the view and formatted the content. On load of the full page, a Django template was rendered, on the updates, JSON was returned and jquery interpreted the result to modify the DOM. As the design evolved, we had to make sure both parts stayed in sync. I was about to go for pass three, in which the page load didn't fetch all of the database data, and all of the AJAX updated content, even on initial load, was handled by JSON serializer and jquery. But I stumbled across the Taconite jquery plug-in. This allows you to return an xml file from any jquery AJAX call. The plugin will iterate over the XML and make DOM changes, abstracting away the need to define callbacks to do these kind of updates. By using Taconite, I was able to rework our Django templates, with careful use of inheritance and includes, so that I could pass in the same context, and use the template 'reportn.html' to render a page for the browser or 'reportn.xml' to render xml for Taconite. So now, when I get told, for example, to add a column of data to one of the reports, I can make the change in a single Django template file, and if necessary, modify a single view function. It's an internal app, and my employer won't let me post any code, but if anyone is interested in this approach, I can work up a simple example and post it. Info on the plug-in is here: http://www.malsup.com/jquery/taconite/ --~--~-~--~~~---~--~~ 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: The Django admin interface optimized for iPhone/iPod touch
What a great idea! I don't (currently) have any devices that would be able to use this, but I'll keep it in mind. The screenshots look great too! On Nov 8, 6:55 am, "Jannis Leidel" <[EMAIL PROTECTED]> wrote: > Hi Users, > > I'm very glad to introduce to you django-mobileadmin[1], something > which I desperately needed because using the Django admin interface is > just annoying with MobileSafari on the iPhone/iPod touch platform. > > So, "mobileadmin" is an alternative admin interface for Django for use > with the iPhone/iPod touch. Some would call it a theme or a skin, but > actually it's more than that. Well, actually it misses some (very > little) functionality of the normal admin interface. Anyway, once > installed it is automatically used for any http request coming from a > MobileSafari based device by using a nifty midlleware/template loader > construct. > > Some screenshots are also on Flickr [2] > > Hope you like it :) > Jannis > > 1:http://code.google.com/p/django-mobileadmin/ > 2:http://flickr.com/photos/jannis/sets/72157602992424280/ > > -- > jannisleidel.com --~--~-~--~~~---~--~~ 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: parsing Django RSS feeds for content reposting
On 8 Nov 2007, at 1:49 pm, Ramdas S wrote: > Hi, > > I do not know how much of this post is relevant from point of Django! > Here is what I am looking at! > > I have a regular RSS feed for a blog created using Django's > contrib.feed. Can some one suggest the best practice to have > content from the RSS feed made available on other web sites > probably running PHP of ASP. We are looking at having not just the > heading and link, but also some portion or whole of the body. The > structure of the blog entry is like any classic Django based blog. > > Can someone suggest some script or tool where we can have the > content made available in another web site through some Javascript. Take a look at the magpie library [0] for PHP. 0 - http://magpierss.sourceforge.net/ -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
I use webfaction and I've found them to be great. J On Nov 8, 2:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi guys. > These guys seem to have very tempting packages. They say they support > django. What I'd like to know is what kind of support? Do I have to > install it on my home folder, or is it preinstalled on their servers? > Second thing I wanted to ask about, is the speed. My current account > goes really slow, and it has only one flatpage to handle. How good it > webhostingbuzz on that issue? > Thanks in advance > Yair --~--~-~--~~~---~--~~ 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: query set from ModelMultipleChoice
Carl Karsten wrote: > This works, but there has to be a better way: > > class blastSettings(forms.Form): >users = forms.ModelMultipleChoiceField(queryset=User.objects.all() > > u=x.cleaned_data['users'] > users = User.objects.filter(id__in=[x.id for x in u]).values() > > body_template=Template(message.body) > for user in users: >c=Context(detail) >body = body_template.render(c) well, this is 'better': users = [x.__dict__ for x in u] and I goofed this line: >c=Context(detail) should be c=Context(users) Carl K --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
The Django admin interface optimized for iPhone/iPod touch
Hi Users, I'm very glad to introduce to you django-mobileadmin[1], something which I desperately needed because using the Django admin interface is just annoying with MobileSafari on the iPhone/iPod touch platform. So, "mobileadmin" is an alternative admin interface for Django for use with the iPhone/iPod touch. Some would call it a theme or a skin, but actually it's more than that. Well, actually it misses some (very little) functionality of the normal admin interface. Anyway, once installed it is automatically used for any http request coming from a MobileSafari based device by using a nifty midlleware/template loader construct. Some screenshots are also on Flickr [2] Hope you like it :) Jannis 1: http://code.google.com/p/django-mobileadmin/ 2: http://flickr.com/photos/jannis/sets/72157602992424280/ -- jannisleidel.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
parsing Django RSS feeds for content reposting
Hi, I do not know how much of this post is relevant from point of Django! Here is what I am looking at! I have a regular RSS feed for a blog created using Django's contrib.feed. Can some one suggest the best practice to have content from the RSS feed made available on other web sites probably running PHP of ASP. We are looking at having not just the heading and link, but also some portion or whole of the body. The structure of the blog entry is like any classic Django based blog. Can someone suggest some script or tool where we can have the content made available in another web site through some Javascript. I hope I am clear enough. Thanks in advance Ramdas --~--~-~--~~~---~--~~ 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: Dynamic ImageField
Hi, Yes, you can: http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic-path-with-django/ http://code.djangoproject.com/wiki/CustomUploadAndFilters Regards, Marcin On Nov 8, 2:08 pm, cschand <[EMAIL PROTECTED]> wrote: > Hi all, > Can we make dynamic ImageFields? upload file to /media/avatar/ > username or userid/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Dynamic ImageField
Hi all, Can we make dynamic ImageFields? upload file to /media/avatar/ username or userid/ --~--~-~--~~~---~--~~ 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: How to select all the values from my Field attribute 'choices?
On 11/8/07, äL <[EMAIL PROTECTED]> wrote: > Do I have an error in the import syntax? How can I import ROLE? You don't. Just import Karateka and use Karateka.ROLE. -Gul --~--~-~--~~~---~--~~ 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: Using auth in model
> > My question above can be simplified as "how to get logged-in user with > request parameter" request.user will give you the logged-in user. If you want to know more about Django profile support, read the docs: http://www.djangobook.com/en/beta/chapter12/ You want the profiles section, near the bottom. Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ 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: webhostingbuzz, anyone tried
> These guys seem to have very tempting packages. They say they support > django. What I'd like to know is what kind of support? Do I have to > install it on my home folder, or is it preinstalled on their servers? I know two folks using WHB, though not for Django. Both are using the basic bottom-tier stuff: one (my brother-in-law) for a personal setup with gallery for family, etc; and the other is the wife of a coworker who hosts an OSCommerce deployment for stuff she's selling. However on one page [1], they claim to "fully support Django Web Hosting on our Budget Web Hosting plans", I find that suspect given that they don't seem to back that anywhere and that according to their FAQ[2] """ "Do you support DJango and Ruby on Rails? We support them on our semi dedicated web hosting plan. """ Dedicated hosting is a big jump in price, from under $5/mo (for the Budget plans) to $150/mo Additionally, though they say that they offer shell access, you have to request it, and (at least in the case of my coworker's wife) they require a (faxed?) copy of a photo ID before they enable shell access. That bugged me. However, I have shell access to that machine to help her maintain her project so if you want me to investigate I can do so further. That said, I don't think that her budget package has anything remotely resembling support for Django. > Second thing I wanted to ask about, is the speed. My current account > goes really slow, and it has only one flatpage to handle. How good it > webhostingbuzz on that issue? I've used several budget hosting services and would rate WHB as average. I don't know how that translates when moving from Budget to Dedicated. In short, for a small to medium sized Django site, I don't think I would go with WHB when there are other sites out there[3] that have far more affordable plans. If you were just installing static pages or some generic PHP scripts, they're fine. Hope this helps, -tim [1] http://www.webhostingbuzz.com/website-hosting.shtml?host_django-hosting [2] http://www.webhostingbuzz.com/website-hosting.shtml?whb_faq [3] http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts . --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Collaborative NGOs "Before it is too late" (Children in the street). COLABORE!
Collaborative NGOs "Before it is too late" (Children in the street). COLABORE! You have to maintain at all times the concsciencia what happens. Stay loose and free. Do not be patterns, but the entire society will seek to formártelo. Stay in nature. If you feel anger, let her be, it will ... What you must not miss is the realization that you are iracundo. The anger will disappear alone, and you watch the stupid thing ... And one becomes TOTALLY FREE when it comes to practice this at all times: Stay and be aware of ALL FREE DEJÁNDOSE FLUIR. Without hypocrisy, without false smiles, without plastic: ARE FREE ... The wealth hidden. Http://www.lariquezaoculta.blogspot.com * Collaborative NGOs "Before it is too late" (Children in the street). COLABORE! --~--~-~--~~~---~--~~ 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: How to select all the values from my Field attribute 'choices?
Hi, If I try to import ROLE I get an the error "cannot import name ROLE" views.py ### CODE ### def Karateka_edit(request, karateka_id): from kav.info.models import Karateka, ROLE roles= [y for x,y in ROLE] try: karateka = Karateka.objects.get(id = karateka_id) except Karateka.DoesNotExist: raise Http404 return render_to_response('info_karateka_edit.html', { 'karateka' : karateka, 'roles' : roles, 'user' : request.user}) ### END CODE ### Here is my models.py ### CODE ### class Karateka(models.Model): ROLE = ( ('1', 'Sportler'), ('2', 'Nachwuchsteam A'), ('3', 'Nachwuchsteam B'), ('4', 'Funktionär'), ('5', 'Trainer'), ) person= models.ForeignKey (Person,verbose_name = 'Person', core = True) role = models.CharField('Funktion',blank = True, null = True, maxlength = 1, choices=ROLE) def __str__(self): return "%s" % (self.person) class Admin: list_display = ('person') fields = ( (None, {'fields': ('person', 'bsc')}), ) def name_last(self): return "%s" % (self.person.nameLast) class Meta: ordering = ('person',) verbose_name= 'Karateka' verbose_name_plural = 'Karatekas' ### END CODE ### Do I have an error in the import syntax? How can I import ROLE? Thanks for your help regards, äL On 6 Nov., 21:27, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 11/6/07, äL <[EMAIL PROTECTED]> wrote: > > > > > > > Hello Karen > > > I have the same problem as Greg has. > > > If I try to use your code I got an "page not found" error. > > Here is my code: > > > views.py > > ### CODE ### > > def Karateka_edit(request, karateka_id): > > > from kav.info.models import Karateka > > > try: > > karateka = Karateka.objects.get(id = karateka_id) > > roles= [y for x,y in ROLE] > > except Karateka.DoesNotExist: > > raise Http404 > > return render_to_response('info_karateka_edit.html', { > > 'karateka' : karateka, > > 'roles' : roles, > > 'user' : request.user}) > > ### END CODE ### > > > Do I need to import ROLE like Karateka or do I have an other error in > > my code? > > Yes, assuming ROLE is defined in your models file you will need to import it > when you want to use it from another file. But that is not why you got a > 404 (page not found). Given that code, you'd only get a 404 if the > Karateka.objects.get call raises Karateka.DoesNotExist. So you didn't even > get as far as the roles= line (there's no reason to include that in the > try/except btw). If you had gotten as far as the roles= line and if you had > not imported ROLE from wherever it is defined, you would have gotten a > NameError "Global name ROLE is not defined". > > Karen --~--~-~--~~~---~--~~ 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: problem with Django
On Nov 8, 7:20 pm, stranger <[EMAIL PROTECTED]> wrote: > God.. How stupid I am ? Everytime I encounter you I am safe. thanks a > lot I am getting the page. > So how to make apache server media files? > > In httpd.conf I added the Location directive to the project directory > is it enough... No it isn't. You need to map the media directory as well. Easiest thing to do is: # Disable mod_python for /media and stuff below it. SetHandler None # Map /media to where media files are stored. Alias /media /usr/lib/python2.5/site-packages/django/contrib/admin/ media # Tell Apache it is allowed to serve files from where media files are stored. Order allow,deny Allow form all Check that ADMIN_MEDIA_PREFIX is set to '/media/' in settings.py file. Restart Apache. Graham > On Nov 8, 12:16 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > On Nov 8, 7:13 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > Ya mapper is an application in crimemap project. There is an empty > > > __init.py__ file. > > > Currenly this is the only url i am using.. > > > > (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), > > > Put quotes around the second value in the tuple: > > > (r'^crime/([a-zA-Z]+)', 'crimemap.mapper.views.crime_by_type'), > > > >http://localhost:8000/crime/arson > > > > should yield me the resulting view but i am getting an error I > > > mentioned above > > > > On. Nov 8, 12:08 am, Graham Dumpleton <[EMAIL PROTECTED]> > > > wrote: > > > > > Are you saying the directory hierarchy is: > > > > > /home/priya/projects/crimemap > > > > /home/priya/projects/crimemap/mapper > > > > > What is the full contents of urls.py? > > > > > If 'mapper' is a subdirectory of 'crimemap', does that directory > > > > contain at least an empty __init__.py file? > > > > > Graham > > > > > On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > Hello Graham, > > > > > > I tried the method u told me...But still the same result. Let > > > > > me clear a few things. I created a new project "crimemap" in /home/ > > > > > priya/projects/ > > > > > and app "mapper" inside crimemap. Now I am getting an error when i run > > > > > the server. python manage.py runserver > > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > > defined > > > > > Request Method: GET > > > > > Request URL:http://localhost:8000/ > > > > > Exception Type: ImproperlyConfigured > > > > > Exception Value:Error while importing URLconf > > > > > 'crimemap.urls': name > > > > > 'crimemap' is not defined > > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > Python Executable: /usr/bin/python > > > > > Python Version: 2.5.0 > > > > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > Check the file and directory permissions like suggested when you > > > > > > were > > > > > > first trying to setup your site, this time looking at any new files > > > > > > and directories you have added within your site area. They should > > > > > > have > > > > > > permissions so they are readable to Apache. > > > > > > > Graham > > > > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello, > > > > > > > I did the linking as you said: > > > > > > > ln -s /home/priya/projects/crimemap > > > > > > > /usr/lib/python2.5/site-packages/ > > > > > > > crimemap > > > > > > > > Also I restarted Apache, but nno change > > > > > > > > ImproperlyConfigured at /crime/arson/ > > > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is > > > > > > > not > > > > > > > defined > > > > > > > Request Method: GET > > > > > > > Request URL:http://localhost:8000/crime/arson/ > > > > > > > Exception Type: ImproperlyConfigured > > > > > > > Exception Value:Error while importing URLconf > > > > > > > 'crimemap.urls': name > > > > > > > 'crimemap' is not defined > > > > > > > Exception Location: > > > > > > > /usr/lib/python2.5/site-packages/django/core/ > > > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > > > Python Executable: /usr/bin/python > > > > > > > Python Version: 2.5.0 > > > > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > > > > Can you please tell me how to put crimemap on path. What is > > > > > > > > > sym- > > > > > > > > > linking? Can you explain briefly? > > > > > > > > > as root, at the prompt type: > > > > > > > > ln -s /pathtocrimemap/crimemap > > > > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > > > > and press enter > > > > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > > > > for further information, do man ln > > > > > > > > > -- > > > > > > > > > r
Re: problem with Django
How can I contact you when I am in need any email or messenger please On Nov 8, 12:20 am, stranger <[EMAIL PROTECTED]> wrote: > God.. How stupid I am ? Everytime I encounter you I am safe. thanks a > lot I am getting the page. > So how to make apache server media files? > > In httpd.conf I added the Location directive to the project directory > is it enough... > > On Nov 8, 12:16 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > On Nov 8, 7:13 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > Ya mapper is an application in crimemap project. There is an empty > > > __init.py__ file. > > > Currenly this is the only url i am using.. > > > > (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), > > > Put quotes around the second value in the tuple: > > > (r'^crime/([a-zA-Z]+)', 'crimemap.mapper.views.crime_by_type'), > > > >http://localhost:8000/crime/arson > > > > should yield me the resulting view but i am getting an error I > > > mentioned above > > > > On. Nov 8, 12:08 am, Graham Dumpleton <[EMAIL PROTECTED]> > > > wrote: > > > > > Are you saying the directory hierarchy is: > > > > > /home/priya/projects/crimemap > > > > /home/priya/projects/crimemap/mapper > > > > > What is the full contents of urls.py? > > > > > If 'mapper' is a subdirectory of 'crimemap', does that directory > > > > contain at least an empty __init__.py file? > > > > > Graham > > > > > On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > Hello Graham, > > > > > > I tried the method u told me...But still the same result. Let > > > > > me clear a few things. I created a new project "crimemap" in /home/ > > > > > priya/projects/ > > > > > and app "mapper" inside crimemap. Now I am getting an error when i run > > > > > the server. python manage.py runserver > > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > > defined > > > > > Request Method: GET > > > > > Request URL:http://localhost:8000/ > > > > > Exception Type: ImproperlyConfigured > > > > > Exception Value:Error while importing URLconf > > > > > 'crimemap.urls': name > > > > > 'crimemap' is not defined > > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > Python Executable: /usr/bin/python > > > > > Python Version: 2.5.0 > > > > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > Check the file and directory permissions like suggested when you > > > > > > were > > > > > > first trying to setup your site, this time looking at any new files > > > > > > and directories you have added within your site area. They should > > > > > > have > > > > > > permissions so they are readable to Apache. > > > > > > > Graham > > > > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello, > > > > > > > I did the linking as you said: > > > > > > > ln -s /home/priya/projects/crimemap > > > > > > > /usr/lib/python2.5/site-packages/ > > > > > > > crimemap > > > > > > > > Also I restarted Apache, but nno change > > > > > > > > ImproperlyConfigured at /crime/arson/ > > > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is > > > > > > > not > > > > > > > defined > > > > > > > Request Method: GET > > > > > > > Request URL:http://localhost:8000/crime/arson/ > > > > > > > Exception Type: ImproperlyConfigured > > > > > > > Exception Value:Error while importing URLconf > > > > > > > 'crimemap.urls': name > > > > > > > 'crimemap' is not defined > > > > > > > Exception Location: > > > > > > > /usr/lib/python2.5/site-packages/django/core/ > > > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > > > Python Executable: /usr/bin/python > > > > > > > Python Version: 2.5.0 > > > > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > > > > Can you please tell me how to put crimemap on path. What is > > > > > > > > > sym- > > > > > > > > > linking? Can you explain briefly? > > > > > > > > > as root, at the prompt type: > > > > > > > > ln -s /pathtocrimemap/crimemap > > > > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > > > > and press enter > > > > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > > > > for further information, do man ln > > > > > > > > > -- > > > > > > > > > regards > > > > > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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/
Re: problem with Django
God.. How stupid I am ? Everytime I encounter you I am safe. thanks a lot I am getting the page. So how to make apache server media files? In httpd.conf I added the Location directive to the project directory is it enough... On Nov 8, 12:16 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Nov 8, 7:13 pm, stranger <[EMAIL PROTECTED]> wrote: > > > Ya mapper is an application in crimemap project. There is an empty > > __init.py__ file. > > Currenly this is the only url i am using.. > > > (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), > > Put quotes around the second value in the tuple: > > (r'^crime/([a-zA-Z]+)', 'crimemap.mapper.views.crime_by_type'), > > >http://localhost:8000/crime/arson > > > should yield me the resulting view but i am getting an error I > > mentioned above > > > On. Nov 8, 12:08 am, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > Are you saying the directory hierarchy is: > > > > /home/priya/projects/crimemap > > > /home/priya/projects/crimemap/mapper > > > > What is the full contents of urls.py? > > > > If 'mapper' is a subdirectory of 'crimemap', does that directory > > > contain at least an empty __init__.py file? > > > > Graham > > > > On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > Hello Graham, > > > > > I tried the method u told me...But still the same result. Let > > > > me clear a few things. I created a new project "crimemap" in /home/ > > > > priya/projects/ > > > > and app "mapper" inside crimemap. Now I am getting an error when i run > > > > the server. python manage.py runserver > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > defined > > > > Request Method: GET > > > > Request URL:http://localhost:8000/ > > > > Exception Type: ImproperlyConfigured > > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > > name > > > > 'crimemap' is not defined > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > Python Executable: /usr/bin/python > > > > Python Version: 2.5.0 > > > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Check the file and directory permissions like suggested when you were > > > > > first trying to setup your site, this time looking at any new files > > > > > and directories you have added within your site area. They should have > > > > > permissions so they are readable to Apache. > > > > > > Graham > > > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > > > > I did the linking as you said: > > > > > > ln -s /home/priya/projects/crimemap > > > > > > /usr/lib/python2.5/site-packages/ > > > > > > crimemap > > > > > > > Also I restarted Apache, but nno change > > > > > > > ImproperlyConfigured at /crime/arson/ > > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is > > > > > > not > > > > > > defined > > > > > > Request Method: GET > > > > > > Request URL:http://localhost:8000/crime/arson/ > > > > > > Exception Type: ImproperlyConfigured > > > > > > Exception Value:Error while importing URLconf > > > > > > 'crimemap.urls': name > > > > > > 'crimemap' is not defined > > > > > > Exception Location: > > > > > > /usr/lib/python2.5/site-packages/django/core/ > > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > > Python Executable: /usr/bin/python > > > > > > Python Version: 2.5.0 > > > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > > > > linking? Can you explain briefly? > > > > > > > > as root, at the prompt type: > > > > > > > ln -s /pathtocrimemap/crimemap > > > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > > > and press enter > > > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > > > for further information, do man ln > > > > > > > > -- > > > > > > > > regards > > > > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
On Nov 8, 7:13 pm, stranger <[EMAIL PROTECTED]> wrote: > Ya mapper is an application in crimemap project. There is an empty > __init.py__ file. > Currenly this is the only url i am using.. > > (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), Put quotes around the second value in the tuple: (r'^crime/([a-zA-Z]+)', 'crimemap.mapper.views.crime_by_type'), > http://localhost:8000/crime/arson > > should yield me the resulting view but i am getting an error I > mentioned above > > On. Nov 8, 12:08 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Are you saying the directory hierarchy is: > > > /home/priya/projects/crimemap > > /home/priya/projects/crimemap/mapper > > > What is the full contents of urls.py? > > > If 'mapper' is a subdirectory of 'crimemap', does that directory > > contain at least an empty __init__.py file? > > > Graham > > > On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > Hello Graham, > > > > I tried the method u told me...But still the same result. Let > > > me clear a few things. I created a new project "crimemap" in /home/ > > > priya/projects/ > > > and app "mapper" inside crimemap. Now I am getting an error when i run > > > the server. python manage.py runserver > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > defined > > > Request Method: GET > > > Request URL:http://localhost:8000/ > > > Exception Type: ImproperlyConfigured > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > name > > > 'crimemap' is not defined > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > urlresolvers.py in _get_urlconf_module, line 255 > > > Python Executable: /usr/bin/python > > > Python Version: 2.5.0 > > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > > wrote: > > > > > Check the file and directory permissions like suggested when you were > > > > first trying to setup your site, this time looking at any new files > > > > and directories you have added within your site area. They should have > > > > permissions so they are readable to Apache. > > > > > Graham > > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > > Hello, > > > > > I did the linking as you said: > > > > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > > > > crimemap > > > > > > Also I restarted Apache, but nno change > > > > > > ImproperlyConfigured at /crime/arson/ > > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > > defined > > > > > Request Method: GET > > > > > Request URL:http://localhost:8000/crime/arson/ > > > > > Exception Type: ImproperlyConfigured > > > > > Exception Value:Error while importing URLconf > > > > > 'crimemap.urls': name > > > > > 'crimemap' is not defined > > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > > Python Executable: /usr/bin/python > > > > > Python Version: 2.5.0 > > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > > > linking? Can you explain briefly? > > > > > > > as root, at the prompt type: > > > > > > ln -s /pathtocrimemap/crimemap > > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > > and press enter > > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > > for further information, do man ln > > > > > > > -- > > > > > > > regards > > > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
You only need to worry about a separate media server if your site is going to get large volumes of traffic or you are serving large media files. For the average user they need not worry about such things, so don't concern yourself for now about it. Graham On Nov 8, 7:11 pm, stranger <[EMAIL PROTECTED]> wrote: > Also can anyone suggest me how to setup a webserver to serve media > files like css, images, javascripts. I heard that we should not use > the same webserver django is using. I am using Apache httpd currently. > So if i want to use lighttpd for media how to configure it. Also the > lighttpd wont run anymore on 80 port as apache is running please > suggest. > > On Nov 8, 12:02 am, stranger <[EMAIL PROTECTED]> wrote: > > > Hello Graham, > > > I tried the method u told me...But still the same result. Let > > me clear a few things. I created a new project "crimemap" in /home/ > > priya/projects/ > > and app "mapper" inside crimemap. Now I am getting an error when i run > > the server. python manage.py runserver > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > defined > > Request Method: GET > > Request URL:http://localhost:8000/ > > Exception Type: ImproperlyConfigured > > Exception Value:Error while importing URLconf 'crimemap.urls': name > > 'crimemap' is not defined > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > urlresolvers.py in _get_urlconf_module, line 255 > > Python Executable: /usr/bin/python > > Python Version: 2.5.0 > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > Check the file and directory permissions like suggested when you were > > > first trying to setup your site, this time looking at any new files > > > and directories you have added within your site area. They should have > > > permissions so they are readable to Apache. > > > > Graham > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > I did the linking as you said: > > > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > > > crimemap > > > > > Also I restarted Apache, but nno change > > > > > ImproperlyConfigured at /crime/arson/ > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > defined > > > > Request Method: GET > > > > Request URL:http://localhost:8000/crime/arson/ > > > > Exception Type: ImproperlyConfigured > > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > > name > > > > 'crimemap' is not defined > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > Python Executable: /usr/bin/python > > > > Python Version: 2.5.0 > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > > linking? Can you explain briefly? > > > > > > as root, at the prompt type: > > > > > ln -s /pathtocrimemap/crimemap > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > and press enter > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > for further information, do man ln > > > > > > -- > > > > > > regards > > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
Ya mapper is an application in crimemap project. There is an empty __init.py__ file. Currenly this is the only url i am using.. (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), http://localhost:8000/crime/arson should yield me the resulting view but i am getting an error I mentioned above On. Nov 8, 12:08 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Are you saying the directory hierarchy is: > > /home/priya/projects/crimemap > /home/priya/projects/crimemap/mapper > > What is the full contents of urls.py? > > If 'mapper' is a subdirectory of 'crimemap', does that directory > contain at least an empty __init__.py file? > > Graham > > On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > > > Hello Graham, > > > I tried the method u told me...But still the same result. Let > > me clear a few things. I created a new project "crimemap" in /home/ > > priya/projects/ > > and app "mapper" inside crimemap. Now I am getting an error when i run > > the server. python manage.py runserver > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > defined > > Request Method: GET > > Request URL:http://localhost:8000/ > > Exception Type: ImproperlyConfigured > > Exception Value:Error while importing URLconf 'crimemap.urls': name > > 'crimemap' is not defined > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > urlresolvers.py in _get_urlconf_module, line 255 > > Python Executable: /usr/bin/python > > Python Version: 2.5.0 > > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > Check the file and directory permissions like suggested when you were > > > first trying to setup your site, this time looking at any new files > > > and directories you have added within your site area. They should have > > > permissions so they are readable to Apache. > > > > Graham > > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > I did the linking as you said: > > > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > > > crimemap > > > > > Also I restarted Apache, but nno change > > > > > ImproperlyConfigured at /crime/arson/ > > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > > defined > > > > Request Method: GET > > > > Request URL:http://localhost:8000/crime/arson/ > > > > Exception Type: ImproperlyConfigured > > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > > name > > > > 'crimemap' is not defined > > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > > urlresolvers.py in _get_urlconf_module, line 255 > > > > Python Executable: /usr/bin/python > > > > Python Version: 2.5.0 > > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > > linking? Can you explain briefly? > > > > > > as root, at the prompt type: > > > > > ln -s /pathtocrimemap/crimemap > > > > > /usr/lib/python2.x/site-packages/crimemap > > > > > and press enter > > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > > for further information, do man ln > > > > > > -- > > > > > > regards > > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
Also can anyone suggest me how to setup a webserver to serve media files like css, images, javascripts. I heard that we should not use the same webserver django is using. I am using Apache httpd currently. So if i want to use lighttpd for media how to configure it. Also the lighttpd wont run anymore on 80 port as apache is running please suggest. On Nov 8, 12:02 am, stranger <[EMAIL PROTECTED]> wrote: > Hello Graham, > > I tried the method u told me...But still the same result. Let > me clear a few things. I created a new project "crimemap" in /home/ > priya/projects/ > and app "mapper" inside crimemap. Now I am getting an error when i run > the server. python manage.py runserver > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > defined > Request Method: GET > Request URL:http://localhost:8000/ > Exception Type: ImproperlyConfigured > Exception Value:Error while importing URLconf 'crimemap.urls': name > 'crimemap' is not defined > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > urlresolvers.py in _get_urlconf_module, line 255 > Python Executable: /usr/bin/python > Python Version: 2.5.0 > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Check the file and directory permissions like suggested when you were > > first trying to setup your site, this time looking at any new files > > and directories you have added within your site area. They should have > > permissions so they are readable to Apache. > > > Graham > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > I did the linking as you said: > > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > > crimemap > > > > Also I restarted Apache, but nno change > > > > ImproperlyConfigured at /crime/arson/ > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > defined > > > Request Method: GET > > > Request URL:http://localhost:8000/crime/arson/ > > > Exception Type: ImproperlyConfigured > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > name > > > 'crimemap' is not defined > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > urlresolvers.py in _get_urlconf_module, line 255 > > > Python Executable: /usr/bin/python > > > Python Version: 2.5.0 > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > linking? Can you explain briefly? > > > > > as root, at the prompt type: > > > > ln -s /pathtocrimemap/crimemap /usr/lib/python2.x/site-packages/crimemap > > > > and press enter > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > for further information, do man ln > > > > > -- > > > > > regards > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
Are you saying the directory hierarchy is: /home/priya/projects/crimemap /home/priya/projects/crimemap/mapper What is the full contents of urls.py? If 'mapper' is a subdirectory of 'crimemap', does that directory contain at least an empty __init__.py file? Graham On Nov 8, 7:02 pm, stranger <[EMAIL PROTECTED]> wrote: > Hello Graham, > > I tried the method u told me...But still the same result. Let > me clear a few things. I created a new project "crimemap" in /home/ > priya/projects/ > and app "mapper" inside crimemap. Now I am getting an error when i run > the server. python manage.py runserver > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > defined > Request Method: GET > Request URL:http://localhost:8000/ > Exception Type: ImproperlyConfigured > Exception Value:Error while importing URLconf 'crimemap.urls': name > 'crimemap' is not defined > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > urlresolvers.py in _get_urlconf_module, line 255 > Python Executable: /usr/bin/python > Python Version: 2.5.0 > > On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Check the file and directory permissions like suggested when you were > > first trying to setup your site, this time looking at any new files > > and directories you have added within your site area. They should have > > permissions so they are readable to Apache. > > > Graham > > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > I did the linking as you said: > > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > > crimemap > > > > Also I restarted Apache, but nno change > > > > ImproperlyConfigured at /crime/arson/ > > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > > defined > > > Request Method: GET > > > Request URL:http://localhost:8000/crime/arson/ > > > Exception Type: ImproperlyConfigured > > > Exception Value:Error while importing URLconf 'crimemap.urls': > > > name > > > 'crimemap' is not defined > > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > > urlresolvers.py in _get_urlconf_module, line 255 > > > Python Executable: /usr/bin/python > > > Python Version: 2.5.0 > > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > > linking? Can you explain briefly? > > > > > as root, at the prompt type: > > > > ln -s /pathtocrimemap/crimemap /usr/lib/python2.x/site-packages/crimemap > > > > and press enter > > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > > for further information, do man ln > > > > > -- > > > > > regards > > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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: problem with Django
Hello Graham, I tried the method u told me...But still the same result. Let me clear a few things. I created a new project "crimemap" in /home/ priya/projects/ and app "mapper" inside crimemap. Now I am getting an error when i run the server. python manage.py runserver Error while importing URLconf 'crimemap.urls': name 'crimemap' is not defined Request Method: GET Request URL:http://localhost:8000/ Exception Type: ImproperlyConfigured Exception Value:Error while importing URLconf 'crimemap.urls': name 'crimemap' is not defined Exception Location: /usr/lib/python2.5/site-packages/django/core/ urlresolvers.py in _get_urlconf_module, line 255 Python Executable: /usr/bin/python Python Version: 2.5.0 On Nov 7, 11:38 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Check the file and directory permissions like suggested when you were > first trying to setup your site, this time looking at any new files > and directories you have added within your site area. They should have > permissions so they are readable to Apache. > > Graham > > On Nov 8, 6:32 pm, stranger <[EMAIL PROTECTED]> wrote: > > > Hello, > > I did the linking as you said: > > ln -s /home/priya/projects/crimemap /usr/lib/python2.5/site-packages/ > > crimemap > > > Also I restarted Apache, but nno change > > > ImproperlyConfigured at /crime/arson/ > > Error while importing URLconf 'crimemap.urls': name 'crimemap' is not > > defined > > Request Method: GET > > Request URL:http://localhost:8000/crime/arson/ > > Exception Type: ImproperlyConfigured > > Exception Value:Error while importing URLconf 'crimemap.urls': name > > 'crimemap' is not defined > > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > > urlresolvers.py in _get_urlconf_module, line 255 > > Python Executable: /usr/bin/python > > Python Version: 2.5.0 > > > On Nov 7, 11:16 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > On 08-Nov-07, at 12:34 PM, stranger wrote: > > > > > Can you please tell me how to put crimemap on path. What is sym- > > > > linking? Can you explain briefly? > > > > as root, at the prompt type: > > > ln -s /pathtocrimemap/crimemap /usr/lib/python2.x/site-packages/crimemap > > > and press enter > > > > for the 'x' for python2.x, put your python version (3,4 or 5) > > > for further information, do man ln > > > > -- > > > > regards > > > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---