Re: Amazon S3 Storage

2015-07-16 Thread Bill Blanchard
I've used this with success in the past: https://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html On Thu, Jul 16, 2015 at 10:22 PM, Rootz wrote: > Can you explain to me the easiest way to store uploaded image to a Django > Project using Amazon S3 for all my

Amazon S3 Storage

2015-07-16 Thread Rootz
Can you explain to me the easiest way to store uploaded image to a Django Project using Amazon S3 for all my uploads to the project? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Interfacing Django Project with Python Script

2015-07-16 Thread ADEWALE ADISA
U can just import the modules in the script file the way you import django modules. On Jul 17, 2015 12:55 AM, "Jake Rudolph" wrote: > If I have a separate Python script that I want to interact with my Django > project, how do I set them up to communicate? > > -- > You

Re: Development Server Ignores IP-address Parameter

2015-07-16 Thread Ted Thomas
Jonathan, anotherdjangonewby, Thanks. I tried both suggestions, but there in no change in behavior. No matter what I do, the development server only takes requests at 127.0.0.1:8000. I am including my settings.py file below ( with altered secret_key): """ > Django settings

Interfacing Django Project with Python Script

2015-07-16 Thread Jake Rudolph
If I have a separate Python script that I want to interact with my Django project, how do I set them up to communicate? -- 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

Re: design decision tree survey using django admin interface

2015-07-16 Thread dc
Thanks. I'll look into it. On Wednesday, July 15, 2015 at 12:18:05 AM UTC-4, luisza14 wrote: > > I know it is not the answer of your question but for your survey design it > is important that you see this links. > > https://github.com/chrisglass/django_polymorphic >

Re: Migrate a many-to-many field to an explicit intermediate ("through") model?

2015-07-16 Thread BHAGYARAJ POLA
> > hey hi, I want to create web based visualization by using django framework in python. i need to have a front end interface which will communicate with the database. The front end should look like similar to this. http://specobs.ee.washington.edu/ For Map you can use Google Maps API,

Re: How do I install Python 3 in a virtualenv on a MAC ?

2015-07-16 Thread Néstor
Virtualenv -p python3 myfolder On Jul 16, 2015 2:24 PM, wrote: > I'm new to Django and would like to install Python 3.x in a virtualenv so > I can follow the tutorial given on the Django website. > How do I install Python 3.x (latest version) within a virtualenv on a

Re: Development Server Ignores IP-address Parameter

2015-07-16 Thread anotherdjangonewby
When switching to debug=False I had also problems connecting my debug-server. For me I had to specify the server IP-address in the settings: ALLOWED_HOSTS = ['localhost', '127.0.0.1', '192.168.1.21'] Maybe this helps. Kai Am 16.07.2015 um 20:28 schrieb John : try: python manage.py

How do I install Python 3 in a virtualenv on a MAC ?

2015-07-16 Thread plan9dynamics
I'm new to Django and would like to install Python 3.x in a virtualenv so I can follow the tutorial given on the Django website. How do I install Python 3.x (latest version) within a virtualenv on a Mac? Thank you, jon -- You received this message because you are subscribed to the Google

Re: Migrate a many-to-many field to an explicit intermediate ("through") model?

2015-07-16 Thread Carsten Fuchs
Hi Gergely, many thanks for your quick reply! Am 2015-07-16 um 18:15 schrieb Gergely Polonkai: 1) create the "through" model, add it to the migration file 2) migrate all m2m instances (e.g. iterate over all Bereich objects then iterate through its users, creating a UserBereichAssignment object

Re: Development Server Ignores IP-address Parameter

2015-07-16 Thread John 
try: python manage.py [::]:8001 django will accept any requests on that port (localhost:8001, 127.0.0.1:8001, 192.168.0.102:8001) > On Jul 16, 2015, at 3:26 PM, tdthoma...@gmail.com wrote: > > Sadaf, > > Thanks for your reply. To be clear, my objective is to run tests with other >

Re: Development Server Ignores IP-address Parameter

2015-07-16 Thread tdthomas93
Sadaf, Thanks for your reply. To be clear, my objective is to run tests with other computers behind my firewall. Hence the 192.168.0.102 address which will only work on my local network. I tried your idea of specifying 0.0.0.0:8000, but that did not work. The development server still runs

Full screen map

2015-07-16 Thread M.K
Hi guys, I created a map with GeoDjango and implemented it into html file but the problem is I can not make it fullscreen, I use Bootstrap , does someone know where is the problem ? {% block content %} {{form.media}} {%

Re: Testing related models without saving

2015-07-16 Thread Carl Meyer
Hi Roland, On 07/16/2015 07:46 AM, Roland Swingler wrote: >> i'll just say that Django tests don't favor too much into the "unit" > test spectrum; > > That is what I'm seeing - it is the same with rails out of the box as > well. I guess I'm just curious to know whether: > > a) the 'unit' test

Ajax CRUD: best practise for related models in one view?

2015-07-16 Thread ThomasTheDjangoFan
Hi guys, I am searching for a best-practise tutorial (or code-example) to show me how to implement a frontend CRUD gui for related models - if possible: Ajax based. *Scenario:* Let's say I have a contact-class. 1 contact can have n adresses. The address is assigned to the contact via a

Re: Migrate a many-to-many field to an explicit intermediate ("through") model?

2015-07-16 Thread Gergely Polonkai
You don't need the temporary field. 1) create the "through" model, add it to the migration file 2) migrate all m2m instances (e.g. iterate over all Bereich objects then iterate through its users, creating a UserBereichAssignment object for each (all this done in a migrations.RunPython call) 3)

Migrate a many-to-many field to an explicit intermediate ("through") model?

2015-07-16 Thread Carsten Fuchs
Dear Django fellows, using Django 1.8.3, in a fully migrated app I have a model with a many-to-many relationship like this: from django.db import models from django.contrib.auth.models import User class Bereich(models.Model): benutzer = models.ManyToManyField(User) Now I

Re: Testing related models without saving

2015-07-16 Thread Roland Swingler
> i'll just say that Django tests don't favor too much into the "unit" test spectrum; That is what I'm seeing - it is the same with rails out of the box as well. I guess I'm just curious to know whether: a) the 'unit' test end of the spectrum is feasible if that's what you like b) what is

Re: Testing related models without saving

2015-07-16 Thread Javier Guerra Giraldez
On Thu, Jul 16, 2015 at 8:18 AM, Roland Swingler wrote: > I understand that the test db uses a different schema (it's the same in > rails), the point is to be able to run tests isolated from having a database > at all. there are several testing styles, each one with

Re: Testing related models without saving

2015-07-16 Thread Roland Swingler
Hi, Thanks for the link - I'll investigate that further, especially as to whether you can set that dynamically. I understand that the test db uses a different schema (it's the same in rails), the point is to be able to run tests isolated from having a database at all. Thanks, Roland -- You

Re: Testing related models without saving

2015-07-16 Thread Bruno A.
This might help maybe: https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.ForeignKey.allow_unsaved_instance_assignment On Thursday, 16 July 2015 12:21:30 UTC+1, Roland Swingler wrote: > > Hi all, > > I've very recently come to to Django from a rails background, and >

Re: Testing related models without saving

2015-07-16 Thread Bruno A.
You did not quote your models, but I assume your UserProfileDetails has a OneToOne or ForeignKey relationship with User model. With Django, you generally need to save the related model before adding it to the Foreignkey, as the relationship in UserProfileDetails is using the primary key

Testing related models without saving

2015-07-16 Thread Roland Swingler
Hi all, I've very recently come to to Django from a rails background, and struggling to do unit testing of Django models without saving to the database as I'm used to in Rails. Lets say you have 2 linked models, for example User and UserProfileDetails, then in my tests I want to set up the

Django Admin - get formset class reference from modeladmin

2015-07-16 Thread Edward Chan
Dear All, In a ModelAdmin object, how to reference the formset class of the inline? -- 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: Development Server Ignores IP-address Parameter

2015-07-16 Thread Sadaf Noor
Actually if you run your django at 0.0.0.0:8000 at your server pc which has a ip 192.168.0.102 > ./manage.py runserver 0.0.0.0:8000 then from another pc of the same network (as 192.168.0.102 is a local ip) if you type http://

Re: Match multiple URLs to the same pattern

2015-07-16 Thread Mathew Byrne
Thanks, yes this is *exactly* what I'm after. I'm coming from other web frameworks where there is more "magic" around controllers/views so I was unsure about this solution, but in django it appears that a view is explicity just a function that transforms a request into a response. Thanks