Re: django-simple-multitenant

2013-07-03 Thread Nigel Legg
Mario, I am not sure what you mean here. I want users to be able to upload data to the site, and do various things with it. I want each user to only see the data they have uploaded. Whether this is domain.com/uer_account or user_account.domain.com I don't know, so long as it provides the function

Django admin automatically adding slash to a URL field after update

2013-07-03 Thread ecasbas
Hi, I have this issue wit the admin interface: I try edit manually a register, I change some values and when I save the data, the URL field, which I have no modifed, become automatically with a slash append at the end. This issue is causing inconsistencies due to I normalize each URL before sa

Re: Python Fabric manage.py problem

2013-07-03 Thread Roger Barnes
It looks like you may be missing a space after the word "source". My fabfile has these helpers, given an env.virtualenv and env.app_dir setting... def ve_run(command, func=run, base_dir=None, *args, **kwargs): base_dir = base_dir or env.app_dirwith cd(base_dir):with prefix("sou

Re: django dynamic template tag

2013-07-03 Thread Fadi Samara
Hi Fred, its already included at the start of the template to load all plugin tags {% load slider ...%} Thanks, On Wednesday, July 3, 2013 11:00:31 PM UTC+10, Fred Stluka wrote: > > Fadi, > > You need to {% load %} the file that defines the tags. > > --Fred > -- >

Re: django dynamic template tag

2013-07-03 Thread Fadi Samara
its already included at the start of the template to load all plugin tags {% load slider ...%} Regards, Fadi Samara. On Wed, Jul 3, 2013 at 11:00 PM, Fred Stluka wrote: > Fadi, > > You need to {% load %} the file that defines the tags. > > --Fred > -- > Fred Stluk

Re: Django 1.5 runserver hangs in Chrome

2013-07-03 Thread Nikolas Stevenson-Molnar
Also, while Chrome is spinning, I can open Firefox and load pages (including the problem page) just fine. So it's not that the server is overloaded or anything like that... _Nik On 7/3/2013 5:39 PM, Nikolas Stevenson-Molnar wrote: > I've just updated to Django 1.5 and am running into a problem wh

Django 1.5 runserver hangs in Chrome

2013-07-03 Thread Nikolas Stevenson-Molnar
I've just updated to Django 1.5 and am running into a problem when using Chrome with the Django devlopment server (and staticfiles). One particular page which loads a lot of static content /consistently/ hangs in Chrome (works fine in Firefox). This seems similar to two resolved issues: https://cod

Re: django-simple-multitenant

2013-07-03 Thread Mario Gudelj
Depends what you need. Do you want to have users access data via www.domain.com/user_acccount/ or http://user_account.domain.com? If it's www.domain.com/user_acccount/ just foreign key your models to user model and in your queries always include user as a filter. The other option is somewhat harder

Re: Exception Value: Reverse for 'vote' with arguments '('',)' and keyword arguments '{}' not found.

2013-07-03 Thread Pepsodent Cola
I think I know what the problem is with the Django 1.5 tutorial. https://docs.djangoproject.com/en/1.5/intro/tutorial04/#amend-views Both these classes are missing the "context_object_name" thingy, which links to the templates. class DetailView(generic.DetailView): class ResultsView(generic.Deta

Re: Exception Value: Reverse for 'vote' with arguments '('',)' and keyword arguments '{}' not found.

2013-07-03 Thread Pepsodent Cola
1.) Well I took the working *"class Poll"* version and changed much into *"class Polly_bird"* instead to see if the underscore business was indeed causing me this problem. 2.) So I deleted the database. 3.) And edited this file *"/mysite/polls/urls.py"*. urlpatterns = patterns('', ... ...

Re: Python Fabric manage.py problem

2013-07-03 Thread Sithembewena Lloyd Dube
I had a similar issue - running manage.py through Fabric simply didn't pan out - even after following the Fabric documentation. Also tried the --noinput switch with no luck? I do not have a ready answer right now, but I do intend to look into this. I am sure it has (and is being) done plenty times

Re: Advice on creating an SFTP frontend in Django

2013-07-03 Thread Adnan Sadzak
Hi Paul, does all users have/need their own SFTP account on server? If not, You can mount remote SFTP folder on web server and control access to folders via django. Cheers, Adnan On Wed, Jul 3, 2013 at 9:43 PM, Paul Hudson wrote: > Hi, > > I have successfully used django-storages ( > http://d

Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-07-03 Thread Peter Sagerson
I took part of this conversation offline to spare the list from the gory details, but the upshot was that verifying an OTP is logically a mutating operation on the verifying device, and thus is not really valid on an unsaved model object. I posted an update to the documentation to clarify. Ther

Re: Does django have something similar to resource in rails?

2013-07-03 Thread Nick Apostolakis
Check out the Rest apis (tastypie etc ) they should be what you are looking for Στις 03 Ιουλ 2013 11:03 μ.μ., ο χρήστης "gabby gabriel" < gabbyha...@gmail.com> έγραψε: > I just started learning django. I was a rails developer before that. I was > wondering if there is anything similar to resource

Does django have something similar to resource in rails?

2013-07-03 Thread gabby gabriel
I just started learning django. I was a rails developer before that. I was wondering if there is anything similar to resource in rails in django? Or do I have to make different urls and corresponding views for those urls? Thanks in advance! -- You received this message because you are subscrib

Advice on creating an SFTP frontend in Django

2013-07-03 Thread Paul Hudson
Hi, I have successfully used django-storages ( http://django-storages.readthedocs.org/en/latest/index.html) and paramiko directly to log into an SFTP server and list a directory. My end goal is to make a simple Client Area that allows the downloading of files hosted on SFTP. I am open to any

Re: Inserting String from Visual Basic Express 2010 to Django SQLite3 Database

2013-07-03 Thread Nikolas Stevenson-Molnar
This might be helpful: http://zetcode.com/db/sqlitevb/ _Nik On 7/3/2013 12:08 PM, hiQ wrote: > I've been able to configure my Visual Basic Express 2010 to read > strings from certain measurement equipment. I also found a very cool > youtube video (http://youtu.be/Z3j-7309ITc ) which shows how dat

django create_without_commit method

2013-07-03 Thread surya
We just found a small bug regarding Django Transactions. Our code were using objects.create_without_commit() method!! I just added missing Transactions middleware and it all seems to work amazing now without actually editing the way models work.. Is this a known method? used in transactions and p

Inserting String from Visual Basic Express 2010 to Django SQLite3 Database

2013-07-03 Thread hiQ
I've been able to configure my Visual Basic Express 2010 to read strings from certain measurement equipment. I also found a very cool youtube video (http://youtu.be/Z3j-7309ITc ) which shows how data can be added to Microsoft SQL table. Problem is I am stubborn and refuse to use Microsoft propr

Re: Django, python, MYSQL, Eclipse3.7

2013-07-03 Thread Rafael E. Ferrero
just import one model into another using import statement. 2013/7/3 Branko Majic > On Wed, 3 Jul 2013 05:03:35 -0700 (PDT) > Vamsi Popuri wrote: > > > I have 2 projects. They are* project 1* and *project 2*. > > > > *Project 2* has > > *models.py* > > class Address(models.Model): > > Str

Re: Returning data from view to ajax call

2013-07-03 Thread Larry Martell
On Wed, Jul 3, 2013 at 10:01 AM, C. Kirby wrote: > I'm sorry, I was typing without thinking. > render_to_string() if you want to use a template without headers > render_to_response() includes headers > > HttpResponse(json.dumps(data_object)) should be what you want. > > It would also be helpful to

Re: Returning data from view to ajax call

2013-07-03 Thread C. Kirby
I'm sorry, I was typing without thinking. render_to_string() if you want to use a template without headers render_to_response() includes headers HttpResponse(json.dumps(data_object)) should be what you want. It would also be helpful to see the code for your view. It looks like you already put th

Re: Returning data from view to ajax call

2013-07-03 Thread Larry Martell
On Wed, Jul 3, 2013 at 9:30 AM, C. Kirby wrote: > An HttpResponse includes http headers and will blow up an ajax call. > You want to use a render_to_string method and pass either json or a rendered > template (render to string bypasses the headers, render to response will > include them) I don't

Re: Returning data from view to ajax call

2013-07-03 Thread C. Kirby
An HttpResponse includes http headers and will blow up an ajax call. You want to use a render_to_string method and pass either json or a rendered template (render to string bypasses the headers, render to response will include them) On Wednesday, July 3, 2013 8:14:06 AM UTC-5, larry@gmail.co

Re: Embedded documents doubts

2013-07-03 Thread Amirouche Boubekki
This is a mongodb database design issue, please forward your question to mongodb user mailling list. AFAIK, it only makes sens if the contact is used nowhere else. 2013/7/2 Hélio Miranda > Hi > I have an application in Django-Tastypie and MongoDB, where I have to > enter a club, that club can

Re: Missing peice before best practises

2013-07-03 Thread Amirouche Boubekki
2013/7/1 Sayth Renshaw > > > On Monday, July 1, 2013, Tom Evans wrote: > >> On Mon, Jul 1, 2013 at 11:37 AM, Sayth Renshaw >> wrote: >> > Is that good though? >> > >> > Barring 2 scoops there is no new material to recognise and guide users >> to >> > the new features of Django and to get beginne

alternate to gunicorn

2013-07-03 Thread Kakar Arunachal Service
Hi, If i was to use nginx in windows, is ther any alternate to Gunicorn for windows environment. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-

Re: Custom Authentication

2013-07-03 Thread adroit . goose
Thank you :-) On Wednesday, July 3, 2013 2:47:15 PM UTC+2, Odin wrote: > > You can extend the User Model: > https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model > > > 2013/7/3 > > >> Hello, >> >> I am a newbie to Django and would wish to know if it poss

PyCon APAC CFP

2013-07-03 Thread Ian Lewis
Hey Django users! I wanted to get the word out that we are accepting talks for this year's PyCon APAC in Tokyo Japan. If you have ever wanted to visit Tokyo and you have a Python topic you are passionate about then this is your chance! The conference is formatted into 4 tracks, 2 Japanese and 2 E

Re: Exception Value: Reverse for 'vote' with arguments '('',)' and keyword arguments '{}' not found.

2013-07-03 Thread Bill Freeman
Are you sure that you changed *everything*, including the database tables? On Wed, Jul 3, 2013 at 9:21 AM, Pepsodent Cola wrote: > I changed everything related to Model "class Citizen_voice" back to "class > Poll" and now everything works with "Generic views" usage. > Don't understand why my det

Writing Form Tests

2013-07-03 Thread Cody Scott
I am trying to extend the polls tutorial code to use a django form with tests. I created this form, but ran into some issues when trying to test it. When looking up how to test it, I found this form from http://toastdriven.com/blog/2011/apr/17/guide-to-testing-in-django-2/ It also had tests.

Re: Error when loading application server

2013-07-03 Thread Hélio Miranda
my url is: http://onpitch-dev.life-emotions.local/onpitch/api/v1/Game and my class is like this: *class Game(mongoengine.Document):* *result = StringField()* *date = DateTimeField()* *hour = DateTimeField()* *stops = IntField()* *total_time = IntField()* *lost_time = IntFie

Re: Exception Value: Reverse for 'vote' with arguments '('',)' and keyword arguments '{}' not found.

2013-07-03 Thread Pepsodent Cola
I changed everything related to Model "class Citizen_voice" back to "class Poll" and now everything works with "Generic views" usage. Don't understand why my detail.html template will only accept the variable "poll.id"? On Wednesday, July 3, 2013 12:39:18 PM UTC+2, Pepsodent Cola wrote: > > I

Re: Returning data from view to ajax call

2013-07-03 Thread Larry Martell
On Tue, Jul 2, 2013 at 5:39 PM, Larry Martell wrote: > On Tue, Jul 2, 2013 at 5:24 PM, Sanjay Bhangar > wrote: >> On Tue, Jul 2, 2013 at 4:20 PM, Larry Martell >> wrote: >>> >>> On Tue, Jul 2, 2013 at 5:14 PM, Sanjay Bhangar >>> wrote: >>> > On Tue, Jul 2, 2013 at 4:01 PM, Larry Martell >>> >

Re: Django, python, MYSQL, Eclipse3.7

2013-07-03 Thread Branko Majic
On Wed, 3 Jul 2013 05:03:35 -0700 (PDT) Vamsi Popuri wrote: > I have 2 projects. They are* project 1* and *project 2*. > > *Project 2* has > *models.py* > class Address(models.Model): > Street = models.CharField(max_length=50) > pin = models.CharField(max_length=20) > > *forms.py

Re: django dynamic template tag

2013-07-03 Thread Fred Stluka
Fadi, You need to {% load %} the file that defines the tags. --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: With

Re: Custom Authentication

2013-07-03 Thread Sandro Dutra
You can extend the User Model: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model 2013/7/3 > Hello, > > I am a newbie to Django and would wish to know if it possible to use the > authentication scheme(from django.contrib import auth) on a custom mad

Re: Error when loading application server

2013-07-03 Thread Tom Christie
Hi Helio, Something somewhere is expecting an integer but receiving an empty string instead. This could be the result of a missing component in the URL eg `http://example.com/users//`, or a field in a JSON or form data request that's missing a value, eg: { "score": "" ... } Hope that hel

Django, python, MYSQL, Eclipse3.7

2013-07-03 Thread Vamsi Popuri
I have 2 projects. They are* project 1* and *project 2*. *Project 2* has *models.py* class Address(models.Model): Street = models.CharField(max_length=50) pin = models.CharField(max_length=20) *forms.py * class Address(forms.Form): .. My question is, In *project 1* i wanna

django-simple-multitenant

2013-07-03 Thread Nigel Legg
I am building an app to, among other things, allow people to upload data files and carry out various analyses online. I would like each user to only see the datafiles that they or members of their team (company, research team, etc) have uploaded. It seems that django-simple-multitenant

Error when loading application server

2013-07-03 Thread Hélio Miranda
Hi I have a Django application, I am using the tastypie too. What happens when meth is my application server, I get this error on a page: *"error_message": "invalid literal for int() with base 10: ''"* Someone can explain me why? What do I fix? -- You received this message because you are sub

Re: can we pass objects in template tags

2013-07-03 Thread Tom Evans
On Tue, Jul 2, 2013 at 11:24 PM, surya wrote: > I would like to pass object into template tag, then process it.. Is it > possible > > def my_tag(parser, token): >return Node() > > The token object seems to be a string!! but how to get some objects?? > https://docs.djangoproject.com/en/1.5/how

Extending Django Admin functionality

2013-07-03 Thread adroit . goose
Hello, I am a newbie to Django and would like to know if the functionality of Django admin can be extended to my own needs. If it is possible, is it a good idea extend the functionality or start from scratch. Is there any good documentation for the same?. Than

Custom Authentication

2013-07-03 Thread adroit . goose
Hello, I am a newbie to Django and would wish to know if it possible to use the authentication scheme(from django.contrib import auth) on a custom made 'Company_user' table. I don't want to use the default User object provided by Django admin as the fields in the custom table are different. How

Re: can we pass objects in template tags

2013-07-03 Thread Christian Erhardt
Maybe this will help you? http://stackoverflow.com/questions/6400557/how-can-i-pass-objects-to-a-custom-django-template-tag-i-figured-out-a-way-but A Filter will support objects, don't use template tags. Am Mittwoch, 3. Juli 2013 00:24:55 UTC+2 schrieb surya: > > I would like to pass object int

Re: Exception Value: Reverse for 'vote' with arguments '('',)' and keyword arguments '{}' not found.

2013-07-03 Thread Pepsodent Cola
I just double checked. A month ago I followed the Django Polls tutorial to the point and all of the above worked. But the second time I followed the Polls tutorial I used different Model names such as *"class Citizen_voice(models.Model)"* instead of the tutorials table name. class Poll(models

Re: nginx and apache

2013-07-03 Thread Kakar Arunachal Service
Thanks Rafael! On Wed, Jul 3, 2013 at 12:08 AM, Rafael E. Ferrero wrote: > https://code.djangoproject.com/wiki/DjangoAndNginx > http://wiki.nginx.org/DjangoFastCGI > > its a start. ;) > > > 2013/7/2 Kakar Arunachal Service > >> Can you please suggest any good tutorial regarding this. And i'm o

Re: Form validation vs. DRY

2013-07-03 Thread Roman Klesel
2013/7/3 Tomas Ehrlich : > you can use model validation > https://docs.djangoproject.com/en/dev/ref/models/instances/#validating-objects This sounds very good! :-) Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: Form validation vs. DRY

2013-07-03 Thread Tomas Ehrlich
Hi Roman, you can use model validation https://docs.djangoproject.com/en/dev/ref/models/instances/#validating-objects It works similar to form validation. After, when you create ModelForm, it will take validation rules from model. All these validations should be called outside save() Cheers,

Form validation vs. DRY

2013-07-03 Thread Roman Klesel
Hello, I'm programming a database front end. In many cases I want to constrain the data written to the database. Therefore I implement some checks either through real database constraints or trough some logic in the model, so it will throw an exception when the constraints are not met. e.g.: uniq

Re: Integrating Django with Trac

2013-07-03 Thread saintger
Le mardi 2 juillet 2013 18:37:27 UTC+2, sain...@gmail.com a écrit : > > Hello, > > I would like to make a website with Django and manage the issues with Trac. > I can see that the Django website currently do the same (so it must be a > good idea !). > > I've found the following thread: > https://g

Problem with staticfiles

2013-07-03 Thread Andreas Kuhne
Hi all, I am trying to CachedStaticFilesStorage to work in our environment. I have been able to configure all of the settings, and am able to copy all static files (we have alot of them) to the correct location. However when the postprocessing starts and the MD5 hashes are being calculated it fail