Re: sorl thumbnail

2011-06-10 Thread Blue Cuenca
Is your cache, readable and writable to other groups/users as well? On 6/11/2011 1:11 AM, Greg Donald wrote: > On Fri, Jun 10, 2011 at 11:59 AM, Greg Donald wrote: >> File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line >> 52, in raise_ioerror >> raise IOError(message + " when

Re: forms messing up css, help?

2011-06-10 Thread raj
I also noticed one more thing, in general, all html functions stopped working with render_to_response i think. Like i have a function that gets the current path ({% request.path == ".." %}). That also isn't working. And even when I hard-code it, it doesn't make a difference. any suggestions? On Ju

Re: forms messing up css, help?

2011-06-10 Thread raj
Another thing i just noticed, When i view the source of my contact form, all the css/javascript includes are missing part of the path where i placed a {{ STATIC_URL }} tag. Why isn't this tag being rendered? Thank you. On Jun 11, 12:14 am, raj wrote: > Hey guys, Whenever i try and add a contact f

forms messing up css, help?

2011-06-10 Thread raj
Hey guys, Whenever i try and add a contact form (from the django book) into my current website, all my css/javascripts stop working. What is the issue? Here are my codes: #views.py def contact(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_v

Dynamic Nested Formsets?

2011-06-10 Thread Sontek
I have 3 Models: class Workflow(models.Model): name = models.CharField(max_length=255) company = models.ForeignKey(Company) class Meta: unique_together = ('name', 'company') class Milestone(models.Model): workflow = models.ForeignKey(Workflow) tasks = models.ManyToMany

Re: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-10 Thread javatina
You are absolutely correct. I certainly need to improve my Python skills, think more Python and get rid of some old habits. Another lesson - I could easily find the problem myself if I trusted more myself instead of sending tracebacks asking for help. So, I guess double thanks are in order. Serge

Re: Need help getting this snippet to work in Django 1.2...

2011-06-10 Thread mhulse
Hi Martin! Thanks so much for the help, I really appreciate it. :) > The snippet is a form field, not a model field. Well, that would explain things! Lol. When I read this in the instructions: "Usage eg: yob = BirthYearField(label="What year were you born?")" I thought that was a model field.

Re: Need help getting this snippet to work in Django 1.2...

2011-06-10 Thread Martin
I think this is not how it works. The snippet is a form field, not a model field. Basically I think you should use an IntegerField (you just want to store a year, right?). Then somehow you need to override the widget or so and make sure that in the admin that form will be used for that IntegerField

Need help getting this snippet to work in Django 1.2...

2011-06-10 Thread mhulse
I feel like this should be simple... I would like to replace this model field: date = models.DateField(_(u'Year'), unique=True) ...with this snippet: http://djangosnippets.org/snippets/508/ I have spent the last couple hours banging my head on my keyboard... During the course of my tests, at

Re: Email Accounts

2011-06-10 Thread Kenneth Gonsalves
On Fri, 2011-06-10 at 16:23 +0100, Cal Leeming [Simplicity Media Ltd] wrote: > > I didn't realise I had accidently sent this email to the list, rather > than > directly to the OP. > > Thank you for letting me know. > > I have faced this problem - whether I click 'reply to all' or 'reply to sen

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
Bruno, Thanks. It wasn't exactly working properly, so I just had to add .order_by('feed__feed_type__order_by') and it seems to be working properly. On Jun 10, 3:33 pm, bruno desthuilliers wrote: > On 10 juin, 17:23, Chris McComas wrote: > > > Sorry for the confusion, this is what I am trying

Custom query for ModelChoiceField using request.user.get_profile() as a part of the criteria

2011-06-10 Thread geraldcor
Hello all, I am wondering how to access a user's profile when creating the queryset for a ModelChoiceField. I would like to be able to use the ModelChoiceField to display contacts from another table based on a parameter saved in the user profile i.e. who = forms.ModelChoiceField(queryset=Contacts.

Re: Email Accounts

2011-06-10 Thread Sergiy Khohlov
Not is is related to django. A lot of email system stores email account (not mailbox) in the database. It is not hard task to create a django class using database which is used for SMTP system. Take a look at the next URL: http://bowe.id.au/michael/isp/postfix-server.htm part of mysql : C

Re: Help with custom model method for query

