Django and Authorize.net

2016-06-08 Thread Arshpreet Singh
I want to use Django+authorize.net, I have tried merchant but could not figure it out, is there any tutorial/information I can use? -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: User Registration

2016-06-08 Thread vaibhav
HI, You can create a custom model like this and define all custom fields within it: class UserInfo(AbstractTimestampClass): user = models.ForeignKey(User) address = models.TextField(blank=True, null=True) city = models.CharField(max_length=25, blank=True, null=True) postal_code = m

Add SQL to every migration creating a field

2016-06-08 Thread TheBeardedTemplar
Hey all, I'll try to be as clear as I can with this problem - basically I am implementing soft-delete functionality in order to allow an 'undo' function that extends quite far into the past. My plan is to do it by creating a subclass of models.Model that looks like this: class SoftDeleteModel(

Django heroku deploy results in site cant be reached error

2016-06-08 Thread Dave N
My full django deploy issue can be found here: http://stackoverflow.com/questions/37714253/django-deploy-on-heroku-gives-site-cant-be-reached-response In summary, my app works locally with runserver, and also works perfectly when I use heroku local on 0.0.0.0:5000. When I introduce gunicorn my

Re: Test fails when run in whole test suite - but not stand-alone?

2016-06-08 Thread learn django
Hi Adam, I was hitting same issue but never got chance to debug it. If the underneath database support database transactions then isn't that each test will be treated as a separate transaction and transaction should be rolled back after the test is over to keep the database sane ? On Wednesday,

Adding Tinymce to Admin

2016-06-08 Thread Ankush Thakur
I wish to add TinyMCE editor to my Django-powered app. My Model is a typical blog model, with a TextField for the actual post contents. Now what I want is, every time I'm editing the contents (or adding a new blog), I should be able to write in a WordPress-style editor. I understand that I'd need

Re: Django websites for study and improvement

2016-06-08 Thread Ankush Thakur
Wow, that's quite a lot! Thanks, Akhil! Can I write to you with (silly) questions I might have about these? :P ~~Ankush On Tuesday, May 31, 2016 at 11:39:53 PM UTC+5:30, Akhil Lawrence wrote: > > You can get many django based applications from github. > > https://github.com/taigaio/taiga-back >

Re: Django websites for study and improvement

2016-06-08 Thread Ankush Thakur
Superb recommendation, Tim! Thanks once again! :D :D ~~Ankush On Wednesday, June 1, 2016 at 8:18:46 PM UTC+5:30, Tim Graham wrote: > > You might enjoy looking at djangoproject.com itself: > https://github.com/django/djangoproject.com/ > > On Tuesday, May 31, 2016 at 1:56:39 PM UTC-4, Ankush Thak

Re: Expiration date option

2016-06-08 Thread 'David Turner' via Django users
Hi James Just one more quick question: I have two django models both containing the same information, temps and companies. The models both contain the following fields: odd days weekends nights emergencies Currently this allows me to filter on these fields in django admin. My question is would I

Re: Expiration date option

2016-06-08 Thread 'David Turner' via Django users
Many thanks for the answer especially the amount of detail in it. Best -david On 8 June 2016 at 09:26, James Schneider wrote: > > > > Many thanks for your answer which makes perfect sense and yes, this is > only required for a single view. > > The expiry_date is needed as items are listed by e

Re: Autocomplete for Admin search field

2016-06-08 Thread Derek
I have not done this; but I think you would need to overwrite the default Django template and add in a special widget (such as the django-autocomplete- light one). Bear in mind you'd also need to handling searching across multiple fields. On Wednesday, 8 June 2016 14:08:54 UTC+2, Александр Жид

Autocomplete for Admin search field

2016-06-08 Thread Александр Жидовленко
Could search_field in Django Admin has autocomplete? http://dl2.joxi.net/drive/2016/06/08/0001/1889/128865/65/95babc09ea.jpg In my case I want to type name of product and to see autocomplete list of products. I found django-autocomplete-light but it uses autocomlete only on change_list pages. Am

Re: User Registration

2016-06-08 Thread ludovic coues
Have you looked at the django documentation ? There is a builtin form for creating a new user, working with user model shipped with django. https://docs.djangoproject.com/en/1.9/topics/auth/default/#django.contrib.auth.forms.UserCreationForm 2016-06-08 10:46 GMT+02:00 Arshpreet Singh : > I am im

User Registration

