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 display the elements from a database in a django 
> forms ?  i use postgresql .  please help 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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8de39444-76dc-4748-845d-16490ec915db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 .js files that Django does not create on the fly), whether it is
the local dev server or a full blown web server application like Apache.

Just have the Django templates generate the HTML you would expect as if
writing it in an IDE.

I would suggest running through the entire tutorial, but part 6 covers
referencing static style sheets in the templates. You'll just need to make
Foundation's files (or Bootstrap or whatever you are using) available as
static files, and adjust your templates accordingly:
https://docs.djangoproject.com/en/1.7/intro/tutorial06/

-James


On Tuesday, September 16, 2014, rajashekar reddy <
rajashekarreddy2...@gmail.com> wrote:

> hello,
> i want to use foundation frame work in django for front end . DO can any
> one say how to use foundation frame work for django?
>
> --
> 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@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dcffa407-bab6-4be8-9f84-1b5596b11734%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWo5wLmBE%3D%2Br_75tqfdA1%2BDwHzZy6sZKsLcTkc3WS15Gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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.views.generic.edit.UpdateView

A view that displays a form for editing an existing object, redisplaying
the form with validation errors (if there are any) and saving changes to
the object. This uses a form automatically generated from the object’s
model class (unless a form class is manually specified).

*Ancestors (MRO)*

This view inherits methods and attributes from the following views:

   - django.views.generic.detail.SingleObjectTemplateResponseMixin
   

   - django.views.generic.base.TemplateResponseMixin
   

   - django.views.generic.edit.BaseUpdateView
   - django.views.generic.edit.ModelFormMixin
   

   - django.views.generic.edit.FormMixin
   

   - django.views.generic.detail.SingleObjectMixin
   

   - django.views.generic.edit.ProcessFormView
   

   - django.views.generic.base.View
   


*Attributes*
 template_name_suffix

The UpdateView page displayed to a GET request uses a template_name_suffix
of '_form'. For example, changing this attribute to '_update_form' for a
view updating objects for the example Author model would cause the default
template_name to be 'myapp/author_update_form.html'.
 object

When using UpdateView you have access to self.object, which is the object
being updated.

*Example myapp/views.py*:

from django.views.generic.edit import UpdateViewfrom myapp.models import Author
class AuthorUpdate(UpdateView):
model = Author
fields = ['name']
template_name_suffix = '_update_form'

 *Example myapp/author_update_form.html*:

{% csrf_token %}
{{ form.as_p }}




__init__() takes exactly 1 argument (2 given)

 Request Method: GET  Request URL:
http://127.0.0.1:8080/gateway/config/generalconfig/  Django Version:
1.7.1  Exception
Type: TypeError  Exception Value:

__init__() takes exactly 1 argument (2 given)

 Exception Location:
C:\jython2.7b2\Lib\site-packages\django-1.7.1-py2.7.egg\django\core\handlers\base.py
in get_response, line 111  Python Executable: None  Python Version:
2.7.0  Python
Path:

['C:\\Users\\mike\\workspace\\ciscoebondinggateway',
 'C:\\Users\\mike\\workspace\\ciscoebondinggateway',
 'C:\\Users\\mike\\workspace\\lwc\\lib\\postgresql-9.3-1102.jdbc41.jar',
 'C:\\jython2.7b2\\Lib\\site-packages\\setuptools-5.7-py2.7.egg',
 'C:\\jython2.7b2\\Lib\\site-packages\\pip-1.5.6-py2.7.egg',
 'C:\\jython2.7b2\\Lib\\site-packages\\django_jython-1.7.0b2-py2.7.egg',
 'C:\\jython2.7b2\\Lib\\site-packages',
 'C:\\jython2.7b2\\Lib',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\resources.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\rt.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\jsse.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\jce.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\charsets.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\jfr.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\access-bridge-32.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\dnsns.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\jaccess.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\localedata.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\sunec.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\sunjce_provider.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\sunmscapi.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\sunpkcs11.jar',
 'C:\\Program Files (x86)\\Java\\jre7\\lib\\ext\\zipfs.jar',
 'C:\\jython2.7b2\\Lib\\site-packages\\django-1.7.1-py2.7.egg',
 '__classpath__',
 '__pyclasspath__/']

 Server time: Wed, 17 Sep 2014 02:23:28 -0700

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-u

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 the format by doing the following:

