Re: Multiple Profiles in Django 1.11

2017-04-18 Thread Camilo Torres
Hi, I think you can use the default authentication system and create 2 different groups: 'students' and 'teachers', give 'students' group permissions to all the parts of the application for students; similarly, give the 'teachers' group permissions to all the parts of the teachers

Re: Meu site esta com problema com decode messagem erro AttributeError at str object has no atribute 'decode' sera alguem pode me ajudar?

2017-04-18 Thread Camilo Torres
Hi, You have not pasted enough information for me to know the error. You can paste the entire stack trace (as text, no need for a screen shot), or even better, if you have access to the server logs (django logs), you can see the entire stack trace there. You can also paste the relevant code if

Re: take select request from django from

2017-04-18 Thread Camilo Torres
Hi, I think you can do what you need with your current model and form and using FormSets, but then you should change your view and template: https://docs.djangoproject.com/en/1.11/topics/forms/formsets/ On Sunday, April 16, 2017 at 3:41:04 PM UTC-4, Xristos Xristoou wrote: > > hello i have

Re: Mysql/Models

2017-04-18 Thread Camilo Torres
Hi, You can use a Meta class for your models and add a db_table property to control the table name related to the model, that way, you can name your model as you like (and differently from the DB table name). You can also use the db_column parameter to Fields to control the name of the column

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-18 Thread Camilo Torres
Hi, May be you can create a new Serializer, including a ListField to get multiple seat IDs: class ManyMovieTicketsSerializer(serializers.Serializer): show = serializers.IntegerField user = serializers.IntegerField seats = serializers.ListField(child=serializers.IntegerFields)

Re: safe perfect and reliable app for verification email

2017-04-15 Thread Camilo Torres
Hi, Here are some: https://www.google.com/search?q=django+email+verification On Saturday, April 15, 2017 at 8:22:21 AM UTC-4, shahab emami wrote: > > hello > I want to verify user's email while user is registering . > > can you introduce me a few safe perfect and reliable app for verification

Re: Automatic reverse migrations

2017-04-15 Thread Camilo Torres
Hi, May both of you try to implement "blue-green deployments", and switch only if all tests are OK. You may also be interested in running a test deployment in a testing environment prior to production. Don't know of a solution integrated into django. On Friday, April 14, 2017 at 2:26:51 PM

Re: Activating VirtualEnv on Windows

2017-04-15 Thread Camilo Torres
Hi. Try to run the .bat. May be it is a documentation error? On Friday, April 14, 2017 at 2:04:42 PM UTC-4, Lorenz Schümann wrote: > > Hey, newbie here. > I've followed the instructions on > https://docs.djangoproject.com/en/1.11/intro/contributing/ regarding > Virtualenv. And at the point

Re: getting error "Project matching query does not exist."

2017-04-15 Thread Camilo Torres
Hi, I agree with Ludovic in "your application may be badly installed". But it is very hard to tell what is going wrong without actually knowing what your app should show (what view function) for URL path /brickly/home I cannot tell you what view is that without knowing about your code nor your

Re: Permissions in views

2017-04-15 Thread Camilo Torres
Hi, Confirmed with Django 1.11, Python 3.4.3. I strongly think this is a case you can report in bug tracker. Please tell if you will do. I have been trying to find some time to test this since I read your message. On Wednesday, April 12, 2017 at 4:12:30 AM UTC-4, Meiyer wrote: > > Just yesterday

Re: getting error "Project matching query does not exist."

2017-04-11 Thread Camilo Torres
Hi 1) How did you solved the first issue? You should be supposed to solve it by adding a row to a database table (the one related to your Project model) with id=1. 2) You have not pasted enough information for your ValidationError issue, please don't paste screen shots (at least, not only a

Re: form wizard

2017-04-11 Thread Camilo Torres
Hi, What is "form wizard"? Can you provide a link or an explanation, example? On Tuesday, April 11, 2017 at 9:29:39 AM UTC-4, Pranay Verma wrote: > > Hi > Is there any way to use form wizard in Django 1.10 ao above > -- You received this message because you are subscribed to the Google Groups

Re: Django relationships and the admin page