2011-06-10 Thread bruno desthuilliers
On 10 juin, 17:23, Chris McComas wrote: > Sorry for the confusion, this is what I am trying to achieve. It's the > FeedType and then FeedItems whose feed (fk) has a (fk) to FeedType. > > The HTML would be: > > {% for feed_type in FeedType %} >         {{ feed_type.name >         >                

Re: Is there anyway to put a Django site into maintenance mode using fabric?

2011-06-10 Thread Eric Chamberlain
We make the change at the web server and redirect all traffic to a static page. If the site is down for maintenance, then the middleware won't work either. On Jun 10, 2011, at 9:24 AM, Garth Humphreys wrote: > I'm using the MaintenanceModeMiddleware to put my site into > maintenance mode, but I

Re: VERY cheap django hosting?

2011-06-10 Thread Eric Chamberlain
We use Amazon AWS. If you register a new account, you can get free service for a year on their lowest tier. On Jun 7, 2011, at 11:30 PM, raj wrote: > Hey guys, > Just wondering if you could give me some hosts that are very cheap for > django hosting? Is hostgator any good? I really don't know

Re: sorl thumbnail

2011-06-10 Thread Greg Donald
On Fri, Jun 10, 2011 at 12:41 PM, Nan wrote: > I encountered that error at one point when upgrading Sorl Thumbnail > versions.  Can't remember exactly how I worked around it, but it had > something to do with clearing out caches. My cache is clean, this is a new app. My key/value table is empty,

Re: sorl thumbnail

2011-06-10 Thread Nan
I encountered that error at one point when upgrading Sorl Thumbnail versions. Can't remember exactly how I worked around it, but it had something to do with clearing out caches. There are data caches that you can clear with Sorl's custom management commands and disk caches that you can delete.

Re: Updating static files: Still in browser cache

2011-06-10 Thread Malcolm Box
On 10 June 2011 14:54, Thomas Guettler wrote: > On 09.06.2011 19:18, Malcolm Box wrote: > > On 9 Jun 2011, at 14:21, DrBloodmoney wrote: > > > >> On Thu, Jun 9, 2011 at 9:16 AM, Malcolm Box > wrote: > >>> On 9 June 2011 08:09, Thomas Guettler wrote: > which application does not cache URLs wit

Re: sorl thumbnail

2011-06-10 Thread Greg Donald
On Fri, Jun 10, 2011 at 11:59 AM, Greg Donald wrote: >  File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line > 52, in raise_ioerror >   raise IOError(message + " when reading image file") > > IOError: broken data stream when reading image file And then more baffling is the fact t

Re: How to add CSRF to context when using test client???

2011-06-10 Thread Matteius
Yes I Have this in the setUp function which causes my POST request to get a 403 forbidden because I don't actually include the CSRF field in the context as the middleware does on a deployed version of the site. I need a function to call or something to get the CSRF context value, or a function that

sorl thumbnail

2011-06-10 Thread Greg Donald
Sorry if this is off-topic, I was unable to find a user group for my exact issue. I'm using sorl thumbnail with Django. On my local setup it works fine, but in production the thumbnails are not made. My code looks like this: {% load thumbnail %} {% thumbnail up.image "32x32" crop="center" as im

Is there anyway to put a Django site into maintenance mode using fabric?

2011-06-10 Thread Garth Humphreys
I'm using the MaintenanceModeMiddleware to put my site into maintenance mode, but I was wondering if there is a way to put my site into maintenance via fabric. I would like to do something like; fab maintenance_on If this is not possible what are other common ways of remotely putting a Django sit

Re: storing django object into javascript array

2011-06-10 Thread Ian Clelland
On Fri, Jun 10, 2011 at 7:48 AM, jay K. wrote: > > Hello, > > I am not a django developer, but I have a background on html, css, > javascript, jquery and php. > > I was wondering if you can help me with a question regarding django, > since I'm working on a website built on django (which was not s

Re: storing django object into javascript array

2011-06-10 Thread Brice Leroy
Hello Jay, When you call city.school_set.all ,you get an array of object. the template render the string representation of the object. You might want to loop other them. Check the json serializer too : https://docs.djangoproject.com/en/dev/topics/serialization/#serialization-formats Brice 2011

Trying to keep upload filename from disappearing - with python 2.7.1/django 1.2.4