class StoreForm(FormBase):
def __init__(self, *args, **kwargs):
super(StoreForm, self).__init__(*args, **kwargs)
#Localise date format
self.fields["CreationTime"].widget.format = "%m/%d/%Y %H:%M"

Note that the code is drastically simplified as it forces the US date time 
format. Now the date correctly displays in the US time format, but the form 
fails to validate on POST. It thinks that the date format is invalid.

I've left the 
[DATETIME_INPUT_FORMATS](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-DATETIME_INPUT_FORMATS)
 
variable in `settings.py` untouched (i.e. default for the locale). Perhaps 
this is the mistake? 

As a general note, I've found the localisation documentation for Django to 
be quite insufficient so I am totally happy to be pointed in the right 
direction if my approach here is thoroughly wrong.

Kind regards,
Phil

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/72d918e9-660b-419c-9826-842f61a08ceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 install to get the modpython.py?

ImportError: No module named modpython

Thank you.

-j 

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e2ad0d0b-b184-4ab7-8eff-fbc5803237a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 apache2. How can I fix it? Which
> package should I install to get the modpython.py?
Try libapache2-mod-python

Cheers
Hannu

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54197DD6.5040007%40krosing.net.
For more options, visit https://groups.google.com/d/optout.


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

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


On 9/16/14 7:29 PM, Russell Keith-Magee wrote:

Hi Michael,

There's nothing built into Django 1.7, or any previous version; 
however, it's also not hard to implement yourself. All you have to do 
is override the save method on your model, and in that method, and 
store whatever audit information you want to record. So, for example, 
if you want to just keep a track of the person who most recently 
edited a record, you could do something like:


class MyModel(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL)
... (other fields here)

def save(self, user, *args, **kwargs):
return super(MyModel, self).save(*args, **kwargs)

Then, every time you save an instance of MyModel, you need to pass in 
the user who saved the record; e.g.:


MyModel.objects.save(request.user)

If you want to record a full audit record of every edit, you could do 
that too; you just create a secondary model type, and every time you 
save your base model, you create an instance of the secondary type as 
well.


If you don't want to roll it yourself (or your use case is fairly 
generic), you might find some pre-rolled django apps that can help:


https://www.djangopackages.com/grids/g/versioning/

I can't speak from experience on any of them, but they exist, and you 
might find that one of them meets your needs.


Yours,
Russ Magee %-)

On Tue, Sep 16, 2014 at 10:55 AM, Michael Martin 
mailto:mikemartin...@gmail.com>> wrote:


Hello,

I am sure that I am not the first person to ask this question, but
I want to know the best way to track who created or modified a
record in my settings defined within models.py.  Is there
something new and great added to 1.7 or something that already
exists in older versions?


Thank you in advance
-- 
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@googlegroups.com
.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAD0urK3rTvDdkRnTZcsv_b45pV734JApGFAiY3%2BqFO_%3D1vWkzA%40mail.gmail.com

.
For more options, visit https://groups.google.com/d/optout.


--
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@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJxq849xiO%2B51BirpKCWv1EiMKDeuTo1-t26MVWnM1vmvmh7zg%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/541987B7.60801%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


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 useful when the user is the same person 
as the sysadmin.\

However as we mentioned, Django really isn't architected for this.




I could see Django-CMS creating a sub architecture
that would allow for this sort of thing. Basically, you would need to create 
some sort of package of code that would
work without getting added to INSTALLED_APPS.



It would be nice if such a sub architecture would be outside of django-cms, to 
make it more reusable.

  Thomas

--
Thomas Güttler
http://thomas-guettler.de/

--
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54199A90.3030002%40tbz-pariv.de.
For more options, visit https://groups.google.com/d/optout.


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 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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53dc16d4-2d7c-48d4-9f6a-1c73e5ff9e82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/django-developers/PkzS9Wv6hIU/discussion

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/46565059-11bd-4115-8e47-6f217b426072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
"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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7ec27485-7c98-43eb-bce0-bf59ff7055e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58cf1cf2-9078-4ea0-b674-de0ef3aead29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 things should be displayed.
Now  when users access / promo / 1 /, what we do is nested if askinf for
the type of promo and then setting the template_name and o_promo (model
specific type promotion)
Obviously this design is not very scalable because if one day there are 10
types of promos, have 10 if is not the most Pythonic.
The solution I found is to define the model of a method that is Promo
get_promo_handler () and return a class according to the type of promo is
promo and that has methods like render () or other methods for logic
necesaarios project (generate coupons, decide if the promotion is finished,
etc.)

