Re: Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
Thanks for the pointer. Will check out all auth. V. On Tue, Sep 24, 2013 at 4:03 AM, Kamil Gałuszka wrote: > > Of course. > > First of all I would recommend you using of django-allauth. They are > having great docs and they support custom user model. django-registration >

Re: Need help in my Django program

2013-09-23 Thread ghenessa sabaldan
How do I display the updated value from another model, example > > Model A > > C = user inputted value > > > > Model B > > A = initial value of 0 + C > > B = initial value of 50 – A > So every time a different user input a value in C the A & B will automatically be updated, when A = 50

Re: Two sets of registration with django-registration

2013-09-23 Thread Kamil Gałuszka
Of course. First of all I would recommend you using of django-allauth. They are having great docs and they support custom user model. django-registration is little less maintained and maybe less suitable for your needs. First you define your custom form in settings.py: SIGNUP_FORM_CLASS Then

Re: CSV output

2013-09-23 Thread C. Kirby
Whoops, missed the map step. I think you will need to create a new dict using the try/except above, and then map the new dict to str On Monday, September 23, 2013 5:29:40 PM UTC-5, C. Kirby wrote: > > try: > value = getattr(object, 'get_%s_display' % field)() > except: >

Re: CSV output

2013-09-23 Thread C. Kirby
try: value = getattr(object, 'get_%s_display' % field)() except: value getattr(object, field) On Monday, September 23, 2013 4:47:33 PM UTC-5, Lachlan Musicman wrote: > > Ok, so here's the challenging part - how would you get the > get_FOO_display value for some but not

Re: CSV output

2013-09-23 Thread Lachlan Musicman
Ok, so here's the challenging part - how would you get the get_FOO_display value for some but not all of those values? cheers L. On 23 September 2013 23:29, Valder Gallo wrote: > :D > > > > On Mon, Sep 23, 2013 at 10:12 AM, Lachlan Musicman > wrote: >>

How to track user behavior in django application

2013-09-23 Thread Anu G
I am building a site using django I am new to django. What I am trying to do is to track user clicks on pages and store that information. It would be great if someone can point to a simple example where adding functionality that requires to track data to the front end and capturing it from the

ManyToMany intermediary models with no required extra fields

2013-09-23 Thread antialiasis
Say you have a model with a ManyToManyField to another model: class Band(models.Model): ... members = models.ManyToManyField('Person') And now, say you decide that you want to use a custom intermediary model for the relationship, *without any required extra fields*. This could happen

Re: Template Syntax Error

2013-09-23 Thread Alagappan
Looks like the is an issue in Django being able to resolve URLs in your application. Can you paste your urls.py for more info. Regards, Alagappan R Twitter: @_alagappan Thanks & Regards, Alagappan Ramu +1 (716) 598 2730 Graduate Student in Computer Science

Re: custom if tag

2013-09-23 Thread Alagappan
You can implement has_applied as a filter instead of a template tag. https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters Haven't check it, but something like {% if user|has_applied_filter: opening %} should essentially work out for your case.

RE: How do I create a standalone python application that uses the django environment (e.g. the ORM etc...)?

2013-09-23 Thread Sells, Fred
Creating django management commands is easy and then all works nicely. Assuming you're at 1.5, not sure about older ones. Just google it. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of DJ-Tom Sent: Monday, September 16, 2013 10:26 AM To:

custom if tag

2013-09-23 Thread Vibhu Rishi
Hi, My scenario is that users would have applied for some job opening. I need to do something like the following in my templates : {% if has_applied opening user %} You have applied {% else %} Click to apply {% endif %} However, so far i have been using templatetags and got the following only:

Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
Hi, I have 2 types of users with different views of the same page . Using django-registration, I have been able to setup all the signup/password change etc for one level of users - say students. Now I want to have another set of registrations for Teachers. Is there a way to achieve that ? Vibhu

Re: Mysterious error messages

2013-09-23 Thread Joseph Mutumi
Don't use Satchmo but looks like `shop_config` is not defined when you context_processors are called? This is because from it looks like it gets the shop_config based on the current site based on the host. If the domain name saved in the admin for the site corresponding to the SITE_ID in your

Re: Empty context within template tag render() method after using django.test.client.Client.login() method

