Remote development on Heroku

2014-07-02 Thread Malik Rumi
Because I have not been able to get a response to this issue I am going to use for remote development. Since I will not be giving out the url,will it be okay to set debug to true a

Re: Multiple projects on one server

2014-07-02 Thread Jorge Andrés Vergara Ebratt
The different versions of python do work, I have 2 current projects right now running on the same machine and one uses Python 2.7.x and the otherone uses Python 3.2 You just have to use the -p flag when creating the virtualenv: virtualenv -p /usr/bin/pythonVersion venv I use a venv folder to co

Re: Multiple projects on one server

2014-07-02 Thread Lachlan Musicman
Absolutely. Can't speak to different versions of python, although you could always hard code that in the virtenv itself, but as for libs - absolutely. In reality most distros (well, deb based) come with python 2 and python 3 and there are packages available if you need an older version than 2.7. h

Re: django 1.7 upgrade + tastypie -> AppRegistryNotReady

2014-07-02 Thread Frank Bieniek
Thanks Tom for the 4 evergreen options. Tastypies currently does not allow to deferr it to a callable, it accesses a property on the queryset... https://github.com/toastdriven/django-tastypie/blob/master/tastypie/resources.py#L1712 As I do not understand the new app registry and how a normal dja

Re: Question about static file serving strategy with S3 and Cloudfront

2014-07-02 Thread Cal Leeming [Simplicity Media Ltd]
You also have to consider client side caching, despite if you use the correct headers or not. One option is to use a cache buster using a value which changes on each release, but I'd advise against using random() cache buster as your caching efficiency will be impacted. //example.com/static/image

Question about static file serving strategy with S3 and Cloudfront

2014-07-02 Thread Chen Xu
Hi Everyone, I am currently using the following strategy to serve my static files, basically I run collectstatic to copy all my files to my static files directory, and then move it to s3, and cloudfront will pick it up from there. However, I wonder if I set the cache period to be 1 day in my cloud

Re: django 1.7 upgrade + tastypie -> AppRegistryNotReady

2014-07-02 Thread Tom Evans
On Wed, Jul 2, 2014 at 3:48 PM, Frank Bieniek wrote: > Hi all, > does currently anybody upgrade his > django 1.6 projects with south and tastypie to the new django1.7 > > Resources definition of Tastypie collids with the new app registry loading. > > I do want to upgrade the project to django 1.7

django 1.7 upgrade + tastypie -> AppRegistryNotReady

2014-07-02 Thread Frank Bieniek
Hi all, does currently anybody upgrade his django 1.6 projects with south and tastypie to the new django1.7 Resources definition of Tastypie collids with the new app registry loading. I do want to upgrade the project to django 1.7 but I can not replace the whole rest api app - "an upgrade fork i

RE: Multiple projects on one server

2014-07-02 Thread Ilya Kazakevich
Hello, Do you have different versions of python or libs? Use virtual env. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegroups

Re: Returning submitted formset data to the template for further editing

2014-07-02 Thread Andrew Choi
Daniele, Are you processing the formset on one page or on multiple? If multiple, then it seems that you don't need a formset and can just chain the form inputs into the next form. For a single page, the first thing that comes to mind is doing the processing client-side, via Javascript and AJ

Re: User related objects

2014-07-02 Thread Lachlan Musicman
This is what you are after: https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model cheers L. On 2 July 2014 21:42, Jonathan Querubina wrote: > My problem is doing this on django-admin. > > Thanks! > > On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wro

Re: User related objects

2014-07-02 Thread Jonathan Querubina
My problem is doing this on django-admin. Thanks! On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wrote: > There are a couple of ways to do it, filtered queries are the obvious solution > > https://docs.djangoproject.com/en/1.6/topics/db/queries/#retrieving-specific-objects-with-filters > > But

Re: User related objects

2014-07-02 Thread Jonathan Querubina
Is there a way to set the ForeignKey(User) or ForeignKey(PermissionGroup) automatically by the logged user? On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wrote: > There are a couple of ways to do it, filtered queries are the obvious solution > > https://docs.djangoproject.com/en/1.6/topics/db/q

Re: Creating subusers