The example code is here [0]

Being new to python I open a lot of doubts.

1 is the best solution for this? What other ways are there?
2 I am implementing the best way?
3 I am using appropriately ABCMeta [1]? maybe you should use something like
__new__ [2]?
4. not quite understand is the ducktyping [3] and how it affects all this.

Thank you very much in advance,
regards,
Julo


[0] http://linkode.org/p39S0VryugbTFPXXhkVb94
[1] https://docs.python.org/2/library/abc.html
[2] https://docs.python.org/2/reference/datamodel.html#object.__new__
[3] https://docs.python.org/2/glossary.html#term-duck-typing

put all the links because they are using to try to understand the
components.

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKSEZ1EG01XkE_fkuvyJihH751r06WPwYLtPNYqLsxJwfhc_oA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 than 
somehow translating them to JSON and back. If needed, you can store extra 
information using class="" or data-*="".

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/678735de-3d19-4dfe-a317-7d9305da9691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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" 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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ab1aba35-5eb2-4d35-9f5b-2c9e3fff677e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dea67a67-a3ee-4439-9a61-2f6f6cae98ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 244Python 
Executable:/usr/bin/pythonPython Version:2.7.6Python Path:

['/home/yems/apps/project1',
 '/usr/lib/python2.7/dist-packages',
 '/usr/local/lib/python2.7/dist-packages/django_mptt-0.6.0-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/pytz-2014.7-py2.7.egg',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-i386-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']

Server time:Wed, 17 Sep 2014 16:13:15 +0100

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/88f2339c-1c46-4d14-b604-a0516cc95151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86cd4f96-f6ed-4e79-a35a-e8a27e3cbd79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
"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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0b2ecccf-e7df-47f2-9fdb-9af7aac11f84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2e1bd3c9-bf7d-496f-a852-f779b9262930%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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". You are working in python. Google will hep you -
search on "python re unbalanced parenthesis" - 278,000 hits. Lots of
information to help track down the problem. Ignore the misspelling of
parenthesis

3. If you are still confused, then post the relevant code snippets and what
you have done to solve the problem and what you do not understand.

If all of the above does not work, then send me at least three bitcoins and
I will look at your code to find the problem.just kidding. The point is
that no one in the forum is paid to solve your problems, so be respectful
of everyone's donated time and make the effort to (1) solve your
own problem first and (2) then ask very specific questions.

Mark

On Wed, Sep 17, 2014 at 8:14 AM, ngangsia akumbo  wrote:

> 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 244Python
> Executable:/usr/bin/pythonPython Version:2.7.6Python Path:
>
> ['/home/yems/apps/project1',
>  '/usr/lib/python2.7/dist-packages',
>  '/usr/local/lib/python2.7/dist-packages/django_mptt-0.6.0-py2.7.egg',
>  '/usr/local/lib/python2.7/dist-packages/pytz-2014.7-py2.7.egg',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-i386-linux-gnu',
>  '/usr/lib/python2.7/lib-tk',
>  '/usr/lib/python2.7/lib-old',
>  '/usr/lib/python2.7/lib-dynload',
>  '/usr/local/lib/python2.7/dist-packages',
>  '/usr/lib/python2.7/dist-packages/PILcompat',
>  '/usr/lib/python2.7/dist-packages/gst-0.10',
>  '/usr/lib/python2.7/dist-packages/gtk-2.0',
>  '/usr/lib/pymodules/python2.7',
>  '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
>  '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
>
> Server time:Wed, 17 Sep 2014 16:13:15 +0100
>
> --
> 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@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/88f2339c-1c46-4d14-b604-a0516cc95151%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2MhOfUzzW8rmhWVMqjSThn%3DWf0muitu6m3zLgFBoVeU7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 244Python
> Executable:/usr/bin/pythonPython Version:2.7.6Python Path:
>
> ['/home/yems/apps/project1',
>  '/usr/lib/python2.7/dist-packages',
>  '/usr/local/lib/python2.7/dist-packages/django_mptt-0.6.0-py2.7.egg',
>  '/usr/local/lib/python2.7/dist-packages/pytz-2014.7-py2.7.egg',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-i386-linux-gnu',
>  '/usr/lib/python2.7/lib-tk',
>  '/usr/lib/python2.7/lib-old',
>  '/usr/lib/python2.7/lib-dynload',
>  '/usr/local/lib/python2.7/dist-packages',
>  '/usr/lib/python2.7/dist-packages/PILcompat',
>  '/usr/lib/python2.7/dist-packages/gst-0.10',
>  '/usr/lib/python2.7/dist-packages/gtk-2.0',
>  '/usr/lib/pymodules/python2.7',
>  '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
>  '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
>
> Server time:Wed, 17 Sep 2014 16:13:15 +0100
>
> --
> 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@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/88f2339c-1c46-4d14-b604-a0516cc95151%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVHzuBHT1PPu8KJZdXPkUp1FZ5J9%2BG1V%2BhODao_wxHc0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 source code. However, we can't find the document and the developer
> isn't here anymore. Is anyone aware of a tool that auto-generates API
> documentation for SoapLib with Django?

Sphinx, http://sphinx-doc.org/ , is used by many projects including
Python itself and Django to generate project documentation, and it
understands python code so can easily be used to create API doc as
well as any kind of documentation.

Cheers

Tom

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1L9RPVxH%3DbfjskKaJ1JEzHQ62oGFKewADh-2GORcmaT1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e940333-c67c-46ce-a38d-e279fa4c62bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 slug is when a previous url redirects with a value
attached such as (?P[0-9]+)

Does this mean that I have to create an additional view to pass the object
that I am interested in?



On Wed, Sep 17, 2014 at 8:16 AM, Collin Anderson 
wrote:

> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/86cd4f96-f6ed-4e79-a35a-e8a27e3cbd79%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD0urK3QzNmnXDVGf9d5%2B0VcaMPBCuWJwEmCUKHorkB7inoJxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 
than integers. So I wrote my migration code under the assumption that the 
dates coming out of the legacy database are timezone naive.

Unfortunately, now that I'm trying to write tests for this migrator, I 
can't find any way to load timezone naive datetimes *into* my test legacy 
database. I can't use integer timestamps, because the DateTimeField doesn't 
accept that kind of input (I get a JSON serialization error when I try), so 
I'm using datetime strings like this: "2014-08-01T00:00:00" in my fixture. But 
regardless of whether or not I include a UTC offset in the string, the 
datetime objects that come out of the database during my tests are somehow 
timezone aware. This causes my code to crash because it calls make_aware(), 
which throws ValueError('Not naive datetime (tzinfo is already set)'). 

It seems like having USE_TZ = True is forcibly making my fixture dates 
timezone aware, which I don't want. But USE_TZ will be True during the 
actual migration, so I can't just turn it off during the tests. So how can 
I load timezone naive dates into my test database?

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d0eb046a-ee9a-42ba-9dd7-40b92d4fdb52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 (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 than
> somehow translating them to JSON and back. If needed, you can store extra
> information using class="" or data-*="".
>
>  --
> 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@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/678735de-3d19-4dfe-a317-7d9305da9691%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHqTbjmTQQ%3D0SWuWj8Gn4gUPZjRDmBJuA7UQaHnjHOWDZfrWFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 new Job when I've already assigned one?

Details:

When I moved from CBV to FBV I explicitly created the secondary Job,
then assigned the o2o var to the job in question.

My urls are modelled on the job, to make passing the job easier. The
two "add" functions here are for adding the second o2o relationship:

url(r'^job/(?P[-\w]+)/workshop/$',
views.WorkshopJobDetail.as_view(), name='wsjob_detail'),
url(r'^job/(?P[-\w]+)/workshop/add/$', views.workshop_add, name='ws_add'),

url(r'^job/(?P[-\w]+)/engineering/$',
views.EngineeringJobDetail.as_view(), name='enjob_detail'),
url(r'^job/(?P[-\w]+)/engineering/add/$', views.engineering_add,
name='en_add'),

In the view:

def workshop_add(request, slug):
  job = Job.objects.get(slug=slug)
  if request.method == 'POST':
form = WSAddForm(request.POST)
if form.is_valid():
  workshop_job = WorkshopJob()
  workshop_job = job
  workshop_job.quote_required = form.cleaned_data['quote_required']
  workshop_job.invoice_number = form.cleaned_data['invoice_number']
  workshop_job.part = form.cleaned_data['part']
  workshop_job.serial_or_lot = form.cleaned_data['serial_or_lot']
  workshop_job.serial_or_lot_number =
form.cleaned_data['serial_or_lot_number']
  workshop_job.work_order = form.cleaned_data['work_order']
  workshop_job.save()
  return redirect(workshop_job)
  else:
form = WSAddForm()
  return render(request, 'jobs/workshop_form.html', {'form':form, 'object':job})






On 18 September 2014 01:13, Collin Anderson  wrote:
> 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-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dea67a67-a3ee-4439-9a61-2f6f6cae98ef%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing and KEEP THEIR IDIOT
MOUTHS SHUT about it, because it is much more important to sound
intelligent when talking to your friends.
This post was STUPID.
---
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiOUGzHZe_Xab7PY1rEJUKWuYTLLxTt0jCrgjuNBwLwKGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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  wrote:
> 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 new Job when I've already assigned one?
>
> Details:
>
> When I moved from CBV to FBV I explicitly created the secondary Job,
> then assigned the o2o var to the job in question.
>
> My urls are modelled on the job, to make passing the job easier. The
> two "add" functions here are for adding the second o2o relationship:
>
> url(r'^job/(?P[-\w]+)/workshop/$',
> views.WorkshopJobDetail.as_view(), name='wsjob_detail'),
> url(r'^job/(?P[-\w]+)/workshop/add/$', views.workshop_add, 
> name='ws_add'),
>
> url(r'^job/(?P[-\w]+)/engineering/$',
> views.EngineeringJobDetail.as_view(), name='enjob_detail'),
> url(r'^job/(?P[-\w]+)/engineering/add/$', views.engineering_add,
> name='en_add'),
>
> In the view:
>
> def workshop_add(request, slug):
>   job = Job.objects.get(slug=slug)
>   if request.method == 'POST':
> form = WSAddForm(request.POST)
> if form.is_valid():
>   workshop_job = WorkshopJob()
>   workshop_job = job
>   workshop_job.quote_required = form.cleaned_data['quote_required']
>   workshop_job.invoice_number = form.cleaned_data['invoice_number']
>   workshop_job.part = form.cleaned_data['part']
>   workshop_job.serial_or_lot = form.cleaned_data['serial_or_lot']
>   workshop_job.serial_or_lot_number =
> form.cleaned_data['serial_or_lot_number']
>   workshop_job.work_order = form.cleaned_data['work_order']
>   workshop_job.save()
>   return redirect(workshop_job)
>   else:
> form = WSAddForm()
>   return render(request, 'jobs/workshop_form.html', {'form':form, 
> 'object':job})
>
>
>
>
>
>
> On 18 September 2014 01:13, Collin Anderson  wrote:
>> 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-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/dea67a67-a3ee-4439-9a61-2f6f6cae98ef%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> You have to be really clever to come up with a genuinely dangerous
> thought. I am disheartened that people can be clever enough to do that
> and not clever enough to do the obvious thing and KEEP THEIR IDIOT
> MOUTHS SHUT about it, because it is much more important to sound
> intelligent when talking to your friends.
> This post was STUPID.
> ---
> The Most Terrifying Thought Experiment of All Time
> http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html



-- 
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing and KEEP THEIR IDIOT
MOUTHS SHUT about it, because it is much more important to sound
intelligent when talking to your friends.
This post was STUPID.
---
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiOQp4pAzU35Hmj%2Bgz_NxqrqKaxc0-3d9idLo0NkkTBUWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 Sitemaps to go through the urls.py of that app, or 
tell it the locations I want per object?

Thanks!

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/17a50c25-8f57-45ca-9bce-5a801361b2c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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:51, Michael Martin  wrote:

> 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 slug is when a previous url redirects with a value
> attached such as (?P[0-9]+)
>
> Does this mean that I have to create an additional view to pass the object
> that I am interested in?
>
>
>
> On Wed, Sep 17, 2014 at 8:16 AM, Collin Anderson 
> wrote:
>
>> 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-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/86cd4f96-f6ed-4e79-a35a-e8a27e3cbd79%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAD0urK3QzNmnXDVGf9d5%2B0VcaMPBCuWJwEmCUKHorkB7inoJxA%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
You have to be really clever to come up with a genuinely dangerous thought.
I am disheartened that people can be clever enough to do that and not
clever enough to do the obvious thing and KEEP THEIR IDIOT MOUTHS SHUT
about it, because it is much more important to sound intelligent when
talking to your friends.
This post was STUPID.
---
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

-- 
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@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiNQrnrDvH-MEMHG-7GBU1_iMie5qcUX5%2BSzFQm0n8yBBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.