2013-09-23 Thread Jonathan Baker
Below are some snippets involved in generating the error. The 'test_get_unauthenticated' works as expected, but 'test_get_ok' fails while rendering the template response and calling the menu tag of django-menu (full module:

CalDAV / CardDAV

2013-09-23 Thread Miloš Kozák
Hi, I have been looking around for a something like tastypie but for CalDAV/CardDAV.. I am running something like CRM in our small company based on Django.. So I had an idea to export contacts to cell phones using CardDAV but I could find anything. So I ma wondering what is the problem? Is it

Re: "no such column" database error in admin

2013-09-23 Thread Avraham Serour
it looks like you changed the model after running syncdb, syncdb is able to create tables but not to add or remove columns. for that you should take a look at south, it is called database migrations. you may also delete the database and recreate On Mon, Sep 23, 2013 at 10:53 AM, Beverly Block

Re: CSV output

2013-09-23 Thread Valder Gallo
:D On Mon, Sep 23, 2013 at 10:12 AM, Lachlan Musicman wrote: > On 23 September 2013 22:47, Valder Gallo wrote: > > Sorry, i really don´t understand why you need this. > > To mail merge details taken in web app into a report. > > > If you just wanna

Re: "Writing First App" Tutorial - no settings

2013-09-23 Thread pa xapy
which version of tutorial you working through? which version of django did you use? usually, with latest versions. your settings.py file should be in .../myproject/myproject/ folder. On Monday, September 23, 2013 2:04:07 PM UTC+4, Avril Lang wrote: > > So I'm obviously a newbie and working my

Re: CSV output

2013-09-23 Thread Lachlan Musicman
On 23 September 2013 22:47, Valder Gallo wrote: > Sorry, i really don´t understand why you need this. To mail merge details taken in web app into a report. > If you just wanna convert one object in a list string. > > map(str, object.__dict__.values()) Thanks! Very

Re: No settings file in Django tutorial.

2013-09-23 Thread Avril Lang
Thank you! On Monday, September 23, 2013 12:09:50 PM UTC+2, Avril Lang wrote: > > Newb needs some help making the tutorial go > > As you can see here I can create a new project and run the server but the > only file in my project is manage.py. Where is "settings.py" and how can I > get it in

Re: CSV output

2013-09-23 Thread Valder Gallo
Sorry, i really don´t understand why you need this. If you just wanna convert one object in a list string. map(str, object.__dict__.values()) Other projects to export CSV. https://github.com/valdergallo/data-importer https://pypi.python.org/pypi/django-export

Re: No settings file in Django tutorial.

2013-09-23 Thread Frankline
You are trying to change directory through a file i.e. settings.py. This is obviously not a directory but a file. In any case, it does not exist within that directory level. What you need to do is: $ cd winker $ ls And you will see your setting file I am assuming your directory structure is as

No settings file in Django tutorial.

2013-09-23 Thread Avril Lang
Newb needs some help making the tutorial go As you can see here I can create a new project and run the server but the only file in my project is manage.py. Where is "settings.py" and how can I get it in the proper location? Last login: Mon Sep 23 09:19:47 on ttys000 new-host:~ avrillang$

"no such column" database error in admin

2013-09-23 Thread Beverly Block
I'm trying to use the admin interface, and while it's working for my User object, when I try to access the Event object I get this: Request Method: GET Request URL: http://localhost:8000/admin/test1/event/ Django Version: 1.5.4 Exception Type: DatabaseError Exception Value: no such

Re: Is there a tutorial for django-allauth?

2013-09-23 Thread Floyd Gregori
http://web.archive.org/web/20130202050244/http://techstricks.com/django-allauth-tutorial-step-by-step/ You're welcome -- 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

"Writing First App" Tutorial - no settings

2013-09-23 Thread Avril Lang
So I'm obviously a newbie and working my way through the tutorial. I created a project using startproject but whereas the tutorial is showing that I should see various files in this directory (__init__.py, settings.py etc) I can only see manage.py. I can connect to the server using runserver

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-23 Thread Derek
Hi Yes, you are right: deleting the _fixture_setup method allows the tests to run successfully! I also do have all my fixture data stored in 'appname/fixtures/initial_data.json' so I assume from what you say that this data will only be loaded once for all the tests. Once I have more

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-23 Thread Derek
Hi Rafael Yes, you are right: deleting the _fixture_setup method allows the tests to run successfully! I also do have all my fixture data stored in 'appname/fixtures/initial_data.json' so I assume from what you say that this data will only be loaded once for all the tests. Once I have more