Re: UdateView Issues

2014-09-17 Thread Lachlan Musicman
Show us the URLs - the update url requires either a slug OR a pk - one is sufficient, so you don't need to set up a slug. But the update cbv can only be called from an object's url (the one that you would like to update) - it can't be called from just anywhere. cheers L. On 18 September 2014 02:5

Sitemaps - multiple locations per object

2014-09-17 Thread PRyan
Hello, I have business objects which have multiple urls each. The sitemap for the business objects them self work and I get the following: /store/ However, each business has sites specific to it. So I need sitemaps to create: /store/ /store//contact /store//about Is there a way I can get Sitema

Re: Struggling with One to One relationships

2014-09-17 Thread Lachlan Musicman
When using the CBVs, the error actually made me consider that I should be using UpdateView rather than CreateView, but that doesn't work - I don't want to change the underlying Job, I just want to add another, as yet non existent, o2o to it. Cheers L. On 18 September 2014 09:48, Lachlan Musicman

Re: Struggling with One to One relationships

2014-09-17 Thread Lachlan Musicman
I get the same error across CBV and FBV when trying to create the second o2o relationship to the super/concrete model Job [2014-09-17 11:49:26] null value in column "date_opened" violates not-null constraint "date_opened" is a var on the Job model. I don't understand why it's trying to create a

Re: Generic way to create forms (not admin forms)

2014-09-17 Thread Mario Gudelj
Look at how mezzanine CMS does it. I think Stephen called it form for forms at one stage. It uses standard relational schema for everything. On 18/09/2014 1:07 am, "Collin Anderson" wrote: > We store the field structure using JSON and then use that information to > construct a django ModelField

Loading timezone naive data into your test database with USE_TZ = True

