Re: running projects on the back of a base URL and having issues with the homepage

2010-12-15 Thread NoviceSortOf
On Dec 15, 8:08 am, mongoose wrote: > > I'm trying to run projects on the back of it. For > > examplehttp://baseurl.com/mongoose/ > > The projects run but the URL don't work properly because they all > > reference the base url. So for 'About Me' page it points > > tohttp://baseurl.com/aboutinste

Re: script adding FileField, no attribute chunks

2010-12-15 Thread urukay
Hi, can any one help on this problem? pic_file = os.path.join(settings.MEDIA_ROOT, 'signature \invalid.png') f = open(pic_file, 'r') picture = InMemoryUploadedFile( file=f, field_name='image',

Controlling File Downloads.

2010-12-15 Thread NoviceSortOf
What is the best way to allow authorized downloads to specific users in Django. We have 2 possible scenarios that could work for us. 1. A download directory where any user can download any file in the folder. or 2. Granting specific rights to specific users to download a specific file or se

testclient cannot find the template

2010-12-15 Thread Kenneth Gonsalves
hi, I am trying to write a test of a view with test client. My test is like this: class Testgetnum(unittest.TestCase): def setUp(self): self.client = Client() def testgetnum(self): response = self.client.post('/success/',{'id':1}) self.assertEqual(response.status

Re: Controlling File Downloads.

2010-12-15 Thread euan.godd...@googlemail.com
If you're using apache you might want to consider wiring your app to generate mod_auth_token URLs and have apache receive these. On Dec 15, 8:29 am, NoviceSortOf wrote: > What is the best way to allow authorized downloads > to specific users in Django. > > We have 2 possible scenarios that could

Update user page after thread execution

2010-12-15 Thread mart
Hello, In my architecture, I send messages to a port object (implemented as a queue in a thread). I'm giving callback function with the result of the call. For example, after filling the registration form, # views.py ... def createprofile(request): ... gui_port.send_to(port_profile,('rec

Re: testclient cannot find the template

2010-12-15 Thread Piotr Zalewa
Hi Kenneth, It looks like the test can't find the /success/ URL and then tries to display a 404 error, but there is o 404.html template Do you have 404.html template created? zalun On 10-12-15 01:13, Kenneth Gonsalves wrote: hi, I am trying to write a test of a view with test client. My test

Re: testclient cannot find the template

2010-12-15 Thread Kenneth Gonsalves
On Wed, 2010-12-15 at 03:44 -0800, Piotr Zalewa wrote: > It looks like the test can't find the /success/ URL > and then tries to display a 404 error, but there is o 404.html > template > > Do you have 404.html template created? no 404 template - but why can it not find the /success/ url? Do I ne

Re: testclient cannot find the template

2010-12-15 Thread Kenneth Gonsalves
On Wed, 2010-12-15 at 17:23 +0530, Kenneth Gonsalves wrote: > On Wed, 2010-12-15 at 03:44 -0800, Piotr Zalewa wrote: > > It looks like the test can't find the /success/ URL > > and then tries to display a 404 error, but there is o 404.html > > template > > > > Do you have 404.html template created

Re: testclient cannot find the template

2010-12-15 Thread Piotr Zalewa
This should work, is /success working in dev server? zalun On 10-12-15 03:53, Kenneth Gonsalves wrote: On Wed, 2010-12-15 at 03:44 -0800, Piotr Zalewa wrote: It looks like the test can't find the /success/ URL and then tries to display a 404 error, but there is o 404.html template Do you have

Re: running projects on the back of a base URL and having issues with the homepage

2010-12-15 Thread W. Craig Trader
Here's how I solved this problem for my own applications. Note that I use VirtualEnv to ensure that each application gets exactly the Python environment I want it to have. If you don't use VirtualEnv, it will make the WSGI startup script simpler. Assume that my application is installed with the

template filter by foreignkey

2010-12-15 Thread refreegrata
Hello list. I have a question. Whit a model like this -- class Ghi(models.model): dat = models.IntegerField(unique =True) class Def(models.Model): ghis = models.ForeignKeyField(Ghi) class Abc(models.Model):

Re: Django-Facebook (yet another thread)

2010-12-15 Thread Martey
In my Facebook applications, I have used a combination of the official Python SDK and the official JavaScript SDK . The JavaScript SDK takes care of authentication, requesting permissions, and provi

Django comments moderation stopped working

2010-12-15 Thread Groady
Just wondering if anyone else is having problems with the Django Comments Framework, specifically with the moderation functionality stopping working. Recently the moderation functionality has stopped working and all comments are getting through without first being approved. I'm not 100% sure what

Strange Admin CSS Behaviour

2010-12-15 Thread Paul Childs
I'm trying to use the Django admin (on the dev server that comes with Django) for the latest stable version 1.2.3 on windows with Python 2.6. Functionally it works great. For some reason the styles do not render for the site admin page and my application admin page. The respective URLS are: http://

Re: Mailing list service written in Django?

2010-12-15 Thread Steven Clift
Thanks, we are quite bullish with GroupServer - much better web interface than Mailman and while people like the utility of Google Groups, GroupServer is customizable and you can control your group data. That said, since Django has come up in our new Neighborly work, the more we know about existin

Order a QuerySet by Method

2010-12-15 Thread josch
Hallo, I know, that the normal way to do that is to write the return value of the method to the foreign model, always when a model that affects the return value changes, and than order by that value of the model. But I have a model whoose objects gets a specific state after they are older than a

Re: Order a QuerySet by Method

2010-12-15 Thread Daniel Roseman
On Wednesday, December 15, 2010 1:34:15 PM UTC, josch wrote: > > Hallo, > > I know, that the normal way to do that is to write the return value of > the method to the foreign model, always when a model that affects the > return value changes, and than order by that value of the model. > > But I

Beginner Problem: I don`t get my view working

2010-12-15 Thread josch
Hallo, I don`t know what is wrong with my code, but I can not call a view in the urls.py of my site: I have an application hspoints. In the folder is a views.py. In will post a view files: settings.py of my Site: (...) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contentty

Re: Order a QuerySet by Method

2010-12-15 Thread josch
Thank you! On 15 Dez., 15:21, Daniel Roseman wrote: > On Wednesday, December 15, 2010 1:34:15 PM UTC, josch wrote: > > > Hallo, > > > I know, that the normal way to do that is to write the return value of > > the method to the foreign model, always when a model that affects the > > return value c

Re: No module named _md5

2010-12-15 Thread Cal Leeming [Simplicity Media Ltd]
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=%22No+module+named+_md5%22 That should help you figure out why it's not working :) Try and figure it out first, and if you can't figure it out then you might want to consider not using Python on Linux, because you will encounter many probl

Re: incrementing non primary keys.

2010-12-15 Thread Eric Chamberlain
If you are using a UUID for the primary key, do you really need an integer? We had a similar multi-tenant need and didn't want to leak usage information to the users, so we used UUID instead of auto incrementing integers. On Dec 15, 2010, at 9:23 AM, Hutch wrote: > Hi, > > I'm porting an old

Re: incrementing non primary keys.

2010-12-15 Thread Eric Chamberlain
If you are using a UUID for the primary key, do you really need an integer? We had a similar multi-tenant need and didn't want to leak usage information to the users, so we used UUID instead of auto incrementing integers. On Dec 15, 2010, at 9:23 AM, Hutch wrote: > Hi, > > I'm porting an old

Re: Beginner Problem: I don`t get my view working

2010-12-15 Thread bruno desthuilliers
On 15 déc, 16:05, josch wrote: > Hallo, > > I don`t know what is wrong with my code, but I can not call a view in > the urls.py of my site: > > I have an application hspoints. In the folder is a views.py. In will > post a view files: > > urls.py of my Site: > > from django.conf.urls.defaults impor

incrementing non primary keys.

2010-12-15 Thread Hutch
Hi, I'm porting an old php app and have run into a bit of an issue. The main problem is that we this app will need to be used by multiple different companies. While I could just setup discreet instances, I'm thinking that making the app multi-tenant would be a much wiser idea and easier on resourc

Re: Django-Facebook (yet another thread)

2010-12-15 Thread da.inter...@gmx.net
I had the same problems last weekend. This one here helped me a lot and is actually working: https://github.com/iplatform/pyFaceGraph The tricky thing is how to get the access_token (Aljosa mentioned the proper documentation). The graphdevtools-example-application under "test" is also helpful her

Django Forms and Javascript/Jquery Experienced Developer Wanted - Modal Dialog Contract Work

2010-12-15 Thread sstartup
Hello Django Developer Community, We are a New York-based start-up looking for a developer experienced with Django Forms and Javascript/Jquery for some multi-step modal dialog contract work. If you have experience in this area, and are interested, please do send us an email at efr...@gmail.com.

virtualenv and deployment

2010-12-15 Thread Álex González
Hi! I'm using virtualenv with --no-site-packages and now I like to do a deployment of my app... I'm using a sharing hosting, can I uypload all my enviroment dir (with the packages installed with pip) to the server and use them? What's the better way to the deployment? mod_python, mod_wsgi, perhap

Re: incrementing non primary keys.

2010-12-15 Thread Eric Chamberlain
If you are using a UUID for the primary key, do you really need an integer? We had a similar multi-tenant need and didn't want to leak usage information to the users, so we used UUID instead of auto incrementing integers. On Dec 15, 2010, at 9:23 AM, Hutch wrote: > Hi, > > I'm porting an old

Re: virtualenv and deployment

2010-12-15 Thread Piotr Zalewa
Better would be to create the requirements.txt and install directly on the server (pip install ir requirements.txt) I use mod_wsgi On 10-12-15 08:48, Álex González wrote: Hi! I'm using virtualenv with --no-site-packages and now I like to do a deployment of my app... I'm using a sharing hostin

Re: virtualenv and deployment

2010-12-15 Thread Piotr Kilczuk
Hi, > I'm using virtualenv with --no-site-packages and now I like to do a > deployment of my app... I'm using a sharing hosting, can I uypload all my > enviroment dir (with the packages installed with pip) to the server and use > them? > That won't necessarily work. Some packages need to be comp

Why might a Django admin form hang (or, how can I diagnose the problem)?

2010-12-15 Thread Michael Dippery
I have a model tied to the admin. Whenever I try to add a new model instance, or update an existing one, the form hangs while trying to submit. Nothing is written to the log files, though. The models are nothing fancy, so they don't have any custom validation that may be causing, e.g., and infin

Re: Controlling File Downloads.

2010-12-15 Thread Matteius
Please check the classcomm project for how to do this. We determined the best/fastest approach would be to use Apache mod_auth_token and generate secure URLs using a custom template tag. You can find code and instructions for how to do that @ http://classcomm.googlecode.com/ and across the Interne

A browser of tags (very difficult... unless for me)

2010-12-15 Thread marcoarreguin
Hi, I have a big problem, I'm doing a browser, but I'm using a lot of things kind itertools and pyparsing and combinations like nCm to combine tags and make a lot of search. I think the problem is about combining querysets to show one result. I'll show you the algorithm, this is my view, and as y

Re: virtualenv and deployment

2010-12-15 Thread W. Craig Trader
Alex ... In order to do a simple copy you'll need to make sure that: 1. You're using the exact same version of Python on the host as you use to develop. 2. Python is installed in exactly the same locations (host and local). 3. Your environment is located in the same locations (host an

Re: virtualenv and deployment

2010-12-15 Thread Ovnicraft
On Wed, Dec 15, 2010 at 11:48 AM, Álex González wrote: > Hi! > > I'm using virtualenv with --no-site-packages and now I like to do a > deployment of my app... I'm using a sharing hosting, can I uypload all my > enviroment dir (with the packages installed with pip) to the server and use > them? > >

Getting 'specified module cannot be found' error when synching model to DB

2010-12-15 Thread Charlie
I've set up a PostgreSQL/PostGIS spatial database, and created settings and model files for a new project. When I try to synch the model with the DB, I get the following error message (last lines only): File "c:\Python26\lib\ctypes\__init__.py", line 355, in __init__ self._handle = _dlopen(

Re: Mailing list service written in Django?

2010-12-15 Thread CLIFFORD ILKAY
On 12/14/2010 04:07 PM, Steven Clift wrote: Is there one? We use the Zope-based GPL http://GroupServer.org platform with good success, but we are interested in ways to connect it to possible future Django run sites. Colibri might be useful as an

Logging Handler AdminEmailHandler not working

2010-12-15 Thread Adrián Ribao
I get an error when using AdminEmailHandler. The error message is: __init__() takes at least 5 non-keyword arguments (2 given) is in django/django/utils/log.py in emit line 90: reporter = ExceptionReporter(request, is_email=True, *exc_info) where exc_info = () Is it a bug or I'm missing someth

Developing a search engine

2010-12-15 Thread marcoarreguin
I'm trying to make a search engine with my database, parsing de text that the user write in the textbox to make a list with the cleaned words, in just one table of the DB in the fields: title, descripcion and tags, I have something like this but I don't know how to finish it: from django.http imp

Developing a search engine

2010-12-15 Thread marcoarreguin
I'm trying to make a search engine with my database, parsing de text that the user write in the textbox to make a list with the cleaned words, in just one table of the DB in the fields: title, descripcion and tags, I have something like this but I don't know how to finish it: from django.http imp

Re: virtualenv and deployment

2010-12-15 Thread Álex González
Hi guys! Thanks for your replies! My hosting is a shared hosting and I think that I can only uses mod_python at the moment. I can load mod_wsgi from htaccess (I test it) but I can edit my virtualhosts or something similar... any trick to get mod_wsgi up&running? About the virtualenv as Piotr sai

Re: running projects on the back of a base URL and having issues with the homepage

2010-12-15 Thread Graham Dumpleton
On Wednesday, December 15, 2010 11:10:06 PM UTC+11, Craig Trader wrote: > > Here's how I solved this problem for my own applications. Note that I use > VirtualEnv to ensure that each application gets exactly the Python > environment I want it to have. If you don't use VirtualEnv, it will make

Re: __init__.py file executed twice ?

2010-12-15 Thread mart
Yes it seems usual referring to the blog post. So if the serveur restart, that's not a problem that the init are executed several times... With the mod_wsgi and apache where can I see the results of my "print" ? On 14-12-10 15:41, Brian Bouterse wrote: > Why do things get started twice in django

Re: virtualenv and deployment

2010-12-15 Thread keynesiandreamer
Wow very timely thread! I am trying to deploy on Dreamhost and struggling. They have a nice easy to build Django env, but getting my app running... thats been another matter. Thanks for asking Alex, and thanks for all the replies to this. Very informative. On Dec 15, 1:56 pm, Álex González wro

Unclear about my membership status

2010-12-15 Thread Charlie Shore
I am somewhat unclear about my membership status with the Django users group. I subscribed through Google Groups, and posted a message about two hours ago. I also received an email record of my post. However, I don't see my post listed yet; furthermore, when I go directly to the Django user grou

Re: Unclear about my membership status

2010-12-15 Thread Shawn Milochik
It looks like your earlier post made it in: http://groups.google.com/group/django-users/browse_thread/thread/3157104d4334a643 Also, (obviously), this post of yours showed up. I'd say you're properly a member. Shawn -- You received this message because you are subscribed to the Google Groups "

Confused about thread locals... again.

2010-12-15 Thread Doug Ballance
First, I'd like to find out if there is a better way than thread locals to do what I want to do. From what I can tell, it isn't possible any other way. Finally, I don't understand why my thread locals implementation/hack works - which scares me, so I would like to ask the wiser gurus out there f

Re: virtualenv and deployment

2010-12-15 Thread W. Craig Trader
Alex ... You're not going to be able to trick your host into loading mod_wsgi from an .htaccess file -- Apache doesn't allow the load directives in .htaccess files. While mod_python is not supported, and it has a large number of open issues, there aren't any specific security holes you really nee

Re: running projects on the back of a base URL and having issues with the homepage

2010-12-15 Thread W. Craig Trader
Graham ... I appreciate the criticism -- I had to build for both mod_python and mod_wsgi and there was some bleed through. - Craig - On Wed, Dec 15, 2010 at 17:11, Graham Dumpleton wrote: > > > On Wednesday, December 15, 2010 11:10:06 PM UTC+11, Craig Trader wrote: > >> Here's how I solved this

Re: Django-Facebook (yet another thread)

2010-12-15 Thread Justin Murphy
Facebook published a sample GAE application. The code is pretty straightforward and you can pretty much use the same concepts in your Django code. I would think that the signed request logic would work best in middleware. https://github.com/facebook/runwithfriends -Justin -- You received this m

Re: Developing a search engine

2010-12-15 Thread Sam Lai
On 16 December 2010 08:56, marcoarreguin wrote: > I'm trying to make a search engine with my database, parsing de text > that the user write in the textbox to make a list with the cleaned > words, in just one table of the DB in the fields: title, descripcion > and tags, I have something like this

Need Django open-source project for Classifieds website.

2010-12-15 Thread Rehmetjan
i want to build a classifieds website like Craigslist.com with Django, (or http://www.dubizzle.com/). anybody knows where can I find it? or suggest.. thanks all. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Unclear about my membership status

2010-12-15 Thread Kenneth Gonsalves
On Wed, 2010-12-15 at 18:18 -0500, Shawn Milochik wrote: > It looks like your earlier post made it in: > > http://groups.google.com/group/django-users/browse_thread/thread/3157104d4334a643 > > Also, (obviously), this post of yours showed up. I'd say you're > properly a member. looks like it --

Re: running projects on the back of a base URL and having issues with the homepage

2010-12-15 Thread Graham Dumpleton
'Criticism' is such a negative sounding word. :-( On Thursday, December 16, 2010 10:59:15 AM UTC+11, Craig Trader wrote: > > Graham ... > > I appreciate the criticism -- I had to build for both mod_python and > mod_wsgi and there was some bleed through. > > - Craig - > > On Wed, Dec 15, 2010 at 1

Re: Developing a search engine

2010-12-15 Thread Christophe Pettus
On Dec 15, 2010, at 5:57 PM, Sam Lai wrote: > If you're using MySQL, Django can interface with its FTS component - > http://docs.djangoproject.com/en/dev/ref/models/querysets/#search PostgreSQL also has a very good built-in full text search function. You'll need to write a tiny bit of raw SQL,

Re: newbie problem with accepting form input

2010-12-15 Thread john doe
On Wed, Dec 15, 2010 at 3:06 AM, Jer-ming Lin wrote: > it seems the name conflict is the real problem. maybe you can use > "Form Prefix" > http://docs.djangoproject.com/en/1.2/ref/forms/api/#prefixes-for-forms > to differentiate the fields between the Report and Incident Form. > Sorry i can not h

Re: Confused about thread locals... again.

2010-12-15 Thread W. Craig Trader
I think that the correct solution for your problem would be, instead of hacking around with the template path on the fly like this, to instead write a template loader for your application, and apply the logic you need within the template loader itself. See: http://docs.djangoproject.com/en/dev/ref

Re: Getting 'specified module cannot be found' error when synching model to DB

2010-12-15 Thread W. Craig Trader
It sounds like you have a Windows and/or Python path problem. The DLL that's being loaded (kernel32.dll?) isn't on the Windows path (or in the Python lib directory) when Python is attempting to load it. Certainly nothing to do with Django. What version of Python are you using? - Craig - On Wed

problem with multiple Foreignkeys in ModelForm

2010-12-15 Thread Patrick
I'm getting the following error: annot assign "": "Bid.bidder" must be a "Bidder" instance. #classes class Listing(models.Model): owner = models.ForeignKey(User, verbose_name=_('Im the wanter')) title = models.CharField(_('short description'), max_length=255) class Bidder(models.Model):

Re: Confused about thread locals... again.

2010-12-15 Thread ringemup
I faced this problem, and ran into the issue that the request object is not passed to the template loader, so there's no way to get your domain from within a custom template loader without using threadlocals. What I did instead was as follows: 1) Write a custom render-to-response type function t

Re: incrementing non primary keys.

2010-12-15 Thread Hutch
Yes, the integer is needed, it's part of the spec. It's used for job numbering. the problem being, they need not only an integer, but each tenant needs sequential numbers. if it was up to me, I would just remove it. On Dec 15, 10:59 am, Eric Chamberlain wrote: > If you are using a UUID for the p