2011-06-10 Thread djangobeginner
I'm new to django and python but I'm working on a new screen for a project I'm on. The screen is supposed to capture a bunch of text information as well as allow a user to browse and select a file on their local machine for uploading. I'm having a problem with the filename disappearing from the sel

storing django object into javascript array

2011-06-10 Thread jay K.
Hello, I am not a django developer, but I have a background on html, css, javascript, jquery and php. I was wondering if you can help me with a question regarding django, since I'm working on a website built on django (which was not started by me) I want to store a django object into a javascri

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
Sorry for the confusion, this is what I am trying to achieve. It's the FeedType and then FeedItems whose feed (fk) has a (fk) to FeedType. The HTML would be: {% for feed_type in FeedType %} {{ feed_type.name {% for FeedItem in Feed in FeedType %}

Re: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-10 Thread Ian Clelland
On Fri, Jun 10, 2011 at 5:55 AM, javatina wrote: > > = in views.py: === > see formatted http://dpaste.com/hold/552703/ > > same as: > > def test(request, slug=None): >slugs = Concept.objects.filter(status__slug = 'active').order_by('- > published_on').values_list('slug', flat=True) >

Re: Email Accounts

2011-06-10 Thread Cal Leeming [Simplicity Media Ltd]
My apologies. I didn't realise I had accidently sent this email to the list, rather than directly to the OP. Thank you for letting me know. Cal On Fri, Jun 10, 2011 at 4:14 PM, Brian Bouterse wrote: > This conversation is off topic, and should not be facilitated through the > Django users ma

Re: Email Accounts

2011-06-10 Thread Brian Bouterse
This conversation is off topic, and should not be facilitated through the Django users mailing list. There are sites setup for these kinds of things . Brian On Fri, Jun 10, 2011 at 11:09 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wr

Re: Email Accounts

2011-06-10 Thread Cal Leeming [Simplicity Media Ltd]
Hey Lillian, I've noticed a few emails on the list from you.. Could you possibly explain a little bit about the situation you are currently in, and what it is you are looking for? I might be able to offer some assistance, depending on what the problem is. Cal On Fri, Jun 10, 2011 at 2:40 PM, lil

Re: Help with custom model method for query

2011-06-10 Thread bruno desthuilliers
On Jun 10, 3:12 pm, Chris McComas wrote: > tethered my phone to my laptop to test it out...have this code in my > template: > > {% regroup feeds by feed_type as feed_list %} > {% for feed_type in feed_list %} >         {{ feed_type.grouper }} > >         {% for entry in feed_type.list %} >        

Re: Updating static files: Still in browser cache

2011-06-10 Thread Thomas Guettler
On 09.06.2011 19:18, Malcolm Box wrote: > > > Sent from my iPhone, please excuse any typos > > On 9 Jun 2011, at 14:21, DrBloodmoney wrote: > >> On Thu, Jun 9, 2011 at 9:16 AM, Malcolm Box wrote: >>> On 9 June 2011 08:09, Thomas Guettler wrote: My static files (JS/CSS) are cached

Re: Email Accounts

2011-06-10 Thread Sergiy Khohlov
Could you please clarify your question ? Are planning to use exiting email account in Django app or you planning to create email account via django app ? thanks, Serge 2011/6/10 lillian : > Thanks for the recommendation. > > Any IT guys out there? > > Also, is it difficult to set up email accou

Email Accounts

