Re: sending email

2015-02-02 Thread monoBOT
2015-02-02 6:51 GMT+01:00 sum abiut : > > to_emails = [a.admins.all()] ​You are asking for item admins here: to_emails = [a.admins.all()] ​ -- *monoBOT* Visite mi sitio(Visit my site): monobotsoft.es/blog/ -- You received this message because you are subscribed to the Google Groups "Dja

Re: Django Auth\Auth

2015-02-02 Thread Mario Gudelj
Here's the link to docs https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#specifying-a-custom-user-model which will guide you through that. On 2 February 2015 at 14:30, Ajay M wrote: > Hi, > I'm a new bee to Django, I need to use signup/login facilities in my > project > How do I cu

Re: Save one to one field manually

2015-02-02 Thread Paul Royik
I solved the problem. See http://stackoverflow.com/questions/28262236/saving-onetoone-field-manually-in-django -- 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 d

Possible bug in prefetch_related used with Reverse generic relations

2015-02-02 Thread Todor Velichkov
Hi, guys. About a week ago i asked the same question on stackoverflow. Since i got no response there i started to read how to report a bug

PermissionError with open()

2015-02-02 Thread John
Hello everyone, I am trying to run this code inside view.py, to make PDF file able to be downloaded : > import os > BASE_DIR = os.path.dirname(os.path.dirname(__file__))def > download(request, file_name = 'article1'): > file = open(os.path.join(BASE_DIR, > 'media').replace('\\','/'

ListView and Deleteview

2015-02-02 Thread elcaiaimar
Hello everybody, I'm working in a website using django. I would like that users could select and delete data introduced for them. I've found some information on the web and it seems that the ListView and DeleteView is what I need. However, when I try to do a ListView, it doesn't work and I don'

Re: PermissionError with open()

2015-02-02 Thread Vijay Khemlani
Your call to ".format(file_name)" does nothing as the original string does not have the positional arguments ("{0}" for example) You could just append the filename with "+". On Mon, Feb 2, 2015 at 3:32 AM, John wrote: > Hello everyone, > > I am trying to run this code inside view.py, to make

Securing Browseable API & Mocking Models

2015-02-02 Thread Ari King
Hi, In the last couple of days I started experimenting with Django and Django Rest Framework. Using the excellent documentation and ViewSets I was able to create a PoC API in a very short time. I was also able to add Django Rest Swagger for

Re: ListView and Deleteview

2015-02-02 Thread Giuseppe Saviano
> views.py: > > def PozoList(ListView): > model = Pozo > template_name = 'cuencas/edicioncuenca.html' > Is your view a function or a class? -- $ gpg --recv-key da5098a7 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

Re: Securing Browseable API & Mocking Models

2015-02-02 Thread Tom Christie
Hi Ari, It looks like Django REST swagger has an `is_admin` flag you can use... http://django-rest-swagger.readthedocs.org/en/latest/settings.html#is-superuser You'll probably also want to disable the browsable API by removing it from the 'DEFAULT_RENDERER_CLASSES' key in the 'REST_FRAMEWORK' s

Re: ListView and Deleteview

2015-02-02 Thread elcaiaimar
Soory, it's a class, but it doesn't work properly neither. Do I have to introduce anything in urls.py? I haven't put anything because I want the listview in a url already created. El lunes, 2 de febrero de 2015, 13:29:53 (UTC+1), elcaiaimar escribió: > > Hello everybody, > > I'm working in a web

funciton GDALAllRegister not found, django 1.8a release on windows

2015-02-02 Thread mattxbart
Hi all, I had a working 1.7.4 (using geodjango) on windows 7 install, no issues. I'm using osgeo4w to manage all the gdal/gis libraries. When I install the django 1.8a release or off git master, I get the following traceback: $ ./manage.py shell Traceback (most recent call last): File "./manag

Re: ListView and Deleteview

2015-02-02 Thread Dan Gentry
This is a bit of a stumper! I don't see any big glaring issues. A couple of housekeeping things: Is there data in the table? Are you certain that you are using the correct template? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc

Re: ListView and Deleteview

2015-02-02 Thread Vijay Khemlani
Hmmm... Try and post your urls.py and views.py (the correct one) On Mon, Feb 2, 2015 at 5:20 PM, Dan Gentry wrote: > This is a bit of a stumper! > > I don't see any big glaring issues. A couple of housekeeping things: Is > there data in the table? Are you certain that you are using the correct

Re: ListView and Deleteview

2015-02-02 Thread James Schneider
You've defined your class-based view as a function: def PozoList(ListView): You should be defining it as a class: class PozoList(ListView): And you should be calling the to_view() method for the PozoList class from your urls.py. Please post your urls.py and any traceback and error messages you

Migrating to initial migration: "ORA-00955: name is already used by an existing object"

2015-02-02 Thread Carsten Fuchs
Dear Django developers, in a Django project that was created pre-1.7, did not use South before, and was recently upgraded to Django 1.7 and is otherwise fine, I'm now trying to convert it to use migrations, following the docs at

Re: Migrating to initial migration: "ORA-00955: name is already used by an existing object"

2015-02-02 Thread Markus Holtermann
Hey Carsten, Did you see the chapter at the end of the page you linked to: Upgrading from South: https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south 1. Make sure the database schema defined by your models (and Django migrations) exactly matches the one in the database

JOB: Django backend dev for awesome Internet of Things project

2015-02-02 Thread Abraxas Entirely
Hi all, I'm looking for an experienced Django dev to help work on our backend for a really interesting hardware+software platform. The company is RAB Lighting, sorry the link says "stealth," the product is not launched yet and there's only so much I can say publicly now. I know that's sort of

Re: simple friends template help

2015-02-02 Thread Pawan Kumar
Hi Justin, I'm relatively new to django and while using the django simple friend app i have bumped into the same issue as you. I do not know how to tie back the views to templates so the results are visually appreciated. would you be able to help me out? I want to see a template or page say

Re: Migrating to initial migration: "ORA-00955: name is already used by an existing object"

2015-02-02 Thread Carsten Fuchs
Hi Markus, thanks for your reply! Am 02.02.2015 um 22:59 schrieb Markus Holtermann: Did you see the chapter at the end of the page you linked to: Upgrading from South: https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south Well, yes, but I'm *not* upgrading from South

Re: sending email

2015-02-02 Thread sum abiut
Hi James, if you have a look at my view.py code below. i am trying to send email to a selected user that i have select to update that particular user using a form. The updated part is working fine now, i can update the particular row that i have selected. what i want to do next is to email that pa

Re: sending email

2015-02-02 Thread sum abiut
Hi James, I manage to fixe my email issue. Basically what i am trying to do here is to get the app to send an email to the a leave applicant when his/her leave is approved by the department director and at the same time update the data on the databases. Here is my working view.py code for future r

Create User method for Custom Manager Django

2015-02-02 Thread Max Nathaniel Ho
Hi all, I am following this tutorial ( http://musings.tinbrain.net/blog/2014/sep/21/registration-django-easy-way/) to create a user registration model in Django. I understand that the class UserManager is overwriting the default User model. However, I do not understand this particular part.

Re: sending email

2015-02-02 Thread James Schneider
Oh, I see what you are trying to do. It looks like you are running needless queries though. Your newleave model has this: username =models.ForeignKey(User, default =1) That's an FK to User, which means this line in your view: to_emails = [u.email for u in User.objects.filter(username_

Re: sending email

2015-02-02 Thread sum abiut
Hi James, Thanks very much for clearing things up. I appreciate every bit of information and help from you. I have learn a lot since i have join this mailing list. I am pretty much new to Django and i appreciate every help and support that you guys are giving. It helps heaps. i will follow your dir

Re: upload_to for ImageField changes name of file being uploaded

2015-02-02 Thread bradford li
There is bounty on this stackoverflow question is anyone is interested On Thursday, January 29, 2015 at 12:35:22 AM UTC-8, bradford li wrote: > > I posted a question on stackoverflow regarding my issue: > > > http://stackoverflow.com/questions/28205560/upload-to-value-changes-photo-name-attribute

two django sites at different revisions with apache

2015-02-02 Thread Mike Dewhirst
Is it possible to run two virtual hosts on the same machine for Django sites where one is 1.7 and the other 1.6? Thanks Mike -- 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, sen