Re: Selenium Functional Tests against Heroku-hosted Django Site

2016-10-14 Thread ludovic coues
Have you tried to do it yet ? Have you found any specific problem you need help solving ? 2016-10-14 3:52 GMT+02:00 A Wall : > Hello, > > I'm looking to run functional tests using Django 1.10.2 and Selenium 3.0.0 > against a staging Django site hosted on Heroku. To be clear, I want to do > someth

Re: Mypy-django: Enable static type checking in your django projects

2016-10-14 Thread Jari Pennanen
Hello! This is awesome, I stopped using Django ~4 years ago, because type safety is something I think is necessity in bigger projects. Why is this a separate repo? Shouldn't this be the project for Django devs? I cannot consider Django again until type-safety (in API / models level at least) i

New Record vs Updating Existing

2016-10-14 Thread Frank Semaganga
Hello Team, I am having challenge with my views/dB. I am receiving http data and successfully save to the models but the problem is sometimes the data get into new dB row and sometimes is updating the existing dB row. I want it to insert new row every time data is received. What could have b

Dynamic choice option for select filed in Multivaluefield

2016-10-14 Thread saranya k
I want to set choices for ChoiceField in MultiValueField in form init. But its not getting updated. class TestField(forms.MultiValueField): def __init__(self,*args, **kwargs): error_messages = { 'incomplete': 'incomplete', } a = forms.ChoiceField(choices=

Re: New Record vs Updating Existing

2016-10-14 Thread Jani Tiainen
Hi, When you save your data, you can say .save(force_insert). Django usually makes decision based on primary key value, if it's None Django tries to insert, otherwise Django tries update and then insert if update fails. On 14.10.2016 10:50, Frank Semaganga wrote: Hello Team, I am having c

Re: admin popup + button help

2016-10-14 Thread David
Hi Giuseppe, I was upgrading to a later version of django and ran into the same issue. Did you find a work-around? On Wednesday, April 27, 2016 at 11:37:19 AM UTC-7, Giuseppe wrote: > > I managed to get this working, sort of. I learned that I need to include > jquery.init.js to my parent form. o

How to replace content_type and object_id fields by a field with actual object in admin inline?

2016-10-14 Thread Anton Ponomarenko
I have inline, which shows data of contenttype model, so instead of real objects, I see content_type and object_id fields. I can exclude these fields - this is not a problem, but also I want to get real current object as selected with other Places in a dropdown list. Could anyone tell me, how

Re: How to replace content_type and object_id fields by a field with actual object in admin inline?

2016-10-14 Thread Tim Graham
Something like https://pypi.python.org/pypi/django-genericforeignkey? Search "django admin generic foreign key widget" for other possibilities. On Friday, October 14, 2016 at 10:42:40 AM UTC-4, Anton Ponomarenko wrote: > > I have inline, which shows data of contenttype model, so instead of real

Importing contacts from email/social

2016-10-14 Thread M Hashmi
Hi, Is there a library available to import user contact's list? If you have some piece of code as reference or a lib please guide. Regards, Mudassar -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

HELP - Writing your first Django app, part 1

2016-10-14 Thread 'Nick Bansal' via Django users
Hi, I'm struggling to figure out how to do the following command: "To create a URLconf in the polls directory, create a file called urls.py. Your app directory should now look like:" How do I create a file called urls.py in the app directory? am I missing something completely obvious? Any he

Re: HELP - Writing your first Django app, part 1

2016-10-14 Thread Asad Jibran Ahmed
Just create a new file in whatever text editor you're using (I suggest Sublime Text if you're looking for options) and save the file as urls.py inside the polls directory. Asad Jibran Ahmed http://blog.asadjb.com On Fri, Oct 14, 2016 at 8:00 PM, 'Nick Bansal' via Django users < django-users@goog

Re: Importing contacts from email/social

2016-10-14 Thread Asad Jibran Ahmed
That would depend on the source of the contacts. Do you want contacts from the users phone? I think those are in the vCard format, so you'll need a library to read that. If you're looking for something like importing contacts from Gmail, LinkedIn, etc, there are libraries for each of those sources

Re: HELP - Writing your first Django app, part 1