2011-06-10 Thread lillian
Thanks for the recommendation. Any IT guys out there? Also, is it difficult to set up email accounts with Django or do I require an IT guy for that as well? Need to set up some accounts and could use a little help. -- You received this message because you are subscribed to the Google Groups "

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
tethered my phone to my laptop to test it out...have this code in my template: {% regroup feeds by feed_type as feed_list %} {% for feed_type in feed_list %} {{ feed_type.grouper }} {% for entry in feed_type.list %} {{ entry.title }} {% endfor %} {% endfor

"Serge Illaryonov wants to chat" - My apology

2011-06-10 Thread javatina
It looks like I accidentally clicked yesterday on that small thing in my Google email client while reading Django digest - evidently that resulted in this embarrassing message. I want to apologize - I never meant to spam the group. Serge -- You received this message because you are subscribed to

Re: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-10 Thread javatina
> What are you doing with the list once you generate it? Are you just running > that single line of code, for instance, in a Python shell, or is this error > generated in a view? Attempt to "cast" QuerySet to list appeared during my experimentation with Python/Django to see what I can do with both

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
Thanks very much! The city is passed to the view as an argument. How would I run the regroup? I'm on the road and not around my laptop for a few hours. would it be: {% regroup feeds by type as feed_list %} {% for type by feed_list %} {{ type.name }}

Re: VERY cheap django hosting?

2011-06-10 Thread Andre Terra
site5.com is a no-brainer when it comes to inexpensive django hosting. Coupons for free domain registration, and plans starting at $4.95/mo with *unlimited *disk space *and *bandwidth. What else could you ask for? And it's got a wide range of server locations

Re: ManyToManyField linking to Users in another database

2011-06-10 Thread Benedict Verheyen
On 10/06/2011 13:37, Benedict Verheyen wrote: > Hi, > > > (2nd attempt, as after a few hours the message still doesn't show up) > First, to sketch the situation. > To authenticate users, I use my own login backend. Nothing special, checks > the users in AD. > I have 1 project with all users in i

ManyToManyField linking to Users in another database

2011-06-10 Thread Benedict Verheyen
Hi, (2nd attempt, as after a few hours the message still doesn't show up) First, to sketch the situation. To authenticate users, I use my own login backend. Nothing special, checks the users in AD. I have 1 project with all users in it, and other projects have their own limited set of users. Th

Re: Syntax Error at requested method GET !!!

2011-06-10 Thread Tom Evans
On Fri, Jun 10, 2011 at 7:27 AM, Gagan (GPS) wrote: > I have experienced this error on my Ubuntu 11.04. I am unable to even > view the / page on this site. Kindly help. I was trying to learn > Django by following the video regarding creating a wiki on > showmedo.com . The link to the video is: > h

Re: Help with custom model method for query

2011-06-10 Thread bruno desthuilliers
On Jun 10, 6:13 am, Chris McComas wrote: > I have this views.py and models.py: > > http://dpaste.com/552615/ > > On the view what I want to do is display a list of all the feed types > (News, Sports, etc general categories), then then below each of those > feed type headings display the FeedItems

Re: How to add CSRF to context when using test client???

2011-06-10 Thread Artemenko Alexander
Hi Matt, Use: from django.test import Client csrf_client = Client(enforce_csrf_checks=True) https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#testing 10.06.2011, 08:48, "Matteius" : > Greetings, > > I am writing unit tests for my application, and I want to leave CSRF > checks enabled in t

Re: VERY cheap django hosting?

2011-06-10 Thread Samuel Fuentes
I use djangoeurope.com which is a rebranding of djangohosting.ch with slightly different prices, I think. Quite happy with the service. On Jun 9, 12:52 am, Alasdair Nicol wrote: > I have used djangohosting.ch before and recommend them. As BR says it's > very easy to deploy, and I thought their su

Syntax Error at requested method GET !!!

2011-06-10 Thread Gagan (GPS)
I have experienced this error on my Ubuntu 11.04. I am unable to even view the / page on this site. Kindly help. I was trying to learn Django by following the video regarding creating a wiki on showmedo.com . The link to the video is: http://showmedo.com/videotutorials/video?name=110&fromSeries

Django-based daily deals aggregator

2011-06-10 Thread Dealshelve (deals aggregator)
Hi guys, We are working on a Django-based project at http://dealshelve.com (hosted by WebFaction) with the hope to aggregate daily deals from as many group buying sites as possible. We plan to make our aggregator framework to be available publicly to allow anyone to submit new sites with the neces

Re: Passing cookies around?

2011-06-10 Thread Lucian Nicolescu
I am sure someone already replied to a somewhat similar situation, he advised for using a process called session handoff. Search the discussion history and see if that helps. On Fri, Jun 10, 2011 at 12:26 AM, Roy Smith wrote: > We're using django as a front end to a pre-existing web site > implem

Re: Authentication in API (REST)

2011-06-10 Thread Malcolm Box
On 10 June 2011 01:26, Yohanes Adhi Nugraha wrote: > > Not that one, if we use django.contrib.auth and @login_required, it's > only redirects you to login page. > What I saw from another site is, browser will popup an alert with > username and password to be filled. > > View source is your frie