[Django 1.8] A Custom Admin Site for non staff users

2015-04-09 Thread Rayco Abad Martín
from django.contrib.admin.sites import AdminSite from django.contrib.auth.forms import AuthenticationForm

Re: Alternatives to Django REST Framework

2015-04-09 Thread François Schiettecatte
If you do go the Flask route, you might want to check this: https://github.com/humiaozuzu/awesome-flask Just came with the lastest ImportPython Newsletter (http://importpython.com/newsletter/no/27/) François > On Apr 9, 2015, at 9:45 AM, Vijay Khemlani wrote: >

Re: Using multiple form in Class Base View (CBV)

2015-04-09 Thread Dan Gentry
To modify the generic CBVs to handle two forms would mean changes in many of the base classes and mixins, including ProcessFormView, FormMixin, and BaseFormView. It would make more sense to start with the View base class and roll your own methods. If this is a one-off, I would probably keep

Best practice for passing JSON objects to a template

2015-04-09 Thread Eric Plumb
Hi Djangoers! Sometimes in the course of human events it becomes necessary to encode a JSON object directly into a template. We all prefer AJAX and REST APIs and the rest of the TOFLAs, but in the cases where it has to be part of the template, I'm wondering if there's an accepted canonical

Re: ProgrammingError: relation "django_content_type" already exists

2015-04-09 Thread manikos
Hello Mike. Today I took the road to upgrade from Django 1.6 --> 1.8. I wanted the bugfixes support and the long-term. Everything looked good at the very beginning BUT it turned out that I get the same error with you, concerning the "django_content_type" already exists. Have you found a

Re: How do I manage a Non-default Django PostgreSQL database

2015-04-09 Thread Stephen M
# UPDATE One of my issues is that my router code was based on and older version of Django. I am not sure if this is exactly correct now but it closely resembles the documentation now: https://docs.djangoproject.com/en/1.8/topics/db/multi-db/ class fbrPostHasteAppV0_1Router(object):

Re: How do I manage a Non-default Django PostgreSQL database

2015-04-09 Thread Carl Meyer
On 04/09/2015 07:12 AM, Stephen M wrote: > If Django migrations with PostgreSQL is a bit flaky (as suggested by > S.O. comment) which backend database is reliably supported by the Django > migrations mechanism? The premise is false. Postgres is almost certainly the best-supported database for

How to filter model with sum of fields and which is group_by with few fields?

2015-04-09 Thread SHINTO PETER
Model class fcc_summary(models.Model): OCN_Id = models.AutoField( primary_key=True) OCN_Date = models.CharField(max_length = 20, blank = True, null = True) OCN_OCN_Id = models.CharField(max_length = 25, blank = True, null = True) OCN_StateCode = models.CharField(max_length = 5,

How to filter model with count of fields and which is group_by with few fields?

2015-04-09 Thread SHINTO PETER
Model class fcc_summary(models.Model): OCN_Id = models.AutoField( primary_key=True) OCN_Date = models.CharField(max_length = 20, blank = True, null = True) OCN_OCN_Id = models.CharField(max_length = 25, blank = True, null = True) OCN_StateCode = models.CharField(max_length = 5,

how to filter in django ie group_by and count

2015-04-09 Thread SHINTO PETER
how to filter in django ie group_by and count -- 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: Alternatives to Django REST Framework

2015-04-09 Thread Vijay Khemlani
If you don't need the advanced features of Django or REST framework it's easy to ignore them, it's not like they require tons of resources or configuration files to work. On Thu, Apr 9, 2015 at 10:24 AM, graeme wrote: > If you do not need Django at all, Flask or

Re: Alternatives to Django REST Framework

2015-04-09 Thread graeme
If you do not need Django at all, Flask or Bottle. If you are going to use Django anyway, just use a Django view that return JSON, XML or whatever you want. On Thursday, April 9, 2015 at 6:25:21 PM UTC+5:30, amit.p...@gmail.com wrote: > > Hi, > > while Django REST Framework seems wonderful to

Re: How do I manage a Non-default Django PostgreSQL database

2015-04-09 Thread Stephen M
If Django migrations with PostgreSQL is a bit flaky (as suggested by S.O. comment) which backend database is reliably supported by the Django migrations mechanism? On Wednesday, April 8, 2015 at 7:53:11 PM UTC-5, Stephen M wrote: > > Also posted to stackoverflow: How do I manage a Non-default

Re: Alternatives to Django REST Framework

2015-04-09 Thread Lucas Klassmann
Hi, You can search for "restless", it is a small library, very simple and with basics features, but you can understand the mechanisms from behind and the behavior of a "REST" framework. Or you can try make something own, in the internet has some tutorials that explain how to make. I did make my

Re: How do I manage a Non-default Django PostgreSQL database

2015-04-09 Thread Stephen M
If Django migrations with PostgreSQL is a bit flaky (as suggested by S.O. comment) which backend database is reliably supported by the Django migrations mechanism? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: Alternatives to Django REST Framework

2015-04-09 Thread François Schiettecatte
You could try Flask, I have used it in the past when I did not need all the infrastructure that Django provides: http://flask.pocoo.org François > On Apr 9, 2015, at 8:54 AM, Amit Prahesh wrote: > > Hi, > > while Django REST Framework seems wonderful to me,

Re: Alternatives to Django REST Framework

2015-04-09 Thread Andrew Farrell
Someone I met at the Austin python user group told me they'd built their company's backend using Falcon and were very happy with it. On Thu, Apr 9, 2015 at 7:54 AM, Amit Prahesh wrote: > Hi, > > while Django REST Framework seems wonderful to

Re: Alternatives to Django REST Framework

2015-04-09 Thread Jorge Andrés Vergara Ebratt
I love DRF, but if you want to check something else, there is also Tastypie! Here you can find the docs: https://django-tastypie.readthedocs.org/en/latest/ On Thu, Apr 9, 2015 at 7:54 AM Amit Prahesh wrote: > Hi, > > while Django REST Framework seems wonderful to me,

Alternatives to Django REST Framework

2015-04-09 Thread Amit Prahesh
Hi, while Django REST Framework seems wonderful to me, it is a heayweight option for a little project of mine. I wonder if there are simpler alternatives for publishing a simple API? TIA, AP. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Locking the browser using functions

2015-04-09 Thread Larry Martell
On Thu, Apr 9, 2015 at 5:04 AM, wrote: > I have been using jQuery BlockUI Plugin for locking the browser after > clicking a search form. But here the problem is dynamic data,images is > really hard to implement. Therefore, Is there any chance to do in django via >

Re: login_required decorator in Django: open modal instead of redirecting to another page

2015-04-09 Thread Avraham Serour
you should return the whole page plus the modal dialog I would do it in js, the js context should e aware that the session is not logged in and instead of going to the link it should show the modal and also use the regular login required decorator because some people turn off js On Wed, Apr 8,

Locking the browser using functions

2015-04-09 Thread vk . popuri
I have been using *jQuery BlockUI Plugin* for locking the browser after clicking a search form. But here the problem is dynamic data,images is really hard to implement. Therefore, Is there any chance to do in django via functions ? For instance: When I search for a city, before showing the

Re: django 1.8 upgrade custom user model syncdb

2015-04-09 Thread Jochen Wersdoerfer
On Wednesday, April 8, 2015 at 5:46:42 PM UTC+2, Markus Holtermann wrote: > > > glad it works now. In that case you want to look at > https://docs.djangoproject.com/en/1.8/ref/settings/#migration-modules > and place the migrations somewhere in your project. Otherwise the > migrations end up