2016-06-08 Thread Arshpreet Singh
I am implementing Django User registration method as provided in the following tutorial: https://mayukhsaha.wordpress.com/2013/05/09/simple-login-and-user-registration-application-using-django/ It is not using any model/model-form, But I want to connect with User-registration with other defined m

Template Django - Can't display model field in Django Template

2016-06-08 Thread Yan L'kabousse
Hello everyone :) I want to display some datas on a wtih Django Template. I have menus (for eat in reaturant) But I can't display the menuItems in the But it displays other parts of the table. Here is my stackoverflow topic if you want more details (model for example) : http://stackoverflow

Test cases are always referring to default database in case of Multiple databases

2016-06-08 Thread vaibhav
Hi, I am trying to run some test cases on one of the apps of my Django Project. My settings.py file specifies two different databases as follows: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),

FieldDoesNotExist during custom migration

2016-06-08 Thread Gagaro
Hello, I'm trying to make a migration to change a field ("filter") from a ForeignKey to a CharField. The migration is as follow : class Migration(migrations.Migration): operations = [ migrations.AddField( model_name='Rendition', name='filter2', fi

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Xavier Ordoquy
Hi, Le mercredi 8 juin 2016 10:13:46 UTC+2, luisza14 a écrit : > > I am using supervisor and gunicorn for production run as fondomutual user. > > $ env | grep LANG > LANG=es_CR.UTF-8 > LANGUAGE=es_CR:es > Supervisor doesn't propagate the locales to its supervised processes. You need to set them

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Michal Petrucha
On Wed, Jun 08, 2016 at 02:13:23AM -0600, Luis Zárate wrote: > I am using supervisor and gunicorn for production run as fondomutual user. > > $ env | grep LANG > LANG=es_CR.UTF-8 > LANGUAGE=es_CR:es Are you certain that when supervisord is started by init/systemd/upstart, it is also launched with

Re: Test fails when run in whole test suite - but not stand-alone?

2016-06-08 Thread Derek
Thanks Adam, I will try that. I think I have been lax in the use of tearDown. On Thursday, 2 June 2016 21:47:00 UTC+2, Adam wrote: > > When I've had that happen before, it's because some previous test changed > something (like a setting value or the site domain) that influenced the > test that

Re: Expiration date option

2016-06-08 Thread James Schneider
> > Many thanks for your answer which makes perfect sense and yes, this is only required for a single view. > The expiry_date is needed as items are listed by expiry date. So would you suggest removing the has_expired and writing the filter against the expiry date? > Yes, I meant that you should k

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
I am using supervisor and gunicorn for production run as fondomutual user. $ env | grep LANG LANG=es_CR.UTF-8 LANGUAGE=es_CR:es 2016-06-08 2:09 GMT-06:00 Luis Zárate : > After obj.save(). > > File > "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/base.py" > in

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
After obj.save(). File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/base.py" in save_base 736. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-pac

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
I am in Debian, in /etc/locale.gen es_CR.UTF-8 UTF-8 $ locale -a C C.UTF-8 es_CR.utf8 POSIX 2016-06-08 2:01 GMT-06:00 Luis Zárate : > $ python manage.py shell > > >>> import sys > >>> sys.getfilesystemencoding() > 'utf-8' > > > > 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > >> Have you tri

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Stephen J. Butler
Whats the stack trace? On Wed, Jun 8, 2016 at 3:01 AM, Luis Zárate wrote: > $ python manage.py shell > > >>> import sys > >>> sys.getfilesystemencoding() > 'utf-8' > > > > 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > >> Have you tried this? >> >> https://docs.djangoproject.com/en/1.9/ref/unic

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
$ python manage.py shell >>> import sys >>> sys.getfilesystemencoding() 'utf-8' 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > Have you tried this? > > https://docs.djangoproject.com/en/1.9/ref/unicode/#files > > You probably have a system setup where ASCII is the filesystem encoding. > It te

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Stephen J. Butler
Have you tried this? https://docs.djangoproject.com/en/1.9/ref/unicode/#files You probably have a system setup where ASCII is the filesystem encoding. It tells you a way to fix that on Linux/Unix. On Wed, Jun 8, 2016 at 2:44 AM, Luis Zárate wrote: > Hi, > > I am having this issue in server pro

Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
Hi, I am having this issue in server production, I developed with python 3 and with others fields work great but when file is involved I don't know how to intermediate and remove non ascii characters. Part of my stack trace is: Internal Server Error: /vistapublica/perfil/editar UnicodeEncodeErr