2017-04-11 Thread Camilo Torres
Hi, Seems you need here admin inlines, these allow you to insert/edit related objects inline when editing the main object. For example, when editing a Site, you will be able to also edit Images and Locations, though it only supports 1 level, so with default configuration you may probably not be

Re: New to django and ORM. So a basic question about data inserts

2017-04-11 Thread Camilo Torres
Hi, Lets suppose we simplify your problem and we have these 2 django models: from django.db import models class Person(models.Model): name = models.CharField(max_length=255, null=False, blank=False) def __str__(self): return self.name class Residence(models.Model): address

Inheritance models from Django 1.8.2 to Django 1.11

2017-04-10 Thread Camilo Torres
Hi, May be you can define your field usind "db_column": manufact = models.ForeignKey(Manufacture, verbose_name=u'Manufacture', db_column='manufacture') https://docs.djangoproject.com/en/1.11/ref/models/fields/#db-column -- You received this message because you are subscribed to the Google

using HTTPHandler cause Django server side shows http 400 and Invalid HTTP_HOST header message

2017-04-10 Thread Camilo Torres
Hi, Try with this configuration instead: _TARGET = 'http://192.168.8.100:8000' Notice you missed http:// there. -- 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

Yet Another Can't get static files to show up in shared linux website on Godaddy

2017-04-10 Thread Camilo Torres
Hi You may want to review: https://docs.djangoproject.com/en/1.11/howto/static-files/deployment/ You may also want to make sure your server supports wsgi deployments: https://docs.djangoproject.com/en/1.11/howto/deployment/ -- You received this message because you are subscribed to the Google

what do i have to do first

2017-04-10 Thread Camilo Torres
Hi, Read the First Steps section: https://docs.djangoproject.com/en/1.11/ -- 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

Re: How i can hide statements {% IF hide %} on html template ... also {{ model.name }}

2017-04-09 Thread Camilo Torres
Can you show an example of one of these templates and the corresponding view? On Sunday, April 9, 2017 at 1:41:27 PM UTC-4, ZS ELECTRONICA wrote: > > Hello > > > I have a problem, i have a page with backbone + jquery+bootstrap+css, with > templates but , i don't now why when i see the "source

Re: Django Music streaming

2017-04-08 Thread Camilo Torres
Hi, you forgot to include the error you get and probably other relevant information. You may be interested in reading these articles: https://developer.jboss.org/wiki/HowToAskAForumQuestion?_sscc=t https://www.biostars.org/p/75548/ On Saturday, April 8, 2017 at 12:38:57 PM UTC-4, IaMtheMcee

Re: Binding data to one o many forms from one view - BadHeaderError at - Header values can't contain newlines ()

2017-04-08 Thread Camilo Torres
Hi, Inside your "post" method, you have this line: context = super(AccountProfilesView, self).post(request, *args, **kwargs) in that case "context" is a HttpResponse object[0]. May be, from the name you use for the variable, you think this is a simple dict as those used to pass context to

Re: Filter list dict in JsonField Postgres

2017-04-08 Thread Camilo Torres
Hi. I have been thinking more about this. I think you cannot filter the list in the query with the JSONField from django. At most, you can get the object and filter the field in the resulting list. Example with this simple model: from django.db import models from django.contrib.postgres.fields

Re: Filter list dict in JsonField Postgres