2016-10-14 Thread Vineet Kothari
Inside your app create a file name filename.py you can create any file so on .as you will proceed further you get the idea . On Oct 14, 2016 10:11 PM, "Asad Jibran Ahmed" wrote: > > Just create a new file in whatever text editor you're using (I suggest Sublime Text if you're looking for options) a

Re: HELP - Writing your first Django app, part 1

2016-10-14 Thread 'Nick Bansal' via Django users
I tried to create a new file (im using sublime text) but it just gave me a new tab... How do I create a new file in an app? On Friday, 14 October 2016 17:41:43 UTC+1, Asad Jibran Ahmed wrote: > > Just create a new file in whatever text editor you're using (I suggest > Sublime Text if you're loo

Re: How to replace content_type and object_id fields by a field with actual object in admin inline?

2016-10-14 Thread Anton Ponomarenko
Found solution. Add form to admin.TabularInline: class CriteriaPlacesInlineAdmin(admin.TabularInline): model = PlacesToCriterias form = CriteriaPlacesChoicesFieldForm # <- ADDED FORM class CriteriasAdmin(admin.ModelAdmin): inlines = [CriteriaPlacesInlineAdmin] admin.site.register

Re: How to add\get data in admin via reversed relation using GenericTabularInline?

2016-10-14 Thread Anton Ponomarenko
If anyone needs to get dropdown list with selected object, instead of content_type and object_id fields, the solution is here . -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Forbidden fix

2016-10-14 Thread Ricardo Prado
Hi Mike! Are you using SSL certificate? What's your SO? Ubuntu, Debian, Win? Please get apache log, you can found this in typing: cat /etc/var/log/apache2/error.log (if ubuntu or debian) and type this an copy and past the permission: stat -c "%n %a" /substance/wsds/7291 check in octal permissi

Anyone using settings.TIME_ZONE=None? (considering remove support for it)

2016-10-14 Thread Tim Graham
I'm not sure if there's a compelling use case for settings.TIME_ZONE=None these days. If you're using it, could you please describe your use case on the django-developers thread: https://groups.google.com/d/topic/django-developers/OAV3FChfuPM/discussion Thanks! -- You received this message b

Re: HELP - Writing your first Django app, part 1

2016-10-14 Thread Asad Jibran Ahmed
Just save the file inside the *poll *folder. That creates the file. Asad Jibran Ahmed http://blog.asadjb.com On Fri, Oct 14, 2016 at 9:55 PM, 'Nick Bansal' via Django users < django-users@googlegroups.com> wrote: > I tried to create a new file (im using sublime text) but it just gave me a > new

NoReverseMatch Error using Django + Haystack + Elasticsearch

2016-10-14 Thread Aline C. R. Souza
Hello everybody, I am having a issue using Django + Haystack + Elasticsearch to perform a website search. I made a question on StackOverflow, but I had no satisfatory answer. The problem is in this line: by {{ post.author }} post.author.pk works well when called by several views, but it is n

Re: Importing contacts from email/social

2016-10-14 Thread M Hashmi
I was hoping to find a combine platform where at least variables are same for POP/IMAP mail servers such as hotmail, yahoo, gmail and few others. Idea is to let user import their contacts. *Between congrats on success for your new book "Django Project Blueprints" as it is been part of curriculum b

Re: Importing contacts from email/social

2016-10-14 Thread Asad Jibran Ahmed
Thanks! It's nice to hear my book is useful to someone out there! :) Back to your question, have you tried this: https://github.com/mengu/django_contact_importer Asad Jibran Ahmed http://blog.asadjb.com On Sat, Oct 15, 2016 at 2:25 AM, M Hashmi wrote: > > I was hoping to find a combine platfo

Re: Importing contacts from email/social

2016-10-14 Thread M Hashmi
This is outdated but let me see if I can port it to upgraded version and make it useful for others as well. Thanks, Regards, Mudassar On Fri, Oct 14, 2016 at 3:37 PM, Asad Jibran Ahmed wrote: > Thanks! It's nice to hear my book is useful to someone out there! :) > > Back to your question, have

Re: Django and Lynda.com

2016-10-14 Thread Paul Handley
I figured it out. For some reason the presenter did not add the name of the app at the end of the makemigrations command. I did exactly like he did and got the wrong result. When I added the name of the app at the end everything functioned normally. With Jayne.com you are flying blind. There is