2014-07-02 Thread Lachlan Musicman
Ah, ok, I see your problem is different - the Intermediate object probably isn't your friend. You can try the various levels of User, with various subclasses... http://www.django-rest-framework.org/api-guide/permissions Has some good ideas. cheers L. On 2 July 2014 19:52, Jorge Andrés Vergara

Re: User related objects

2014-07-02 Thread Lachlan Musicman
There are a couple of ways to do it, filtered queries are the obvious solution https://docs.djangoproject.com/en/1.6/topics/db/queries/#retrieving-specific-objects-with-filters But it would require that your model have either a group or owner permission set. (eg class MyModel(models.Model): p

Re: django beginner

2014-07-02 Thread Lachlan Musicman
You need a ^articles/year/$ in your urls.py if you want to visit http://127.0.0.1:8000/articles/year/ Your URLs are looking for: http://127.0.0.1:8000/articles/ - eg http://127.0.0.1:8000/articles/2014 http://127.0.0.1:8000/articles//dd/ - eg http://127.0.0.1:8000/articles/2014/07/ http:

User related objects

2014-07-02 Thread Jonathan Querubina
Hi guys, I need to customize my admin to show only the data related to the user who inserted. Example: When a user log in, the admin shows only the posts inserted by this user. AFAIK, django only set permissions my model, not by objects. Is there a way (or a pip package) to implement this?

Re: Multiple projects on one server

2014-07-02 Thread Lachlan Musicman
I do it using 3 different virtualenvs, each w their own Django install (prod, stage, dev). To facilitate the settings I use the Two Scoops of Django by @pydanny (and his partner whose name escapes me just now) method which I highly recommend as a post-tutorial text in general. But if they are dif

Re: django beginner

2014-07-02 Thread ngangsia akumbo
On Wednesday, July 2, 2014 9:47:08 AM UTC+1, Lloyd Dube wrote: > > I suggest you do so. It is important to understand how the framework works > before attempting to create your own projects or even using existing apps. > > Page not found (404) > Request Method:GET > Request URL:http://12

Re: Creating subusers

2014-07-02 Thread Jorge Andrés Vergara Ebratt
Hey Lachlan, I read the docs you sent me and I have a question, what if (in that example from the docs that uses Person, Group and Membership) I needed the Group class to be an user too? Like the Group was an user that can create, update and delete every user in itself and also all the information

Re: django beginner

2014-07-02 Thread Sithembewena Lloyd Dube
I suggest you do so. It is important to understand how the framework works before attempting to create your own projects or even using existing apps. On Wed, Jul 2, 2014 at 10:21 AM, ngangsia akumbo wrote: > no i did not > > -- > You received this message because you are subscribed to the Googl

Re: Multiple projects on one server

2014-07-02 Thread Andrew Pashkin
Sorry, I wrote to wrong mailing list (facepalm.jpg). But actually the topic is relevant to django-users too =) On 02.07.2014 12:11, Andrew Pashkin wrote: Hi all! Does anybody had experience in managing deployment of two or moredifferent projects on one system? I have such task and main issue

Re: django beginner

2014-07-02 Thread ngangsia akumbo
no i did not -- 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, send email to django-users@google

Re: django beginner

2014-07-02 Thread Sithembewena Lloyd Dube
Did you complete the entire tutorial? On Wed, Jul 2, 2014 at 10:14 AM, ngangsia akumbo wrote: > i do the installation, create the virtualenv, startproject, startapp, > create models, activate admin, > > i still confuse with one thing, if i randomly create this apps how do i > present them on th

Re: django beginner

2014-07-02 Thread ngangsia akumbo
i do the installation, create the virtualenv, startproject, startapp, create models, activate admin, i still confuse with one thing, if i randomly create this apps how do i present them on the html page That is where my prob is -- You received this message because you are subscribed to the G

Multiple projects on one server

2014-07-02 Thread Andrew Pashkin
Hi all! Does anybody had experience in managing deployment of two or moredifferent projects on one system? I have such task and main issue that Im experiencing is configuration an dependencies clashes. Best solution which I have is to make common deployment config for all projects, but this

Re: Creating subusers

2014-07-02 Thread Mike Dewhirst
On 2/07/2014 3:16 PM, Lachlan Musicman wrote: I would recommend Intermediate Models as a good solution for these type of weird situations https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships +1 Cheers L. On 2 July 2014 12:20, Jorge Andrés Verg