2017-04-06 Thread Camilo Torres
Hi, What is JSONField? Is it part of Django or from a third party package? On Monday, April 3, 2017 at 10:34:18 AM UTC-4, Martin Peveri wrote: > > Hi, I have this model: > > class ItemCampaign(models.Model): > >campaign = models.ForeignKey( >Campaign, related_name="itemscampaign",

Ajax Call is sending empty request.POST or request.body

2017-03-31 Thread Camilo Torres
Hi. The difference is explained here: https://docs.djangoproject.com/en/1.10/ref/request-response/ You are sending the data in the ajax call as Jason (I suppose, from the content type), then in your view you should probably use request.body to read the json document. I also noticed you are

unable to create a new project in django got error. Fatal error in launcher: Unable to create process using '"'

2017-03-27 Thread Camilo Torres
I think this have nothing to do with django. I suspect this is a bad python installation or bad django installation. I have no experience with installing python nor django on Windows 10, even though I can suggest you uninstall and clean both from your system, then do a fresh reinstall of python

unable to create a new project in django got error. Fatal error in launcher: Unable to create process using '"'

2017-03-27 Thread Camilo Torres
I think this have nothing to do with django. I suspect this is a bad python installation or bad django installation. I have no experience with installing python nor django on Windows 10, even though I can suggest you uninstall and clean both from your system, then do a fresh reinstall of python

inspectDB and 'id' can only be used as a field name if the field also sets 'primary_key=True'.

2017-03-23 Thread Camilo Torres
Hi. You should rename the "id" field in your model to something else. You can edit your models.py and put another name, like "dbid" or something. Django models reserve the "id" field for primary key; your table has another field as primary key. -- You received this message because you are

Re: Django Captcha or MathCaptcha application

2017-03-23 Thread Camilo Torres
May be you are missing a data base migration? -- 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-users+unsubscr...@googlegroups.com. To post to this group,

Re: Django admin custom filter: ProgrammingError: more than one row returned by a subquery used as an expression

2017-03-22 Thread Camilo Torres
Hi, The problem with your approach is the SQL will actually be something like this: select , (select id from web_quote WHERE character_length(quote_text) < 30) as val from ; That will fail in RDMS like Postgres if there are more than one "quote_text" with length < 30. May be you want is

migrations error

2017-03-20 Thread Camilo Torres
Hi, Do you have the virtual environment active when you run the migrate command? -- 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

drop down multi checkbox with bootstraps selet

2017-03-18 Thread Camilo Torres
Hi, You have to properly construct the element. Take a look at these sections of the manual: https://docs.djangoproject.com/en/1.10/topics/forms/#rendering-fields-manually https://docs.djangoproject.com/en/1.10/topics/forms/#looping-over-the-form-s-fields Take a special look at field

new bee - starting to build web application based on python - Django - PostgreSQL (or) MYSQL

2017-03-16 Thread Camilo Torres
I recommend you the django tutorial: https://docs.djangoproject.com/en/1.10/intro/ -- 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

Re: Error running Django tutorial

2017-03-16 Thread Camilo Torres
Hi. You may have a strange, non-visible character in your file just before the line giving error. -- 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

Re: Simple Join with no matching primary keys

2017-03-11 Thread Camilo Torres
You can also create a database view from the join of the two tables. -- 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-users+unsubscr...@googlegroups.com.

Re: Django queryset High CPU Usage

2017-03-11 Thread Camilo Torres
Hi. You can probably use another web framework for that report, or even rethink your architecture and put the report creation outside Django and the web server without Django ORM. You may be interested in evaluating Celery and Django Celery. You can create a separate task outside Django to

CSRF_COOKIE_SECURE and SESSION_COOKIE_SECURE to True when terminating SSL on load balancer

2016-09-07 Thread Camilo Torres
Hi. As you are currently using HTTPS, setting these to true make sense. These settings are used by the browser to ensure encripted cookies. It does not matter if you are using haproxy with ssl termination. Camilo Torres. -- You received this message because you are subscribed to the Google

Re: [django1.9] Url template tag, dotted path and decorator

2016-04-23 Thread Camilo Torres
On Saturday, April 23, 2016 at 1:17:26 PM UTC-4:30, François Magimel wrote: > > Hi! > > I'm facing an issue reversing a dotted path with django 1.9.4. Here are > more details. > > I pass a dotted path to the django template tag "url": > "{% url 'my.app.view.func' arg %}" > And the

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-23 Thread Camilo Torres
On Saturday, April 23, 2016 at 10:00:45 AM UTC-4:30, Bruce Whealton wrote: > > Hello all, > So, I setup django in a virtualenv on my Ubuntu environment. I > was reading the docs and thought I had things right > for creating the 3 models I wanted with this application. I am using >

Re: Question about admin.StackedInline

2016-04-23 Thread Camilo Torres
On Friday, April 22, 2016 at 12:37:40 PM UTC-4:30, Said Akhmedbayev wrote: > > Thank you in advance! > > I am new to Django, trying to build a small app for my friend. The app > mock-up is here > > Basically, the app will include Units/Lessons with Subsection,

Re: Authentication for mobile apps

2016-04-23 Thread Camilo Torres
On Friday, April 22, 2016 at 8:41:07 AM UTC-4:30, Deep Shah wrote: > > I am new to Django. I want to know how does authentication work for mobile > apps. How do I keep the user logged in? Is there any in-built way in Django > to manage tokens or something similar for mobile apps? > Hi, 1. If

Re: remove ./ from commands

2016-04-23 Thread Camilo Torres
On Thursday, April 21, 2016 at 6:55:53 AM UTC-4:30, ken@catapultconsulting.net wrote: > > I just installed django 1.9.5. Now I have to type ./manage.py when I used > to just type manage.py. How do I get rid of the need to type ./ > osx el capitan > Hi, export PAHT=$PATH:. then run your

Re: Help with testing of custom Django admin actions

2016-04-23 Thread Camilo Torres
On Thursday, April 21, 2016 at 9:16:25 AM UTC-4:30, Derek wrote: > > Hi > > I am looking for help with writing tests for custom Django admin actions; > both with and without intermediate pages (ones containing forms). > > I confess (hangs head in shame) that I have written lots of actions, but >

Re: muliple pagination on same page

2014-08-27 Thread Camilo Torres
This is basically a DB query issue. Follow these general directions: 1. In your page add a form with a select with the filtering options. 2. In your view, instead of getting all the instance of your model, filter by the selected option. -- You received this message because you are subscribed

Error importing dbapi2...

2014-08-27 Thread Camilo Torres
If you are running inside a virtualenv, assure you have the sqlite3 module installed inside the v-env, or run toggleglobalsitepackages inside the v-env. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

TypeError: "Source code string cannot contain null bytes"

2014-08-27 Thread Camilo Torres
As it says: you have a null character in your source code script. That is an invalid character for a python script; this does not seems to be related with Django. Open your source code script with a powerfull text editor capable of showing hidden/special characters, then look for a 'null'

Re: Problems with "Hello World" Debian Wheezy Django 1.6.5

2014-08-19 Thread Camilo Torres
On Tuesday, August 19, 2014 11:59:31 AM UTC-4:30, Andrew Koller wrote: > > curl: (52) Empty reply from server > > On Tuesday, August 19, 2014 9:21:34 AM UTC-7, Tom Evans wrote: >> >> On Tue, Aug 19, 2014 at 5:07 PM, Andrew Koller >> wrote: >> > Yes they are on the same

Re: multiple projects on same database

2014-08-13 Thread Camilo Torres
Hello Hector, It seems that using 2 different databases will cause duplicate schema (tables) and duplicate data. So in your case I prefer to change my mind and recomend you to use a single database. In general I don't see any problem with that. Regards, Camilo. -- You received this message

multiple projects on same database

2014-08-07 Thread Camilo Torres
Hello. You can use the same DB, but different schema or different user. You can also use the same schema as long as table names (and other objects names) din't match. I recomend to use diferent schemas for different web apps. Camilo. -- You received this message because you are subscribed

Re: How do I get Django to ignore javascript code because its throwing an exception

2014-07-30 Thread Camilo Torres
Hello, you can use 'verbatim': https://docs.djangoproject.com/en/1.6/ref/templates/builtins/#verbatim On Wednesday, July 30, 2014 6:59:05 PM UTC-4:30, G Z wrote: > > so im using the following java script > > var cpuChart = document.getElementById('cpu').getContext('2d'); > new

Re: Question on a resembling function on truncatewords

2014-04-12 Thread Camilo Torres
On Saturday, April 12, 2014 1:10:34 AM UTC-4:30, Kimitaka wrote: > > I wrote the function in my Product class in my models.py: > class Product(models.Model): > title = models.CharField(max_length=220) > description = models.CharField(max_length=3000, null=True, blank=True) > price =

Re: Saving forms with ManyToMany relationships

2014-04-09 Thread Camilo Torres
ine including > setting the field using cleaned_data, without success. > If you could please let me know how to do that then I should be fine form > there. > > Thanks again, > J > > On Tuesday, 8 April 2014 14:40:13 UTC+12, Camilo Torres wrote: >> >> Hello, >

Re: Saving forms with ManyToMany relationships

2014-04-07 Thread Camilo Torres
'll move on to using widgets to make the category > field a drop down and the component field/s tick boxes and continue adding > form validation etc but i've been stuck on this saving issue for some time. > > Thanks again for your time and help. > > > > On Monday, 7 April 2014

Re: Saving forms with ManyToMany relationships

2014-04-06 Thread Camilo Torres
On Saturday, April 5, 2014 10:12:36 PM UTC-4:30, Jason S wrote: > > I've seen quite a few examples showing various ways to create a form using > manytomany relationships and save the data, but i'm still missing a key > piece of the puzzle. > I've created a form and it "works", meaning the form

Re: Add poll to the django tutorial polls

2014-04-06 Thread Camilo Torres
On Saturday, April 5, 2014 8:13:04 AM UTC-4:30, Christo bale wrote: > > I would like to make it possible to add a poll on the index.html, so one > don't need the admin. > I added a forms.py. > Right now when I click enter after typing the new poll, the sites goes > blank and I need to refresh

Re: Django python checkbox

2014-04-01 Thread Camilo Torres
="_selected_action" type="checkbox" value="{{user.id }}" type="submit" > class="button"> > {{ user.user_name > }} > {{ user.company }} > {{ user.number }} > > {% endfor %} > > > {% e

Re: ManyToManyField and Multi Table Inheritance

2014-04-01 Thread Camilo Torres
I tested this with SQLite3 and it worked, using your models: >>> a.users = User.objects.all() >>> a.save() >>> a.delete() >>> a = AccountTypeA(name='') >>> a.save() >>> a.users = User.objects.all() After that: sqlite> select * from testapp_accounttype_users; 1|1|1 Which is what I should

Re: ManyToMany quick question

2014-04-01 Thread Camilo Torres
Hello, By using default table names and default (or automatic) many to many field management, you get a join table like countries_products, but in your case, you are doing the many to many field management through the Imports model, so in the DB you should see data in the imports table for

Re: Django python checkbox

2014-03-31 Thread Camilo Torres
Hello, You should start with the basics: https://docs.djangoproject.com/en/1.6/topics/http/file-uploads/ You are using request.FILES and that is for file upload, no file download. To upload a file to the server, you must have a in your template, which you don't have. To download files from

Re: ManyToMany quick question

2014-03-31 Thread Camilo Torres
On Monday, March 31, 2014 5:37:05 PM UTC-4:30, willyhakim wrote: > > when creating your models, how do you know which field to assign the > ManyToManyField ? > from django.db import models class Student(models.Model): name = models.TextField() class Course(models.Model): name =

Re: Use custom HTML to render forms

2014-03-31 Thread Camilo Torres
You must think on what is the output HTML you need to generate. Depending on that, you may be able to figure where to put the {% block content %} tags. What is the output HTML you expect? On Thursday, March 27, 2014 9:18:47 AM UTC-4:30, Fred DJar wrote: > > Hello, > I am a beginner in python

Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-16 Thread Camilo Torres
On Sunday, March 16, 2014 1:58:50 AM UTC-4:30, rafiee.nima wrote: > > I'm using development server . and when i use href="{{STATIC_URL}}css/bootstrap.css" rel="stylesheet" media="screen"> it > seems work correctly but when I use media="screen"> my project file and directory structure is like

Re: Using Redis as a DB backend for some models (not a caching backend!)

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 3:10:09 PM UTC-4:30, Alon Nisser wrote: > > Can I use redis as a django database for some of my models? I'm aware (and > using) caching with django and redis, but I'm looking for something else > here: Something I can use at least some of the orm features with, handle a

Re: Can please someone explain this code from the docs?

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 5:33:37 PM UTC-4:30, Voyager wrote: > > On 03/14/2014 11:49 PM, Shawn Milochik wrote: > > That's just the syntax for calling a method on the base class. > > > > 1. MultiEmailField is a subclass of forms.Field. > > 2. forms.Field has a method named validate. > > 3.

Re: messaging

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 4:02:08 PM UTC-4:30, Ankit Singh wrote: > > i want to know that for certain task i want to send some message to user > on his cellphone . > is there any way that i can do so in django with importing costly > application. > Hello, You can do with a third party

Re: [newbie] -- Regex-matching ("Tango with Django")

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 8:14:57 PM UTC-4:30, David wrote: > > I am wodering whether my implementation is incorrect or whether there is > a typo in the textbook. My question is how I can make sense of these > instructions: "The regular expression to match about/ is r'^about/'". > > I was

Re: Django Admin Multiupload Field

2014-03-15 Thread Camilo Torres
On Saturday, March 15, 2014 11:18:05 AM UTC-4:30, Jonathan Querubina wrote: > > how can i have a Multiupload Field on a Model for the Django Admin? > > I Found this: https://github.com/TND/django-files-widget > Hello, I don't fully understand your needs, but may be you can use inlines:

Re: How do I start with this project with django

2014-03-14 Thread Camilo Torres
On Friday, March 14, 2014 1:52:44 AM UTC-4:30, Rob L wrote: > > The feature list of the project I am wishing to do is: > >- Let users upload some images(a folder contains image files) >- Backend generates static htmls to present those images, basically as >a gallery, via an generated

Re: Django-nested-inlines

2014-03-14 Thread Camilo Torres
On Wednesday, March 12, 2014 4:18:05 PM UTC-4:30, Thiago borges dos reis wrote: > > from django.contrib import admin > from nested_inlines.admin import > NestedStackedInline,NestedModelAdmin,NestedTabularInline > from models import Dieta, Cliente,Refeicao,Opcao > > >

Re: django-quiz modification

2014-03-14 Thread Camilo Torres
On Wednesday, March 12, 2014 9:39:16 AM UTC-4:30, orchid barua wrote: > > The view portion has this: > def question_check_anon(request, quiz): > """ > check if a question is correct, adds to score if needed and return the > previous questions details > """ > quiz_id = str(quiz.id)

Re: Documentation of modules

2014-03-13 Thread Camilo Torres
Hello, I don't know of the existence of that reference documentation. You can try the source code documentation: https://github.com/django/django On Wednesday, March 12, 2014 4:13:38 AM UTC-4:30, Christian Waterkeyn wrote: > > Thanks. > But this is not reference documentation! > For example,

Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-13 Thread Camilo Torres
On Sunday, March 9, 2014 3:59:02 PM UTC-4:30, rafiee.nima wrote: > > On Sunday, March 9, 2014 10:29:37 PM UTC+3:30, Camilo Torres wrote: >> >> On Sunday, March 9, 2014 12:11:11 PM UTC-4:30, rafiee.nima wrote: >>> >>> I am new to bootstarp and I want to us

Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-09 Thread Camilo Torres
On Sunday, March 9, 2014 12:11:11 PM UTC-4:30, rafiee.nima wrote: > > I am new to bootstarp and I want to use it in my django project. > I put the needed folder's(css , js , img) in my project static folder and > config my setting.py to access static directory > I can access bootstrap.css from

Re: Trying to set up hashed versioning in Django for static files

2014-03-07 Thread Camilo Torres
On Thursday, March 6, 2014 11:38:07 PM UTC-4:30, Vernon Burt wrote: > > I've pretty quikly found out in my DJango adventure that I need to have > some kind of versioning for my static css and javascript files. After > talking to some web developers I was directed to use Django's >

Re: django 1.6.1 raw_id_fields open a 'change' popup instead of 'select' popup

2014-03-04 Thread Camilo Torres
On Tuesday, March 4, 2014 4:47:58 AM UTC-4:30, Vittorio wrote: > > In an admin form I input all data for a specific invoice (client, date of > issue, number of invoice) and, by means of inlines, the ordered items. In > these inlines I defined a raw_id_fields referring to the 'items' model >

Re: create user define groups via interface

2014-03-03 Thread Camilo Torres
On Monday, March 3, 2014 11:52:13 AM UTC-4:30, django-newb wrote: > > I have build a simple site which is similar to a regular forum. I want to > create a functionality where any user of the system can create a group via > user interface. The functionality that I am thinking as follows:

Re: Trouble with Django in production server.

2014-03-03 Thread Camilo Torres
hat is "activating virtualenv to run the server", right? > On Sun, Mar 2, 2014 at 7:19 PM, Camilo Torres > <camilo...@gmail.com > > wrote: > >> You also should be activating your virtualenv to run the server. >> > No. You are running your commands in a

Re: Using inlines on a one to many but not seeing "add another" link

2014-03-02 Thread Camilo Torres
On Saturday, 1 March 2014 15:53:41 UTC-8, Dennis Marwood wrote: > > Hello. > Here are my models and admin.py dpaste.de > And here is the what I am referring to > https://docs.djangoproject.com/en/1.6/intro/tutorial02/#customize-the-admin-form > But I my not seeing the

Re: django - commenting app for all other apps

2014-03-02 Thread Camilo Torres
On Sunday, March 2, 2014 5:30:01 AM UTC-4:30, Robin Lery wrote: > > I have an app for forum. It has three classes *Tag*, *Question* and > *Answer*. > > I also want to have comments for *Question*, *Answers* and also for *other > parts* of my apps. What is the best way to achieve this? I mean,

Re: about installed_apps and manage.py ( no module named oztrend)

2014-03-02 Thread Camilo Torres
On Sunday, March 2, 2014 12:35:58 PM UTC-4:30, 董健 wrote: > > My error is something like ImportError: no module named oztrend. > I know that apps in the list of installed_apps can be searched in > python/lib/site-packages or the app directory. however, i cannot figure out > the search order.

Re: Trouble with Django in production server.

2014-03-02 Thread Camilo Torres
You also should be activating your virtualenv to run the server. On Saturday, March 1, 2014 8:46:10 PM UTC-4:30, jondbaker wrote: > > Instead of hard-coding paths, check out os.path, os.abspath and os.sep > (and the rest of the os module) for such needs. I usually declare a > PROJECT_ROOT var

Re: "No such table" error.

2014-03-02 Thread Camilo Torres
On Saturday, March 1, 2014 3:29:01 PM UTC-4:30, Omar Acevedo wrote: > > Hello, I'm having an issue in/with Django, which is on a shared hosting, > and I'm using virtualenv and fastcgi. (<- saying this, just in case it > helps in something) > > I'm getting > "OperationalError at /admin/ > no

Re: Javascript and sessions

2014-02-27 Thread Camilo Torres
On Wednesday, February 26, 2014 10:41:38 PM UTC-4:30, Luke Baker wrote: > > My web application is heavily based around form input. I'd like to update > the user's session with each form input that they update or change while > working with a form. I'm thinking of implementing some simple

Re: Using Django without templates?

2014-02-27 Thread Camilo Torres
On Wednesday, February 26, 2014 6:16:39 PM UTC-4:30, ApathyBear wrote: > > He mentioned something that I hadn't really gotten a chance to ask him > more about > He told me to be careful with django templates because in terms of scale, > they can cause problems and almost always need to be

Re: Django with rabbit (but without async celery) - can be done?

2014-02-27 Thread Camilo Torres
On Tuesday, February 25, 2014 10:58:47 AM UTC-4:30, Alon Nisser wrote: > > I need to implement a quite simple Django server that server some http > requests *and *listens to a rabbitmq message queue that streams > information into the Django app (that should be written to the db). the > data

Re: View function and URL Conf basic question

2014-02-27 Thread Camilo Torres
On Wednesday, February 26, 2014 9:24:51 AM UTC-4:30, Daniel Roseman wrote: > > On Wednesday, 26 February 2014 08:10:40 UTC, ApathyBear wrote: >> >> Here is my urls.py: >> >> from django.conf.urls.defaults import *from mysite.views import hello, >> current_datetime, hours_ahead >> urlpatterns =

Re: How to return Random items from a Mongodb Resource

2014-02-24 Thread Camilo Torres
On Monday, February 24, 2014 8:28:23 AM UTC-4:30, Anuj Chauhan wrote: > > Hi Friends, > > I need to return random items from a tastypie resource which is > a resources.MongoEngineResource. > > I have already tried using MyClass.objects.all().order_by('?'), but it > simply keep returning the same

Re: Inconsistency in form_class behavior, is this a Django ticket?

2014-02-22 Thread Camilo Torres
On Saturday, February 22, 2014 6:20:35 AM UTC-4:30, Jopr wrote: > > I'm wondering whether the following should be a Django ticket and would > like your opinion on it. > > When I forget to set a value for 'template_name' using the TemplateMixin > it returns a useful exception: >

Re: Django test client encoding of JSON Booleans

2014-02-22 Thread Camilo Torres
On Friday, February 21, 2014 6:14:14 PM UTC-4:30, Daniel Smith wrote: > > I'm using Django version 1.5.5. Here is a short snippet of the test I'm > writing: > > from django.test import TestCase > > class MyTest(TestCase): > > def my_test(self): > url = ... location of my view ... >

Re: Printing things to the server console in Django?

2014-02-21 Thread Camilo Torres
On Friday, February 21, 2014 4:30:11 PM UTC-4:30, wasingej wrote: > > how I can print out information to my console that I started my web > application on using "python manage.py runserver". > Hello With runserver you can use print() function calls, like: print("Some output") Regard -- You

Re: API rest for https://docs.djangoproject.com/en/dev/intro/tutorial01/ help

2014-02-21 Thread Camilo Torres
On Thursday, February 20, 2014 6:23:27 PM UTC-4:30, Antonio Villavicencio wrote: > > I am trying just to do an API REST with the project of: > https://docs.djangoproject.com/en/dev/intro/tutorial01/ > > specifically with the model of Question > > class Question(models.Model): > question_text

Re: Django Admin - search_fields + related fields

2014-02-21 Thread Camilo Torres
On Thursday, February 20, 2014 4:58:59 PM UTC-4:30, Ivan Goncalves wrote: > > I have these two models below: > > class business(models.Model): > name=models.CharField(max_length=40, blank=True, null=True) > > class phone(models.Model): > business=models.ForeignKey(business, >

Re: First tutorial - 404

2014-02-16 Thread Camilo Torres
On Saturday, February 15, 2014 4:41:34 PM UTC-4:30, Steve Booth wrote: > > I'm just trying to run through the very first tutorial, and frankly, it's > been a nightmare. Running under Fedora 18, Python 2.7, Django version is > 1.4.5. > > So, I got the 1.4 tutorial up, created the site.. all works

Re: Login at the end of form wizard

2014-02-16 Thread Camilo Torres
On Friday, February 14, 2014 6:30:46 AM UTC-4:30, parnigot wrote: > > To work around the problem I’m now trying to include the login form as a > step of the wizard view. > > But I’ve encountered another problem. How can i login the user after it > completed the login step? > Does WizardView

Re: Aptana Studio 3 + PyDev + Git

2014-02-15 Thread Camilo Torres
On Friday, February 14, 2014 12:28:42 PM UTC-4:30, Віталій Лисенко wrote: > > I badly speak and write English, but i have question: > > 1. describe the main advantages of development in Aptana Studio 3 > Django proects > 2.write a detailed ìnfstrukcìû of how to lay out a project on

Re: Creating database in windows

2014-02-15 Thread Camilo Torres
On Friday, February 14, 2014 1:20:09 PM UTC-4:30, Nicholas Perez wrote: > > Hello. I am currently using Django version 1.6.2 trying to learn to use > Geodjango on a windows machine. > My issue is that i have followed Geodjango installation for windows to the > letter(everything is installed in

Re: or-ing to QuerySets turns INNER into LEFT OUTER joins?

2014-02-15 Thread Camilo Torres
On Friday, February 14, 2014 4:58:21 PM UTC-4:30, sha wrote: > > What I would like to know is: > 1. Is there a reason why mysql performance is so slow on left outer join? > (even with indexes) > >> >> That is not a MySQL issue with outher joins, nor any other RDBMS issue with outher join. That

Re: Newbie Question - Where to store application constants?

2014-02-15 Thread Camilo Torres
To round this, for the price of gold, and if you are using the django.contrib.admin interface, you can use Django Solo or similar singleton model. That way you can edit your "business properties" within the admin interface: https://pypi.python.org/pypi/django-solo On Friday, February 14, 2014