2014-09-17 Thread Robert Rollins
I have a legacy database from which my Django application must migrate data into a Django database. The relevant date fields are actually TIMESTAMP columns in the database, but something (perhaps Django, or python's MySQL driver?) loads these columns as timezone naive datetime objects, rather t

Re: UdateView Issues

2014-09-17 Thread Michael Martin
Collin, You are right I was missing the .as_view() I am now getting an exception: Exception Value: Generic detail view GeneralConfigurationUpdate must be called with either an object pk or a slug. I looked at the example here and I don't see anything mentioning setting up a slug. I believe a

Re: display the elements from a database in a forms

2014-09-17 Thread Devin Cky
2 months ago yes !! please i need your help .. it's very importante for me !!! -- 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...@googleg

Re: Auto generating API documentation for SoapLib 0.8 + Django?

2014-09-17 Thread Tom Evans
On Tue, Sep 16, 2014 at 7:18 PM, Stodge wrote: > We implemented a simple SOAP service using SoapLib 0.8 in our Django project > a long time ago. We think he created an API document that we want to send to > clients. I have a vague recollection that he somehow auto-generated the APIs > from the sou

unbalanced parenthesis

2014-09-17 Thread James Schneider
You likely have a regular expression that is trying to match using groups, and a '(' or ')' are missing or added as extras without a mate. http://lmgtfy.com/?q=Python+unbalanced+parenthesis&l=1 -James On Wednesday, September 17, 2014, ngangsia akumbo > wrote: > i dont understand what is going o

Re: unbalanced parenthesis

2014-09-17 Thread Mark Phillips
There is no way anyone can help you with this limited information. 1. Please read - http://www.catb.org/esr/faqs/smart-questions.html 2. Always use Google first before posting a question. Look at the error message - the package re threw the exception with the message of "unbalanced parenthesis".

Re: No modpython.py in python-django 1.6.6-1, which package includes modpython.py?

2014-09-17 Thread Collin Anderson
I recommend switching from mod_python to mod_wsgi, as django doesn't officially support mod_python anymore. https://docs.djangoproject.com/en/dev/releases/1.3/#mod-python-support -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe f

Re: Django datetime localisation by user session

2014-09-17 Thread Collin Anderson
Yes, I'd use the *_INPUT_FORMATS settings for this. The first format in the list is how it will be displayed in the admin, though anything in the list is acceptable. You _may_ need to turn off USE_L10N. not sure. -- You received this message because you are subscribed to the Google Groups "Dja

Re: UdateView Issues

2014-09-17 Thread Collin Anderson
are you calling as_view() when installing your view in urls.py? Could you post the rest of the traceback? -- 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

unbalanced parenthesis

2014-09-17 Thread ngangsia akumbo
i dont understand what is going on i need some help error at /admin/ unbalanced parenthesis Request Method:GETRequest URL:http://localhost:8000/admin/Django Version: 1.4.3Exception Type:errorException Value: unbalanced parenthesis Exception Location:/usr/lib/python2.7/re.py in _compile, line 24

Re: Struggling with One to One relationships

2014-09-17 Thread Collin Anderson
what happens when you try? -- 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

Re: Auto generating API documentation for SoapLib 0.8 + Django?

2014-09-17 Thread Collin Anderson
I'd ask on the SoapLib mailing list. Otherwise, there are python-general tools that auto-generate (poor quality) documentation from python. like pydoc: https://docs.python.org/2/library/pydoc.html -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Generic way to create forms (not admin forms)

2014-09-17 Thread Collin Anderson
We store the field structure using JSON and then use that information to construct a django ModelField (so django can render the html and do validation). If you just want to be able to create HTML form elements (without backend validation), I think storing them as HTML is the way to go, rather

Best way of render differnt types of a Model

2014-09-17 Thread Julo Waks
Good day list! After much dealing with this problem I decided to share it with fresh minds to get a new perspective. situation: In the project we have a model that is Promo, which in turn has different types of promos (FK to Promo models) and these types of promo are different and defined which

Re: Right way to create proxy to User model in Django 1.7

2014-09-17 Thread Collin Anderson
Interesting yeah, why not create a "new" user model inheriting from AbstractBaseUser, and have it _not_ be a proxy model? It should have pretty much the same effect. You may need to say class Meta: db_table = 'auth_user'. -- You received this message because you are subscribed to the Google Gr

Re: What's the best way to track created by and modified by in Django 1.7?

2014-09-17 Thread Collin Anderson
I don't think anything new was added in 1.7 to help this. save_model() is still probably the best way to do it. https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model -- You received this message because you are subscribed to the Google Groups "Dj

Re: LIMIT 21 on primary key lookups

2014-09-17 Thread Collin Anderson
We simply picked a number, not too large and not too small. The number 20 is now hardcoded as MAX_GET_RESULTS at the top of this file: https://github.com/django/django/blob/master/django/db/models/query.py Here's the discussion where the number came up: https://groups.google.com/forum/#!topic/dj

Re: develeopment servers stops at syntax error.

2014-09-17 Thread Collin Anderson
I think it's because of the new check framework. The check framework runs and validates more of the website and looks for errors long before the the "runserver" management command has a chance to start the reloading process. -- You received this message because you are subscribed to the Google

Re: Install Django Apps via Admin Interface

2014-09-17 Thread Thomas Güttler
Am 12.09.2014 um 18:23 schrieb Collin Anderson: And you would expect that to happen just through admin? Would you trust your users really to do all that - basically giving full control what users installs to your system without discretion? Installing apps via the admin would be usef

Re: What't the best way to track created by and modified by in Django 1.7?

2014-09-17 Thread Fred Stluka
Russ, Thanks for another classic Russ Magee answer! As usual, you are succinct, accurate, relevant, prompt, specific, and very helpful. There are an amazing number of helpful people on this list, so the bar is already pretty high, but you continue to raise it. Keep up the good work! --Fred ---

Re: No modpython.py in python-django 1.6.6-1, which package includes modpython.py?

2014-09-17 Thread Hannu Krosing
On 09/17/2014 01:52 PM, nobody wrote: > > Hi, > > In Debian 6.0.4, I installed python-django 1.4.5-1 which got > /usr/lib/python2.6/dist-packages/django/contrib/auth/handlers/modpython.py. > That file is not included in python-django 1.6.6-1 for the Wheezy, > and I've got following error from apa

No modpython.py in python-django 1.6.6-1, which package includes modpython.py?

2014-09-17 Thread nobody
Hi, In Debian 6.0.4, I installed python-django 1.4.5-1 which got /usr/lib/python2.6/dist-packages/django/contrib/auth/handlers/modpython.py. That file is not included in python-django 1.6.6-1 for the Wheezy, and I've got following error from apache2. How can I fix it? Which package should I

Django datetime localisation by user session

2014-09-17 Thread Philip Goh
Hello, I'm trying to localise the date time format in my product so that it appears in the UK format of DD/MM/ HH:MM by default unless the user explicitly changes it to the US format of MM/DD/ HH:MM. I've got a number of modal forms that contain a `DateTimeField` and I've overridden th

UdateView Issues

2014-09-17 Thread Michael Martin
I was looking into the generic views that existed and I hoping that this view would work for me. I expect that the view will display current model as an editable form. But I am having issues, I get some odd exception. Can someone that has experience please help me? UpdateView *class *django.

Re: regarding frame work

2014-09-17 Thread James Schneider
The front end design framework you use for styling the HTML rendered by your Django templates is completely up to you. All you'll need to do is include the tags pointing to your style sheets in the template code, and make sure that something is correctly serving your static files (ie your .css or .

Re: display the elements from a database in a forms

2014-09-17 Thread DJ-Tom
Well, that is a very "high level" question... did you already work your way through the Django tutorials to get a grip on the basics...? https://docs.djangoproject.com/en/1.7/intro/tutorial01/ Am Dienstag, 16. September 2014 13:32:17 UTC+2 schrieb Devin Cky: > > > hi I want to know how to displa