Re: Confused by STATICFILES_DIRS not working

2014-09-24 Thread Thabang Bernette Tseboho
Yes, it's very odd. The only thing that fixes it is setting
STATIC_URL="static/" instead if "/static/"
On 23 Sep 2014 8:47 PM, "Collin Anderson"  wrote:

> So it works fine in production, when DEBUG = False, but not on your local
> runserver when DEBUG = True?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/MUwh10d2Ow8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/bbf788c0-9024-4ff8-b506-659ef1566a58%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/CANEDN0LsY%3Dek%3D_04GBiGxn7zHJzXLWrVNC3CgQwx09C0nCUPzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka  wrote:
> Kamal, does this fill in the gaps for you?  If not, let us know.

I've used this example in my app and getting this, in Firefox console,
on clicking the link:
http://pastie.org/9590027

Here is what I get as output:
http://awesomescreenshot.com/0413ji0643

It's not recoganizing the HTML template returned, I guess. Where can be the
problem now?

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

-- 
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/CAP8Q%2BxjeKDNakCk4BBiKKq4t7xOEt_xPf96-Poi7DgANPuzNRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to delete cookie

2014-09-24 Thread Daniel Rus Morales
It sounds like you have a same-origin policy issue. If the external 
authentication site and your site have different origins you can’t delete their 
cookies with your responses. Does not the external authentication site provide 
you with a method to logout?

On 23 Sep 2014, at 19:09, Tao Bojlen  wrote:

> Hi,
> 
> I'm using a custom authentication backend for my Django project, and in order 
> to log out I have to delete a cookie that's set by the (external) 
> authentication site.
> Here is my view code:
> 
> response = django_logout(request,
>  next_page=post_logout_url)
> response.delete_cookie('cookie_name',
> domain="cookie_domain")
> return response
> 
> The Set-Cookie header of the view is fine:
> cookie_name=; Domain=cookie_domain; expires=Thu, 01-Jan-1970 00:00:00 GMT; 
> Max-Age=0; Path=/
> 
> But the cookie isn't changed at all - it has the same value and expiry date 
> ("end of session") as before logging out.
> 
> Does anyone have any ideas about why this is happening?
> 
> -- 
> 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/1c643254-9800-4978-a236-a67d40cb973d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



signature.asc
Description: Message signed with OpenPGP using GPGMail


What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread anton
Hi,

actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
to develop Django apps (on Windows and Linux).

What I (personally) need from an ide:
 1. ability to debug (python code)
 2. support for django templates
 3. support for django (start a new project, adding a django app)
 4. support for refactoring (like rename and so on)
 5. support for mercurial
 6. multi plattform (at least windows/linux)

Starting with *django 1.7*, aptana marks some line
as errors which are not errors (undefined variables from import ..)

Now I have the following problem:
 
 - I tried the actual aptana 3.6.0, but it is buggy and does not work
   (no idea if and when it will be fixed, the development
   speed is actually slow)

 - if I use eclipse + actual pydev 3.7.1 I have
   no support for *django templates*

 - all other ides like PyCharm are commercial (the free pycharm does
   not support django and django templates, only python)

Now the question: does somebody know a solution?

Thanks

 Anton
  

-- 
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/lvu3as%24pba%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Jorge Andrés Vergara Ebratt
I actually use a text editor, I love Sublime Text 2 with the Djaneiro
Plugin.

As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE and
it's pretty cool.

2014-09-24 4:36 GMT-05:00 anton :

> Hi,
>
> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
> to develop Django apps (on Windows and Linux).
>
> What I (personally) need from an ide:
>  1. ability to debug (python code)
>  2. support for django templates
>  3. support for django (start a new project, adding a django app)
>  4. support for refactoring (like rename and so on)
>  5. support for mercurial
>  6. multi plattform (at least windows/linux)
>
> Starting with *django 1.7*, aptana marks some line
> as errors which are not errors (undefined variables from import ..)
>
> Now I have the following problem:
>
>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>(no idea if and when it will be fixed, the development
>speed is actually slow)
>
>  - if I use eclipse + actual pydev 3.7.1 I have
>no support for *django templates*
>
>  - all other ides like PyCharm are commercial (the free pycharm does
>not support django and django templates, only python)
>
> Now the question: does somebody know a solution?
>
> Thanks
>
>  Anton
>
>
> --
> 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/lvu3as%24pba%241%40ger.gmane.org
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Jorge Andres Vergara Ebratt*
*#SoftwareDeveloper (Or at least trying to be)*
*@javebratt*
*facebook.com/javebratt *

-- 
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/CAAeX05G8FFNv_1Uv39%3DxGTf9_3T_CRRXSHhmsEWKcn33_AT8Ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread anton
Jorge Andrés Vergara Ebratt wrote:

> I actually use a text editor, I love Sublime Text 2 with the Djaneiro
> Plugin.
> 
hmm this is shareware not opensource as I see :-(

> As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE and
> it's pretty cool.
> 

I will have a look ... but I do not see django & django template support.

But thanks anyway

 Anton

> 2014-09-24 4:36 GMT-05:00 anton :
> 
>> Hi,
>>
>> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
>> to develop Django apps (on Windows and Linux).
>>
>> What I (personally) need from an ide:
>>  1. ability to debug (python code)
>>  2. support for django templates
>>  3. support for django (start a new project, adding a django app)
>>  4. support for refactoring (like rename and so on)
>>  5. support for mercurial
>>  6. multi plattform (at least windows/linux)
>>
>> Starting with *django 1.7*, aptana marks some line
>> as errors which are not errors (undefined variables from import ..)
>>
>> Now I have the following problem:
>>
>>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>>(no idea if and when it will be fixed, the development
>>speed is actually slow)
>>
>>  - if I use eclipse + actual pydev 3.7.1 I have
>>no support for *django templates*
>>
>>  - all other ides like PyCharm are commercial (the free pycharm does
>>not support django and django templates, only python)
>>
>> Now the question: does somebody know a solution?
>>
>> Thanks
>>
>>  Anton
>>
>>
>> --
>> 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/lvu3as%24pba%241%40ger.gmane.org
>> .
>> 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/lvu3sn%249t%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: request.META['REMOTE_USER'] with django runserver

2014-09-24 Thread Tom Evans
On Mon, Sep 22, 2014 at 5:36 PM, Robbie Edwards
 wrote:
> Hi,
>
> On my production server, I'm using REMOTE_USER to provide SSO for an
> internal service.  It works great on the production server.  However, when
> running 'runserver' on the development side, this variable is not set so
> authentication in this manner doesn't work.  Is there a way to config this
> on the development side so I can develop as if it were in place?
>
> thanks

Add middleware on your dev site that sets the appropriate value for
development, eg:

class DevAddRemoteUserMiddleware(object):
  def process_request(self, request):
request.META['REMOTE_USER'] = 'bob'

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/CAFHbX1JbT%3Dbhaf4TMz%2BpbDfhwPG_wO-Z8-Fk1QWzBhAai-Dtgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
Not sure what you are looking for in terms of Django template support.
The only difference between pycharm community (free) and commercial in
terms of Django support that I've noticed is that Django's development
web server won't restart automatically when code changes in the
community edition.  Haven't used community edition since last year, but
I seem to recall, I was still able to have a task to start Django's dev
web server (in debug mode so I can trace through my code as you'd
expect), so as long as I restarted that after making changes, things
were fine.

On Wed, 2014-09-24 at 11:36 +0200, anton wrote:

> Hi,
> 
> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
> to develop Django apps (on Windows and Linux).
> 
> What I (personally) need from an ide:
>  1. ability to debug (python code)
>  2. support for django templates
>  3. support for django (start a new project, adding a django app)
>  4. support for refactoring (like rename and so on)
>  5. support for mercurial
>  6. multi plattform (at least windows/linux)
> 
> Starting with *django 1.7*, aptana marks some line
> as errors which are not errors (undefined variables from import ..)
> 
> Now I have the following problem:
>  
>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>(no idea if and when it will be fixed, the development
>speed is actually slow)
> 
>  - if I use eclipse + actual pydev 3.7.1 I have
>no support for *django templates*
> 
>  - all other ides like PyCharm are commercial (the free pycharm does
>not support django and django templates, only python)
> 
> Now the question: does somebody know a solution?
> 
> Thanks
> 
>  Anton
>   
> 


-- 
Adam (a...@csh.rit.edu)

-- 
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/1411558851.20736.10.camel%40localhost.localdomain.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to delete cookie

2014-09-24 Thread Tao Bojlen
No, in order to log out they just ask that you delete the cookie and 
redirect to their logout page.

The domain of the cookie is the domain of my site, not the external 
authentication service. Could there still be same-origin issues?

Thanks,
Tao

On Wednesday, September 24, 2014 10:07:26 AM UTC+1, Daniel Rus Morales 
wrote:
>
> It sounds like you have a same-origin policy issue. If the external 
> authentication site and your site have different origins you can’t delete 
> their cookies with your responses. Does not the external authentication 
> site provide you with a method to logout?
>
> On 23 Sep 2014, at 19:09, Tao Bojlen > 
> wrote:
>
> Hi,
>
> I'm using a custom authentication backend for my Django project, and in 
> order to log out I have to delete a cookie that's set by the (external) 
> authentication site.
> Here is my view code:
>
> response = django_logout(request,
>  next_page=post_logout_url)
> response.delete_cookie('cookie_name',
> domain="cookie_domain")
> return response
>
> The Set-Cookie header of the view is fine:
> cookie_name=; Domain=cookie_domain; expires=Thu, 01-Jan-1970 00:00:00 GMT; 
> Max-Age=0; Path=/
>
> But the cookie isn't changed at all - it has the same value and expiry 
> date ("end of session") as before logging out.
>
> Does anyone have any ideas about why this is happening?
>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to django...@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/1c643254-9800-4978-a236-a67d40cb973d%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/910dccb0-5251-4a5b-8273-b609532b3522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Sabine Maennel
Mostly it is models in the same app: one is fine and the other one throws 
this error, when I call them from my shell: 

I start my shell and run 

x=.objects.all() 

which runs fine, but then when I want to show x by:

print x 

the error occurs. 

I really do not know what it means, googling it did not help at all. Please 
help. It seems to be something special to Django 1.7? Is it related with 
migrations? 

-- 
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/659f1cc0-c00e-4347-abe4-b874a0cfcd1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
Hello, please help!

Some of my models throw this error, when I query them with object.all(). 
They coexist in apps that have other models that are just fine. I do not 
understand at all what the problem might be and could not google it. 

For example: this would be my models.py in the app "account":

from django.db import models
from django.contrib.auth.models import User
from apps.courseevent.models import CourseParticipation
from apps.transaction.models import Transaction
from model_utils.fields import SplitField
from model_utils.models import TimeStampedModel
from money import Money

class UserStatus(TimeStampedModel):
status_code = models.CharField(max_length=20)
title = models.CharField(max_length=100)
text = models.TextField()

def __unicode__(self):
return u"%s" % (self.title)

class UserAccount(TimeStampedModel):
user = models.ForeignKey(User, unique=True)
about = SplitField()
status = models.ForeignKey(UserStatus)

def __unicode__(self):
return u"%s %s" % (self.user.first_name, self.user.last_name)

def balance(self):
balance = Money(amount='0.00', currency='EUR')
transactions = Transaction.objects.filter(user=self.user_id)
for transaction in transactions:
try:
   transaction_value = Money(amount=transaction.total , 
currency='EUR' )
   balance = balance + transaction_value
except:
   pass
return balance

def participation_level(self):
try:
CourseParticipation.objects.filter(participant=self.user_id,
role = CourseParticipation.ROLE_TEACHER)
return CourseParticipation.ROLE_TEACHER
except:
try:
CourseParticipation.objects.filter(participant=self.user_id,
role = CourseParticipation.ROLE_STUDENT)
return CourseParticipation.ROLE_STUDENT
except:
return None


Then I try to call them via the Python.shell:
from apps.account.models import UserStatus, UserAccount 
x =  UserStatus.objects.all()
y = UserAccount.objects.all()
print x
[, ]
print y
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/query.py",
 
line 119, in __repr__
return repr(data)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/base.py",
 
line 459, in __repr__
u = six.text_type(self)
  File 
"/Users/sabinemaennel/PycharmProjects/netteachers/apps/account/models.py", 
line 23, in __unicode__
return u"%s %s" % (self.user.first_name, self.user.last_name)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
 
line 557, in __get__
val = self.field.get_local_related_value(instance)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
 
line 1429, in get_local_related_value
return self.get_instance_value_for_fields(instance, 
self.local_related_fields)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
 
line 1422, in local_related_fields
return tuple(lhs_field for lhs_field, rhs_field in self.related_fields)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
 
line 1413, in related_fields
self._related_fields = self.resolve_related_fields()
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
 
line 1406, in resolve_related_fields
else self.rel.to._meta.get_field_by_name(to_field_name)[0])
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/options.py",
 
line 416, in get_field_by_name
cache = self.init_name_map()
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/options.py",
 
line 445, in init_name_map
for f, model in self.get_all_related_m2m_objects_with_model():
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/options.py",
 
line 563, in get_all_related_m2m_objects_with_model
cache = self._fill_related_many_to_many_cache()
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/options.py",
 
line 577, in _fill_related_many_to_many_cache
for klass in self.apps.get_models():
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/utils/lru_cache.py",
 
line 101, in wrapper
result = user_function(*args, **kwds)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/apps/registry.py",
 
line 168, in get_models
self.check_models_ready()
  File 
"/Use

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Tom Evans
On Wed, Sep 24, 2014 at 1:12 PM, Sabine Maennel
 wrote:
> Hello, please help!
>
> Some of my models throw this error, when I query them with object.all().
> They coexist in apps that have other models that are just fine. I do not
> understand at all what the problem might be and could not google it.

The failure is when django attempts to generate the unicode
representation of that model in order to fill in references to related
objects on those instances.

  File 
"/Users/sabinemaennel/PycharmProjects/netteachers/apps/account/models.py",
line 23, in __unicode__
return u"%s %s" % (self.user.first_name, self.user.last_name)
  File 
"/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/db/models/fields/related.py",
line 557, in __get__
val = self.field.get_local_related_value(instance)

Specifically, it happens when you attempt to access the
UserAccount.user atttribute, which references the User model.

At this point, django complains that this app is not ready and the
models aren't loaded. Do you have 'django.contrib.auth' in
settings.INSTALLED_APPS?

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/CAFHbX1LSVarkj-zGyWbWAmBHp%2BF5kTPwGULsvHz_aaw1F%3DkaXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Model Translate.

2014-09-24 Thread Tsolmon Narantsogt
Hello folks.

Im new in Django. Please suggest me which app is suitable models 
translation. I developing multilanguage site.

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/c39474e1-5fc9-4e6b-997a-693722ea11d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
Thank you Tom,

that was very helpful. It all works if I throw these unicode 
representations out. I do have  'django.contrib.auth' installed. 
I can play around with what representations to use now. But from the error 
message I would not have guessed that it had this reason. So again thanks 
very much, you saved my day!

with kind regards
Sabine

-- 
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/551ce0ef-dc50-4180-9ed7-8a57e70880d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Bill Freeman
I just use emacs.  One of the original open source tools.  Template syntax
support requires a plugin, and I might try one some day, but html mode has
been satisfying so far.  Also, since I know how to type, running my own
management commands in an emacs shell window works for me.  This sort of
magically includes source code view of the current line when you hit a
set_trace() or breakpoint or single step in pdb,  If you want a good
overview of available django relevant extensions for emacs, see
https://code.djangoproject.com/wiki/Emacs

On Wed, Sep 24, 2014 at 7:40 AM, Adam Stein  wrote:

>  Not sure what you are looking for in terms of Django template support.
> The only difference between pycharm community (free) and commercial in
> terms of Django support that I've noticed is that Django's development web
> server won't restart automatically when code changes in the
> community edition.  Haven't used community edition since last year, but I
> seem to recall, I was still able to have a task to start Django's dev
> web server (in debug mode so I can trace through my code as you'd expect),
> so as long as I restarted that after making changes, things
> were fine.
>
>
> On Wed, 2014-09-24 at 11:36 +0200, anton wrote:
>
> Hi,
>
> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
> to develop Django apps (on Windows and Linux).
>
> What I (personally) need from an ide:
>  1. ability to debug (python code)
>  2. support for django templates
>  3. support for django (start a new project, adding a django app)
>  4. support for refactoring (like rename and so on)
>  5. support for mercurial
>  6. multi plattform (at least windows/linux)
>
> Starting with *django 1.7*, aptana marks some line
> as errors which are not errors (undefined variables from import ..)
>
> Now I have the following problem:
>
>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>(no idea if and when it will be fixed, the development
>speed is actually slow)
>
>  - if I use eclipse + actual pydev 3.7.1 I have
>no support for *django templates*
>
>  - all other ides like PyCharm are commercial (the free pycharm does
>not support django and django templates, only python)
>
> Now the question: does somebody know a solution?
>
> Thanks
>
>  Anton
>
>
>
>
>   --
> Adam (a...@csh.rit.edu)
>
>
>--
> 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/1411558851.20736.10.camel%40localhost.localdomain
> 
> .
>
> 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/CAB%2BAj0uKNUv-ALbdxJVCfN8WTtzmF53H27fwGmrAqdaLqSFYTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


About compilemessages error.

2014-09-24 Thread Tsolmon Narantsogt
When i ./manage.py compilemessages i got error.
Pls help me . What is the reason ?

  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line 399, in execute_from_command_line
utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line 272, in fetch_command
klass = load_command_class(app_name, subcommand)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line 75, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
  File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 40, 
in import_module
__import__(name)
  File 
"C:\Python27\lib\site-packages\django\core\management\commands\compilemessages.py",
 
line 43




-- 
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/9ec0570d-f09b-4f89-aaf8-f697850ee7d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Hmm... it seems to be trying to parse your html as javascript. Try using 
adding to your $.ajax():

dataType: 'text',

-- 
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/22137d95-0ec0-4610-a0c0-ad98db2e648d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to delete cookie

2014-09-24 Thread Collin Anderson
Could it be different paths or something? Or http vs https?

-- 
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/7c23a976-8000-4ce7-a488-42cc0bee8510%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Collin Anderson
Are you using a plain python shell or ./manage.py shell? If you are using a 
plain python shell, you must call django.setup() first.

-- 
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/809ad79d-0036-4ddd-ac1c-a417ed25eed3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: About compilemessages error.

2014-09-24 Thread Collin Anderson
It looks like the end of the traceback got cut off.

-- 
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/b22257b8-5860-4b81-a7d1-ee198eb830ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to delete cookie

2014-09-24 Thread Tao Bror Bojlén
Everything's https, and it's the same path.
Here's the cookie before going to the logout view, and the cookie header
of that view: http://imgur.com/a/idlVT

As far as I can tell, they match, but the cookie isn't changed at all.


On 24/09/2014 15:33, Collin Anderson wrote:
> Could it be different paths or something? Or http vs https?
> -- 
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Glpa_myOGSw/unsubscribe.
> To unsubscribe from this group and all its topics, 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/7c23a976-8000-4ce7-a488-42cc0bee8510%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/5422D7CD.1040803%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Wed, Sep 24, 2014 at 8:01 PM, Collin Anderson  wrote:
> Hmm... it seems to be trying to parse your html as javascript. Try using
> adding to your $.ajax():
>
> dataType: 'text',

Nothing happened.

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

-- 
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/CAP8Q%2Bxjwn%2Bjp1PAZCy0aBsY1m2gQFBwKmfYf%2BM8_Fr06-dRKgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


problem with django daj pagination

2014-09-24 Thread Артём Мутерко
I'm trying to set up dajax pagination in py app. The problem is when I add 
import dajaxwebsite.examples.views

to views.py
My css stop working.
Maybe I should use another ajax pagination plugin? like endless-pagination

-- 
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/2d16809c-2e54-48a0-8fd2-7807abe749ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model Translate.

2014-09-24 Thread uvetter
Depends on the Django version and the Python version you are using.
Did you have a look at this 
page? https://www.djangopackages.com/grids/g/model-translation/

I am currently using "Django-Modeltranslation", which is easy to use 
(Python 3.3 and Django 1.6). 

Best regards


Am Mittwoch, 24. September 2014 16:10:37 UTC+2 schrieb Tsolmon Narantsogt:
>
> Hello folks.
>
> Im new in Django. Please suggest me which app is suitable models 
> translation. I developing multilanguage site.
>
> 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/a5c6200b-3943-495e-b562-c7ef4f56311a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
I am using Pycharm and I did declare my project as a Django project. So how
can call django.setup()? Do I do that in my settings-file?


On Wed, Sep 24, 2014 at 4:38 PM, Collin Anderson 
wrote:

> Are you using a plain python shell or ./manage.py shell? If you are using
> a plain python shell, you must call django.setup() first.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/r4BaiFdqMeY/unsubscribe.
> To unsubscribe from this group and all its topics, 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/809ad79d-0036-4ddd-ac1c-a417ed25eed3%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sabine Maennel
Leimbachstr. 223
8041 Zürich
Tel. +41 (0) 43 53 778 74
Mathematikerin / Softwareingenieurin
sabine.maen...@gmail.com
Blog: http://sabinemaennel.ch
Startup: http://net-teachers.com

-- 
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/CADDVkog%3DA4SUFU2RbQmrh859YSGc98FJNdu588-tjMz853%3DowQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: migrate command fails when changing foreign key to a different model

2014-09-24 Thread Shawn H
I've upgraded to the 1.7 release version, and I'm still having this issue. 
While I can (and for my testing purposes have) manually change the database 
structure and update the foreign keys to point to the correct row in the 
new table, that kind of defeats the purpose of migrations. I understand 
that I probably should have used a Data Migration instead of simply letting 
the default engine generate the migration, but I've already changed the 
database structure. How can I do migrations in future if I can't get the 
current one applied? Please help.

On Wednesday, July 23, 2014 12:49:29 PM UTC-5, Shawn H wrote:
>
> May be issue #22944
>
> On Tuesday, July 22, 2014 10:29:03 AM UTC-5, Shawn H wrote:
>>
>> Forgot to mention that I'm running 1.7RC1
>>
>> On Tuesday, July 22, 2014 10:27:11 AM UTC-5, Shawn H wrote:
>>>
>>> I've looked at  Issue 22485 
>>>  and Issue 22563 
>>> , and I'm unsure if my 
>>> issue is different. I've an employees app with an employee model. I've a 
>>> tracking app that originally had 3 models each with a foreign key to 
>>> auth_user. I made a migration for the tracking app to switch those 3 models 
>>> foreign key to the employees.Employee model. When I try to apply the 
>>> migration, I get
>>>
>>>   File 
>>> "C:\Virtual\Django17c1\lib\site-packages\django\db\migrations\state.py", 
>>> line 89, in render
>>> model=lookup_model,
>>> ValueError: Lookup failed for model referenced by field 
>>> tracking.PropertyDescription.verified_by: employees.Employee
>>>
>>> Stepping through the code, it's failing on line 79 when it's trying to 
>>> find the employees app. The employees app is not in self.apps for some 
>>> reason I've not been able to figure out, especially since the employees app 
>>> is in the global apps.app_configs in migrate.py line 160. The employees app 
>>> has been migrated.
>>>
>>> How should I proceed? 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/e3000d9f-0bbf-45d8-9415-036c7b66c74c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 6:14 PM, Collin Anderson  wrote:
> # popupadvance.html
> Here's the worker object: {{ worker }}



> src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js">
>
> Advance 
> 


What I see is that I need to write the contents to be shown, in the
dialog, inside this division:

  Content to be shown in dialog 

But in the previous case, when I did it with window.open event, a
separate HTML file was passed. See my first mail in the thread. On
clicking the link, a new, separate template came up in the window. But
here it checks for the content in a division which is already there in
same template. Which means the link and the content to be popped up
should be in "popupadvance.html" only.

Am I able to explain my point?


-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

-- 
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/CAP8Q%2BxhHwbSGfWV%3DCx-CM1cCeT8ipBWwkxm7L%3D6-DxuVE7r1Kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Wellington Cordeiro
If you're doing serious development $70 for a very extensible editor is 
chump change. IDE's are in my opinion too much for Django and rarely do all 
the things you wish they would. If paying isn't for you, I would get Vim or 
Emacs.

On Wednesday, September 24, 2014 3:47:47 AM UTC-6, anton wrote:
>
> Jorge Andrés Vergara Ebratt wrote: 
>
> > I actually use a text editor, I love Sublime Text 2 with the Djaneiro 
> > Plugin. 
> > 
> hmm this is shareware not opensource as I see :-( 
>
> > As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE and 
> > it's pretty cool. 
> > 
>
> I will have a look ... but I do not see django & django template support. 
>
> But thanks anyway 
>
>  Anton 
>
> > 2014-09-24 4:36 GMT-05:00 anton >: 
> > 
> >> Hi, 
> >> 
> >> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/) 
> >> to develop Django apps (on Windows and Linux). 
> >> 
> >> What I (personally) need from an ide: 
> >>  1. ability to debug (python code) 
> >>  2. support for django templates 
> >>  3. support for django (start a new project, adding a django app) 
> >>  4. support for refactoring (like rename and so on) 
> >>  5. support for mercurial 
> >>  6. multi plattform (at least windows/linux) 
> >> 
> >> Starting with *django 1.7*, aptana marks some line 
> >> as errors which are not errors (undefined variables from import ..) 
> >> 
> >> Now I have the following problem: 
> >> 
> >>  - I tried the actual aptana 3.6.0, but it is buggy and does not work 
> >>(no idea if and when it will be fixed, the development 
> >>speed is actually slow) 
> >> 
> >>  - if I use eclipse + actual pydev 3.7.1 I have 
> >>no support for *django templates* 
> >> 
> >>  - all other ides like PyCharm are commercial (the free pycharm does 
> >>not support django and django templates, only python) 
> >> 
> >> Now the question: does somebody know a solution? 
> >> 
> >> Thanks 
> >> 
> >>  Anton 
> >> 
> >> 
> >> -- 
> >> 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...@googlegroups.com . 
> >> To post to this group, send email to django...@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/lvu3as%24pba%241%40ger.gmane.org
>  
> >> . 
> >> 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/81acf960-9f56-4b73-ac74-d6e2559b932a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread anton
Adam Stein wrote:

> Not sure what you are looking for in terms of Django template support.

I mean for example: syntax highlighting of the django template keywords.


> The only difference between pycharm community (free) and commercial in
> terms of Django support that I've noticed is that Django's development
> web server won't restart automatically when code changes in the
> community edition.  Haven't used community edition since last year, but
> I seem to recall, I was still able to have a task to start Django's dev
> web server (in debug mode so I can trace through my code as you'd
> expect), so as long as I restarted that after making changes, things
> were fine.
> 
> On Wed, 2014-09-24 at 11:36 +0200, anton wrote:
> 
>> Hi,
>> 
>> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
>> to develop Django apps (on Windows and Linux).
>> 
>> What I (personally) need from an ide:
>>  1. ability to debug (python code)
>>  2. support for django templates
>>  3. support for django (start a new project, adding a django app)
>>  4. support for refactoring (like rename and so on)
>>  5. support for mercurial
>>  6. multi plattform (at least windows/linux)
>> 
>> Starting with *django 1.7*, aptana marks some line
>> as errors which are not errors (undefined variables from import ..)
>> 
>> Now I have the following problem:
>>  
>>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>>(no idea if and when it will be fixed, the development
>>speed is actually slow)
>> 
>>  - if I use eclipse + actual pydev 3.7.1 I have
>>no support for *django templates*
>> 
>>  - all other ides like PyCharm are commercial (the free pycharm does
>>not support django and django templates, only python)
>> 
>> Now the question: does somebody know a solution?
>> 
>> Thanks
>> 
>>  Anton
>>   
>> 
> 
> 


-- 
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/lvuto4%2493o%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Multiple databases and admin list_filter

2014-09-24 Thread Pam Suebvisai
Hi,

I'm trying to use multiple databases with the admin interface by separating 
the 2 databases to 2 admin sites following the example 
at 
https://docs.djangoproject.com/en/1.7/topics/db/multi-db/#exposing-multiple-databases-in-django-s-admin-interface.
 
However, when I add list_filter into the admin class, it always gets the 
list to be used as the filter from the default database. Anybody else has 
this problem or know how to fix this?

Thanks,
Pam

-- 
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/42159863-c1c5-41f8-addb-3f20ebbbabf1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread anton
Wellington Cordeiro wrote:

> If you're doing serious development $70 for a very extensible editor is

I know this very well, but with my question I wanted
to find out if there is an open source solution.

Anton

> chump change. IDE's are in my opinion too much for Django and rarely do
> all the things you wish they would. If paying isn't for you, I would get
> Vim or Emacs.
> 
> On Wednesday, September 24, 2014 3:47:47 AM UTC-6, anton wrote:
>>
>> Jorge Andrés Vergara Ebratt wrote:
>>
>> > I actually use a text editor, I love Sublime Text 2 with the Djaneiro
>> > Plugin.
>> > 
>> hmm this is shareware not opensource as I see :-(
>>
>> > As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE and
>> > it's pretty cool.
>> > 
>>
>> I will have a look ... but I do not see django & django template support.
>>
>> But thanks anyway
>>
>>  Anton
>>
>> > 2014-09-24 4:36 GMT-05:00 anton >:
>> > 
>> >> Hi,
>> >> 
>> >> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
>> >> to develop Django apps (on Windows and Linux).
>> >> 
>> >> What I (personally) need from an ide:
>> >>  1. ability to debug (python code)
>> >>  2. support for django templates
>> >>  3. support for django (start a new project, adding a django app)
>> >>  4. support for refactoring (like rename and so on)
>> >>  5. support for mercurial
>> >>  6. multi plattform (at least windows/linux)
>> >> 
>> >> Starting with *django 1.7*, aptana marks some line
>> >> as errors which are not errors (undefined variables from import ..)
>> >> 
>> >> Now I have the following problem:
>> >> 
>> >>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
>> >>(no idea if and when it will be fixed, the development
>> >>speed is actually slow)
>> >> 
>> >>  - if I use eclipse + actual pydev 3.7.1 I have
>> >>no support for *django templates*
>> >> 
>> >>  - all other ides like PyCharm are commercial (the free pycharm does
>> >>not support django and django templates, only python)
>> >> 
>> >> Now the question: does somebody know a solution?
>> >> 
>> >> Thanks
>> >> 
>> >>  Anton
>> >> 
>> >> 
>> >> --
>> >> 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...@googlegroups.com .
>> >> To post to this group, send email to django...@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/lvu3as%24pba%241%40ger.gmane.org
>> >> .
>> >> 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/lvutr2%2493o%242%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to delete cookie

2014-09-24 Thread Daniel Rus Morales
Your code looks good. It seems to me you might have some middleware in your 
project, from the external authentication, that places the cookie. Think that 
the response in your view still have to pass through the middleware in its way 
out to the browser.

Just guessing.

On 24 Sep 2014, at 16:40, Tao Bror Bojlén  wrote:

> Everything's https, and it's the same path.
> Here's the cookie before going to the logout view, and the cookie header
> of that view: http://imgur.com/a/idlVT
> 
> As far as I can tell, they match, but the cookie isn't changed at all.
> 
> 
> On 24/09/2014 15:33, Collin Anderson wrote:
>> Could it be different paths or something? Or http vs https?
>> -- 
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/Glpa_myOGSw/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/7c23a976-8000-4ce7-a488-42cc0bee8510%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/5422D7CD.1040803%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Wellington Cordeiro
Use Atom if you want a Sublime like editor that's open source, free and
extendable. https://atom.io/

-Wellington Cordeiro


On Wed, Sep 24, 2014 at 11:08 AM, anton  wrote:

> Wellington Cordeiro wrote:
>
> > If you're doing serious development $70 for a very extensible editor is
>
> I know this very well, but with my question I wanted
> to find out if there is an open source solution.
>
> Anton
>
> > chump change. IDE's are in my opinion too much for Django and rarely do
> > all the things you wish they would. If paying isn't for you, I would get
> > Vim or Emacs.
> >
> > On Wednesday, September 24, 2014 3:47:47 AM UTC-6, anton wrote:
> >>
> >> Jorge Andrés Vergara Ebratt wrote:
> >>
> >> > I actually use a text editor, I love Sublime Text 2 with the Djaneiro
> >> > Plugin.
> >> >
> >> hmm this is shareware not opensource as I see :-(
> >>
> >> > As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE
> and
> >> > it's pretty cool.
> >> >
> >>
> >> I will have a look ... but I do not see django & django template
> support.
> >>
> >> But thanks anyway
> >>
> >>  Anton
> >>
> >> > 2014-09-24 4:36 GMT-05:00 anton >:
> >> >
> >> >> Hi,
> >> >>
> >> >> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
> >> >> to develop Django apps (on Windows and Linux).
> >> >>
> >> >> What I (personally) need from an ide:
> >> >>  1. ability to debug (python code)
> >> >>  2. support for django templates
> >> >>  3. support for django (start a new project, adding a django app)
> >> >>  4. support for refactoring (like rename and so on)
> >> >>  5. support for mercurial
> >> >>  6. multi plattform (at least windows/linux)
> >> >>
> >> >> Starting with *django 1.7*, aptana marks some line
> >> >> as errors which are not errors (undefined variables from import ..)
> >> >>
> >> >> Now I have the following problem:
> >> >>
> >> >>  - I tried the actual aptana 3.6.0, but it is buggy and does not work
> >> >>(no idea if and when it will be fixed, the development
> >> >>speed is actually slow)
> >> >>
> >> >>  - if I use eclipse + actual pydev 3.7.1 I have
> >> >>no support for *django templates*
> >> >>
> >> >>  - all other ides like PyCharm are commercial (the free pycharm does
> >> >>not support django and django templates, only python)
> >> >>
> >> >> Now the question: does somebody know a solution?
> >> >>
> >> >> Thanks
> >> >>
> >> >>  Anton
> >> >>
> >> >>
> >> >> --
> >> >> 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...@googlegroups.com .
> >> >> To post to this group, send email to django...@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/lvu3as%24pba%241%40ger.gmane.org
> >> >> .
> >> >> For more options, visit https://groups.google.com/d/optout.
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/3QxT3n5myLQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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/lvutr2%2493o%242%40ger.gmane.org
> .
> 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/CADNjH_5jMGNPT3LoZGZ%2BajKv6Afg6AR%3Dfch1duYtBncuRNyp_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Mark Phillips
Gedit works well with syntax highlighting. I like the console widow in the
bottom pain to restart the server when needed, see error messages, etc.
Don't have to go to another terminal window.

http://www.micahcarrick.com/gedit-as-a-django-ide-for-linux.html

Mark

On Wed, Sep 24, 2014 at 10:24 AM, Wellington Cordeiro  wrote:

> Use Atom if you want a Sublime like editor that's open source, free and
> extendable. https://atom.io/
>
> -Wellington Cordeiro
>
>
> On Wed, Sep 24, 2014 at 11:08 AM, anton  wrote:
>
>> Wellington Cordeiro wrote:
>>
>> > If you're doing serious development $70 for a very extensible editor is
>>
>> I know this very well, but with my question I wanted
>> to find out if there is an open source solution.
>>
>> Anton
>>
>> > chump change. IDE's are in my opinion too much for Django and rarely do
>> > all the things you wish they would. If paying isn't for you, I would get
>> > Vim or Emacs.
>> >
>> > On Wednesday, September 24, 2014 3:47:47 AM UTC-6, anton wrote:
>> >>
>> >> Jorge Andrés Vergara Ebratt wrote:
>> >>
>> >> > I actually use a text editor, I love Sublime Text 2 with the Djaneiro
>> >> > Plugin.
>> >> >
>> >> hmm this is shareware not opensource as I see :-(
>> >>
>> >> > As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE
>> and
>> >> > it's pretty cool.
>> >> >
>> >>
>> >> I will have a look ... but I do not see django & django template
>> support.
>> >>
>> >> But thanks anyway
>> >>
>> >>  Anton
>> >>
>> >> > 2014-09-24 4:36 GMT-05:00 anton >:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
>> >> >> to develop Django apps (on Windows and Linux).
>> >> >>
>> >> >> What I (personally) need from an ide:
>> >> >>  1. ability to debug (python code)
>> >> >>  2. support for django templates
>> >> >>  3. support for django (start a new project, adding a django app)
>> >> >>  4. support for refactoring (like rename and so on)
>> >> >>  5. support for mercurial
>> >> >>  6. multi plattform (at least windows/linux)
>> >> >>
>> >> >> Starting with *django 1.7*, aptana marks some line
>> >> >> as errors which are not errors (undefined variables from import ..)
>> >> >>
>> >> >> Now I have the following problem:
>> >> >>
>> >> >>  - I tried the actual aptana 3.6.0, but it is buggy and does not
>> work
>> >> >>(no idea if and when it will be fixed, the development
>> >> >>speed is actually slow)
>> >> >>
>> >> >>  - if I use eclipse + actual pydev 3.7.1 I have
>> >> >>no support for *django templates*
>> >> >>
>> >> >>  - all other ides like PyCharm are commercial (the free pycharm does
>> >> >>not support django and django templates, only python)
>> >> >>
>> >> >> Now the question: does somebody know a solution?
>> >> >>
>> >> >> Thanks
>> >> >>
>> >> >>  Anton
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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...@googlegroups.com .
>> >> >> To post to this group, send email to django...@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/lvu3as%24pba%241%40ger.gmane.org
>> >> >> .
>> >> >> For more options, visit https://groups.google.com/d/optout.
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/3QxT3n5myLQ/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/lvutr2%2493o%242%40ger.gmane.org
>> .
>> 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/CADNjH_5jMGNPT3LoZGZ%2BajKv6Afg6AR%3Dfch1duYtBncuRNyp_w%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.co

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread James Bennett
On Wed, Sep 24, 2014 at 7:17 AM, Bill Freeman  wrote:

> I just use emacs.
>

I use Emacs as well. It's been my everyday code editor for nearly 15 years,
and works with/on almost anything.

-- 
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/CAL13Cg9X0-%3DmDeOGP1Fq7DJCwujJL2zat3u_-8nV3NtQ9xBA%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Interesting. Maybe it should be $("#dialog-form").html(data) rather than 
load(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/6e776a5d-869d-4c74-9adf-34fc4650093a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Lightening talk ideas for a (relative) beginner?

2014-09-24 Thread James Brewer
I want to attend a Django BarCamp in SF next weekend and BarCamp tradition 
is that everyone contribute in some way.

Of course I will help out with set up/break down if that is needed, but I 
would also like to give a lightening talk. I'm fairly unfamiliar with 
Django at this point and I've never spoken publicly, so I am not sure what 
I would talk about.

If anyone has any ideas that would be accessible for someone who is 
relatively new to Django, I would love to hear them. It doesn't have to be 
something I already know as I have a week to familiarize myself, but given 
the short timeline it should be something accessible.

Happy hacking!

James

-- 
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/fa483337-d783-46cb-b140-d15e986a2498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


heroku django staticfiles

2014-09-24 Thread Eddilbert Macharia
Hello.

I have a django app on heroku, the first time i git push , static files work 
perfectly.

But any subsequent pushes break the staticfiles.

I get 
"Oserr:no such folder or file on app/{ myappname }/static".

Whats the issue ??

I have followed the django heroku getting started especillay for the 
settings.py, wsgi.py profile and requirements.txt.

regards.

-- 
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/50019c7e-f51e-45e2-a0b5-4d62ccf177e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lightening talk ideas for a (relative) beginner?

2014-09-24 Thread Fred Stluka

James,

Unit testing would be a good lightning talk.  Here are some notes
from the session where I recently trained my team on it.  You may
want to update some of the links.  We're still on Django 1.4.

- Online docs:
  - http://bristle.com/~fred/#django
- https://docs.djangoproject.com/en/1.4/topics/testing
- https://docs.djangoproject.com/en/1.4/topics/testing/#assertions
- Other links in my "Django" row
  - http://bristle.com/~fred/#python
- https://docs.python.org/2/library/unittest.html
- https://docs.python.org/2/library/unittest.html#test-cases
- Other links in my "Python" row
% python manage.py help test
  - Run all test methods in all test classes of all apps
% python manage.py test -v2
% python manage.py test -v2 appname...
  - Run all test methods in all test classes of specified apps
% python manage.py test -v3 appname...
  - Shows ALL steps.  Too much detail for typical use
% python manage.py test -v2 appname.TestClass...
  - Run all test methods in specified test classes
% python manage.py test -v2 appname.TestClass.test_name...
  - Run specified test methods
- Ctrl-C to exit gracefully, Ctrl-C again to abort
- Create tests.py in each app
- Inherit from django.test.TestCase
  - Or django.test.SimpleTestCase if no DB access needed
- Runs all tests (inherited from TestCase) in tests.py and models.py
- If you need to prevent South from running, use 
SOUTH_TESTS_MIGRATE = False

- To avoid running tests of South itself, use SKIP_SOUTH_TESTS = True
- Creates/deletes "test_" DBs.  Does not touch real DBs.
- Can detect in settings.py and elsewhere whether you're running tests,
  and can then flip to SQLite for speed (30 seconds instead of 75 
minutes):

  RUNNING_UNIT_TESTS = 'test' in sys.argv
  if RUNNING_UNIT_TESTS:
  DATABASES['default'] = {
  'ENGINE': 'django.db.backends.sqlite3',
  'NAME': os.path.join(SITE_ROOT, 'default.sqlite'),
  }
- Django suppresses all outgoing email during tests, and collects it
  in a dictionary, so you can assert things about it
- Python Assertions and methods:
  - assertEqual(a, b)
  - assertNotEqual(a, b)
  - assertTrue(x)
  - assertFalse(x)
  - assertIs(a, b)
  - assertIsNot(a, b)
  - assertIsNone(x)
  - assertIsNotNone(x)
  - assertIn(a, b)
  - assertNotIn(a, b)
  - assertIsInstance(a, b)
  - assertNotIsInstance(a, b)
  -
  - assertRaises(exc, fun, *args, **kwds)
  - assertRaisesRegexp(exc, r, fun, *args, **kwds)
  -
  - assertAlmostEqual(a, b)
  - assertNotAlmostEqual(a, b)
  - assertGreater(a, b)
  - assertGreaterEqual(a, b)
  - assertLess(a, b)
  - assertLessEqual(a, b)
  - assertRegexpMatches(s, r)
  - assertNotRegexpMatches(s, r)
  - assertItemsEqual(a, b)
  - assertDictContainsSubset(a, b)
  -
  - skipIf()
  - skipUnless()
  -
  - fail(msg=None)
  - failureException
  - longMessage
  - maxDiff
  -
  - countTestCases()
  - defaultTestResult()
  - id()
  - shortDescription()
  - addCleanup(function, *args, **kwargs)
  - doCleanups()
- Django Assertions and methods:
  - SimpleTestCase.assertRaisesMessage()
  - SimpleTestCase.assertFieldOutput()
  - TestCase.assertContains()
  - TestCase.assertNotContains()
  - TestCase.assertFormError()
  - TestCase.assertTemplateUsed()
  - TestCase.assertTemplateNotUsed()
  - TestCase.assertRedirects()
  - TestCase.assertQuerysetEqual()
  - TestCase.assertNumQueries()
  - SimpleTestCase.assertHTMLEqual()
  - SimpleTestCase.assertHTMLNotEqual()
  -
  - skipIfDbFeature('supports_transactions')
  - skipUnlessDbFeature('supports_transactions')
- Advanced:
  - setUp()/tearDown()
  - setUpClass()/tearDownClass()
  - setUpModule()/tearDownModule()
  - suite()
- Can order your tests manually in a suite
- Can invoke a suite from another suite
  - @unittest.skipIf/skipUnless()
  - Mock HTTP requests
- 
http://dougalmatthews.com/2010/Jan/20/testing-your-first-django-app/

- Tells:
  - How to mock an HTTP request (easy!):
  from django.test import Client
  from mysite.polls.models import Poll, Choice
  class PollTest(TestCase):
  def test_voting(self):
  c = Client()
  # Perform a vote on the poll by mocking a POST 
request.

  response = c.post('/polls/1/vote/', {'choice': '1',})
  # In the vote view we redirect the user, so check the
  # response status code is 302.
self.assertEqual(response.status_code, 302)
  # Get the choice and check there is now one vote.
  

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Jan Eskilsson
Sorry for budging in but for me this works $("#dialog-form").html(data)
rather than load(data) but I get a "Uncaught TypeError: Undef is not a
function" error in the Java Script, dont understand why really ?

Thank You in Advance

Jan Eskilsson

2014-09-24 22:05 GMT+04:00 Collin Anderson :

> Interesting. Maybe it should be $("#dialog-form").html(data) rather than
> load(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/6e776a5d-869d-4c74-9adf-34fc4650093a%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

Please consider the environment before you print this email.

(1) The contents of this transmission are privileged and confidential and
intended solely for the use of the addressee. Any disclosure, distribution
or copying of the contents, other than by the addressee, is strictly
prohibited. If you receive this transmission in error, please notify us
immediately and destroy the material received.
(2) All incoming and outgoing emails and any attachments are subjected to a
virus scanner and are believed to be free of any virus, or any other defect
which might affect any computer or IT system into which they are received
and opened. Therefore, it is the responsibility of the recipient to ensure
that they are virus free and no responsibility is accepted by Jan Eskilsson
 for any loss or damage arising in any way from receipt or use thereof.

-- 
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/CAHot5JFTxhgwxYgsZHXR%3DKrKe3e%2BimmSX-uq1vmLdau-HqWd7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka  wrote:
>
> Excellent sample.  Thanks!  That's a nice standalone summary
> of how to do a popup dialog via jQuery and Ajax.  Worth posting
> to a tips page or blog if you have such, so other people can
> Google it.

@ Collin, please do the above now ;)

Yes, writing $("#dialog-form").html(data) worked like a charm. This is
what happens when we don't know all about the tool we're using :(

Can you point me to some documentation about JS + Django?

Something is left... Opening the page for the first time > Clicking on
the link > I get the dialog box as we've mentioned. But after closing
dialog by clicking on "cross" > reopening it > I get the "Contents to
be shown in popup" only in the  and no dialog box is there. Check
it here:
http://awesomescreenshot.com/0da3jnxoc4

Can we figure out, why does it happen? Browser console gives this:
TypeError: $(...).html(...).dialog is not a function

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

-- 
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/CAP8Q%2BxhQTbDkc4cuu_vnNdDzqoC5vqYgxQQ4iBHp_3Ct9gOHqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Thu, Sep 25, 2014 at 12:10 AM, Jan Eskilsson 
wrote:
> "Uncaught TypeError: Undef is not a function" error in the Java Script,
dont
> understand why really ?

Yes, I get the same in Chromium  (y)
​,​
but only after reopening, as I mentioned in my previous mail.

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

-- 
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/CAP8Q%2BxjLX6QXikW0bZJy8G1OziStHCqjK0ebM%3Dx4ukgGtghYHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lightening talk ideas for a (relative) beginner?

2014-09-24 Thread James Brewer
Fred, that's a lot of notes. I'm at work right now, but I will definitely
look over them tonight. You're the man. Thanks!

Happy hacking,

James

On Wed, Sep 24, 2014 at 11:34 AM, Fred Stluka  wrote:

>  James,
>
> Unit testing would be a good lightning talk.  Here are some notes
> from the session where I recently trained my team on it.  You may
> want to update some of the links.  We're still on Django 1.4.
>
> - Online docs:
>   - http://bristle.com/~fred/#django
> - https://docs.djangoproject.com/en/1.4/topics/testing
> - https://docs.djangoproject.com/en/1.4/topics/testing/#assertions
> - Other links in my "Django" row
>   - http://bristle.com/~fred/#python
> - https://docs.python.org/2/library/unittest.html
> - https://docs.python.org/2/library/unittest.html#test-cases
> - Other links in my "Python" row
> % python manage.py help test
>   - Run all test methods in all test classes of all apps
> % python manage.py test -v2
> % python manage.py test -v2 appname...
>   - Run all test methods in all test classes of specified apps
> % python manage.py test -v3 appname...
>   - Shows ALL steps.  Too much detail for typical use
> % python manage.py test -v2 appname.TestClass...
>   - Run all test methods in specified test classes
> % python manage.py test -v2 appname.TestClass.test_name...
>   - Run specified test methods
> - Ctrl-C to exit gracefully, Ctrl-C again to abort
> - Create tests.py in each app
> - Inherit from django.test.TestCase
>   - Or django.test.SimpleTestCase if no DB access needed
> - Runs all tests (inherited from TestCase) in tests.py and models.py
> - If you need to prevent South from running, use SOUTH_TESTS_MIGRATE =
> False
> - To avoid running tests of South itself, use SKIP_SOUTH_TESTS = True
> - Creates/deletes "test_" DBs.  Does not touch real DBs.
> - Can detect in settings.py and elsewhere whether you're running tests,
>   and can then flip to SQLite for speed (30 seconds instead of 75
> minutes):
>   RUNNING_UNIT_TESTS = 'test' in sys.argv
>   if RUNNING_UNIT_TESTS:
>   DATABASES['default'] = {
>   'ENGINE': 'django.db.backends.sqlite3',
>   'NAME': os.path.join(SITE_ROOT, 'default.sqlite'),
>   }
> - Django suppresses all outgoing email during tests, and collects it
>   in a dictionary, so you can assert things about it
> - Python Assertions and methods:
>   - assertEqual(a, b)
>   - assertNotEqual(a, b)
>   - assertTrue(x)
>   - assertFalse(x)
>   - assertIs(a, b)
>   - assertIsNot(a, b)
>   - assertIsNone(x)
>   - assertIsNotNone(x)
>   - assertIn(a, b)
>   - assertNotIn(a, b)
>   - assertIsInstance(a, b)
>   - assertNotIsInstance(a, b)
>   -
>   - assertRaises(exc, fun, *args, **kwds)
>   - assertRaisesRegexp(exc, r, fun, *args, **kwds)
>   -
>   - assertAlmostEqual(a, b)
>   - assertNotAlmostEqual(a, b)
>   - assertGreater(a, b)
>   - assertGreaterEqual(a, b)
>   - assertLess(a, b)
>   - assertLessEqual(a, b)
>   - assertRegexpMatches(s, r)
>   - assertNotRegexpMatches(s, r)
>   - assertItemsEqual(a, b)
>   - assertDictContainsSubset(a, b)
>   -
>   - skipIf()
>   - skipUnless()
>   -
>   - fail(msg=None)
>   - failureException
>   - longMessage
>   - maxDiff
>   -
>   - countTestCases()
>   - defaultTestResult()
>   - id()
>   - shortDescription()
>   - addCleanup(function, *args, **kwargs)
>   - doCleanups()
> - Django Assertions and methods:
>   - SimpleTestCase.assertRaisesMessage()
>   - SimpleTestCase.assertFieldOutput()
>   - TestCase.assertContains()
>   - TestCase.assertNotContains()
>   - TestCase.assertFormError()
>   - TestCase.assertTemplateUsed()
>   - TestCase.assertTemplateNotUsed()
>   - TestCase.assertRedirects()
>   - TestCase.assertQuerysetEqual()
>   - TestCase.assertNumQueries()
>   - SimpleTestCase.assertHTMLEqual()
>   - SimpleTestCase.assertHTMLNotEqual()
>   -
>   - skipIfDbFeature('supports_transactions')
>   - skipUnlessDbFeature('supports_transactions')
> - Advanced:
>   - setUp()/tearDown()
>   - setUpClass()/tearDownClass()
>   - setUpModule()/tearDownModule()
>   - suite()
> - Can order your tests manually in a suite
> - Can invoke a suite from another suite
>   - @unittest.skipIf/skipUnless()
>   - Mock HTTP requests
> -
> http://dougalmatthews.com/2010/Jan/20/testing-your-first-django-app/
> - Tells:
>   - How to mock an HTTP request (easy!):
>   from django.test import Client
>   from mysite.polls.models import Poll, Choice
>   class PollTest(TestCase):
>   def test_voting(self):
>  

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread John Schmitt
On Wed, Sep 24, 2014 at 07:40:51AM -0400, Adam Stein wrote:
> Not sure what you are looking for in terms of Django template support.
> The only difference between pycharm community (free) and commercial in
> terms of Django support that I've noticed is that Django's development
> web server won't restart automatically when code changes in the
> community edition.  Haven't used community edition since last year, but
> I seem to recall, I was still able to have a task to start Django's dev
> web server (in debug mode so I can trace through my code as you'd
> expect), so as long as I restarted that after making changes, things
> were fine.

I've been hearing about pycharm lately, sounds great.  I'm a command line guy 
so I normally ssh to my server where I fire up my editor and hack away.

What do you do with a GUI IDE like pycharm?  That is, how does your 
edit/run/debug cycle work with a pycharm et al?  Can you still edit the 'live' 
files for your django project?

My imagination says that I would sshfs mount the server's file system and then 
pretend that the files I'm editing are local.  Do I still need to ssh to the 
server and manually restart httpd or launch manage.py as needed?

John

-- 
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/20140924190319.GE26562%40mediapc.snapdragonfly.net.
For more options, visit https://groups.google.com/d/optout.


Django templating system.

2014-09-24 Thread Misbaw Abdulai
I want some someone to help me with showing posts based on category on the 
index page using django template. I tried this code



{% load blog %}
{% get_blog_categories as categories %}
{% for c in categories %}


{{ c.name }}

{% get_recent_posts 5 as recent_posts %}

{% if categories %}
{% if post %}

{% for post in recent_posts %}

  

  Read 
More
  
{{ post.title }}

{% endfor %}
 
{% else %}
No posts currently in category.
{% endif %}
{% else %}
The specified category {{ category.name }} does not 
exist!
{% endif %}

 
{% endfor %}


 

someone should please help..

-- 
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/f170c82f-72c0-4743-b678-210e31d1372b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


syncdb error with Mysql database on Windows 7

2014-09-24 Thread Daniel Grace
I have a virtualenv with Python 3.4, Django 1.7 and MySQL installed on 
Windows 7.
I also have  the MySQL / Python adapter installed and the database settings 
in settings.py:

DATABASES = {
'default': {
'NAME': 'mydb',
'ENGINE': 'mysql.connector.django',
'USER': 'root',
'PASSWORD': 'fishy1777',
}
}

When I do a syncdb I get the following errors:

(landy) C:\landy\cresta>python manage.py syncdb
Traceback (most recent call last):
  File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 
133, in
 ensure_connection
self.connect()
  File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 
122, in
 connect
self.connection = self.get_new_connection(conn_params)
  File "C:\landy\lib\site-packages\mysql\connector\django\base.py", line 
590, in
 get_new_connection
cnx = mysql.connector.connect(**conn_params)
  File "C:\landy\lib\site-packages\mysql\connector\__init__.py", line 157, 
in co
nnect
return MySQLConnection(*args, **kwargs)
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
122, in
__init__
self.connect(**kwargs)
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
431, in
connect
self._open_connection()
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
398, in
_open_connection
self._ssl)
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
187, in
_do_auth
self._auth_switch_request(username, password)
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
224, in
_auth_switch_request
raise errors.get_exception(packet)
mysql.connector.errors.ProgrammingError: 1049 (42000): Unknown database 
'mydb'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File "C:\landy\lib\site-packages\django\core\management\__init__.py", 
line 385
, in execute_from_command_line
utility.execute()
  File "C:\landy\lib\site-packages\django\core\management\__init__.py", 
line 354
, in execute
django.setup()
  File "C:\landy\lib\site-packages\django\__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
  File "C:\landy\lib\site-packages\django\apps\registry.py", line 108, in 
popula
te
app_config.import_models(all_models)
  File "C:\landy\lib\site-packages\django\apps\config.py", line 197, in 
import_m
odels
self.models_module = import_module(models_module_name)
  File "C:\Python34\lib\importlib\__init__.py", line 104, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 2231, in _gcd_import
  File "", line 2214, in _find_and_load
  File "", line 2203, in 
_find_and_load_unlocked
  File "", line 1200, in _load_unlocked
  File "", line 1129, in _exec
  File "", line 1448, in exec_module
  File "", line 321, in 
_call_with_frames_removed
  File "C:\landy\lib\site-packages\django\contrib\auth\models.py", line 40, 
in <
module>
class Permission(models.Model):
  File "C:\landy\lib\site-packages\django\db\models\base.py", line 125, in 
__new
__
new_class.add_to_class('_meta', Options(meta, **kwargs))
  File "C:\landy\lib\site-packages\django\db\models\base.py", line 300, in 
add_t
o_class
value.contribute_to_class(cls, name)
  File "C:\landy\lib\site-packages\django\db\models\options.py", line 166, 
in co
ntribute_to_class
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length(
))
  File "C:\landy\lib\site-packages\django\db\__init__.py", line 40, in 
__getattr
__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "C:\landy\lib\site-packages\django\db\utils.py", line 243, in 
__getitem__

conn = backend.DatabaseWrapper(db, alias)
  File "C:\landy\lib\site-packages\mysql\connector\django\base.py", line 
534, in
 __init__
self.ensure_connection()
  File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 
133, in
 ensure_connection
self.connect()
  File "C:\landy\lib\site-packages\django\db\utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "C:\landy\lib\site-packages\django\utils\six.py", line 549, in 
reraise
raise value.with_traceback(tb)
  File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 
133, in
 ensure_connection
self.connect()
  File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line 
122, in
 connect
self.connection = self.get_new_connection(conn_params)
  File "C:\landy\lib\site-packages\mysql\connector\django\base.py", line 
590, in
 get_new_connection
cnx = mysql.connector.connect(**conn_params)
  File "C:\landy\lib\site-packages\mysql\connector\__init__.py", line 157, 
in co
nnect
return MySQLConnection(*args, **kwargs)
  File "C:\landy\lib\site-packages\mysql\connector\connection.py", line 
122, in
__init__
self.connect(**kwargs)
  File "

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
On Wed, 2014-09-24 at 12:03 -0700, John Schmitt wrote:

> On Wed, Sep 24, 2014 at 07:40:51AM -0400, Adam Stein wrote:
> > Not sure what you are looking for in terms of Django template support.
> > The only difference between pycharm community (free) and commercial in
> > terms of Django support that I've noticed is that Django's development
> > web server won't restart automatically when code changes in the
> > community edition.  Haven't used community edition since last year, but
> > I seem to recall, I was still able to have a task to start Django's dev
> > web server (in debug mode so I can trace through my code as you'd
> > expect), so as long as I restarted that after making changes, things
> > were fine.
> 
> I've been hearing about pycharm lately, sounds great.  I'm a command line guy 
> so I normally ssh to my server where I fire up my editor and hack away.
> 
> What do you do with a GUI IDE like pycharm?  That is, how does your 
> edit/run/debug cycle work with a pycharm et al?  Can you still edit the 
> 'live' files for your django project?
> 
> My imagination says that I would sshfs mount the server's file system and 
> then pretend that the files I'm editing are local.  Do I still need to ssh to 
> the server and manually restart httpd or launch manage.py as needed?
> 
> John
> 


Is your server your production machine?  By that, I mean, do you install
your files somewhere else once you are done making changes to another
server where it's "officially" used?  I ask because you really don't
want to be editing live files where "live" means what your customers (or
yourself) are really using.

I develop locally, then deploy to a remove server only when changes are
done and tested.  Therefore, my edit/run/debug cycle with PyCharm
consists of running Django's web server (./manage.py runserver) on my
local machine through PyCharm's debugger so that I can step through the
code.  I also have PyCharm set up to run various unit tests (also useful
if I need to step through unit test code).  I don't restart httpd,
because that is running on the remove server and only needs restarting
when my code is deployed.  In the case of restarting Django's web
server, PyCharm's professional version ($$$) has the ability to restart
it for you if you have it running within PyCharm.  For the community
version, you have to restart it yourself which is as simple as clicking
a "restart" button.

If your files live somewhere else, you can mount the file system as
you've mentioned.  Performance might be better if the files were local,
but that's true anytime you go across a mounted file system.

Hopefully that answers your questions.

-- 
Adam (a...@csh.rit.edu)

-- 
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/1411587803.20736.49.camel%40localhost.localdomain.
For more options, visit https://groups.google.com/d/optout.


Correctly passing parameters to raw query

2014-09-24 Thread termopro
Hello,

I am constructing raw query which looks like the following:
"SELECT * FROM some_table  WHERE id IN (1,3,5);"

So inside my view i write:
entities = Entity.objects.raw("""
SELECT * FROM some_table  WHERE id IN (%s);
""", [ids_list])

How should i correctly pass the argument ? Because i keep getting errors no 
matter how i try.


p.s. - In reality my query is much more complex, i have simplified it just 
to explain the question

-- 
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/40d474d3-5582-448e-9727-4f5f457c1767%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
I think you only included the "jquery" script code. You need to include 
both jquery and jqueryui.

I'll work on the blog post.

-- 
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/9939b189-734a-49ee-81ea-51502ba4d600%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Here's the blog post, by popular demand :)

http://collincode.wordpress.com/2014/09/24/jquery-ui-popup-with-django-backend/

-- 
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/dd66d8cb-e5bc-44d9-bae4-7e6383508bc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django templating system.

2014-09-24 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/e4ca867a-a948-44ea-8031-54990a5c59ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread John Schmitt
On Wed, Sep 24, 2014 at 03:43:23PM -0400, Adam Stein wrote:
> On Wed, 2014-09-24 at 12:03 -0700, John Schmitt wrote:
> 
> > On Wed, Sep 24, 2014 at 07:40:51AM -0400, Adam Stein wrote:
> > > Not sure what you are looking for in terms of Django template support.
> > > The only difference between pycharm community (free) and commercial in
> > > terms of Django support that I've noticed is that Django's development
> > > web server won't restart automatically when code changes in the
> > > community edition.  Haven't used community edition since last year, but
> > > I seem to recall, I was still able to have a task to start Django's dev
> > > web server (in debug mode so I can trace through my code as you'd
> > > expect), so as long as I restarted that after making changes, things
> > > were fine.
> > 
> > I've been hearing about pycharm lately, sounds great.  I'm a command line 
> > guy so I normally ssh to my server where I fire up my editor and hack away.
> > 
> > What do you do with a GUI IDE like pycharm?  That is, how does your 
> > edit/run/debug cycle work with a pycharm et al?  Can you still edit the 
> > 'live' files for your django project?
> > 
> > My imagination says that I would sshfs mount the server's file system and 
> > then pretend that the files I'm editing are local.  Do I still need to ssh 
> > to the server and manually restart httpd or launch manage.py as needed?
> > 
> > John
> > 
> 
> 
> Is your server your production machine?  By that, I mean, do you install
> your files somewhere else once you are done making changes to another
> server where it's "officially" used?  I ask because you really don't
> want to be editing live files where "live" means what your customers (or
> yourself) are really using.
> 
> I develop locally, then deploy to a remove server only when changes are
> done and tested.  Therefore, my edit/run/debug cycle with PyCharm
> consists of running Django's web server (./manage.py runserver) on my
> local machine through PyCharm's debugger so that I can step through the
> code.  I also have PyCharm set up to run various unit tests (also useful
> if I need to step through unit test code).  I don't restart httpd,
> because that is running on the remove server and only needs restarting
> when my code is deployed.  In the case of restarting Django's web
> server, PyCharm's professional version ($$$) has the ability to restart
> it for you if you have it running within PyCharm.  For the community
> version, you have to restart it yourself which is as simple as clicking
> a "restart" button.
> 
> If your files live somewhere else, you can mount the file system as
> you've mentioned.  Performance might be better if the files were local,
> but that's true anytime you go across a mounted file system.

I appreciate what you said about deploying and not editing "live" files 
directly.

However, I have several projects in various stages of development and when I 
first start a project, I don't have anything to deploy, I edit everything 
"live".  When it's in production and users are counting on it being up, then I 
would rather not touch the running machine.

When I'm creating a dummy project to test my apache configuration and/or my 
management commands, or trying to assemble a complicated query, I do it "live" 
on the VM on which I created the playground project.  

Another use-case I have is that my workstation is sometimes far removed from my 
development machine.  My workstation is either a Linux machine or sometimes a 
laptop via VPN over wireless.  Tmux and vim/emacs are glorious workhorses for 
this scenario and I have a hard time envisioning that same level of convenience 
from an IDE.  I guess I was hoping that someone had found something magical 
that was at least this convenient.

In case it isn't obvious, I'm a django nub and probably do not know about many 
best practices.

-- 
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/20140924213058.GF26562%40mediapc.snapdragonfly.net.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Javier Guerra Giraldez
On Wed, Sep 24, 2014 at 4:30 PM, John Schmitt  wrote:
> When I'm creating a dummy project to test my apache configuration and/or my 
> management commands, or trying to assemble a complicated query, I do it 
> "live" on the VM on which I created the playground project.


why bother with VMs when we have virtualenv?

-- 
Javier

-- 
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/CAFkDaoQuCNCKwex0F9ZbnU%3DSiYVAsz%3DwsRR2ZH4juX_a_i3Q-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Correctly passing parameters to raw query

2014-09-24 Thread Collin Anderson
Interesting. I don't use raw queries, but I wonder if Django doesn't 
support lists as parameters to raw()

-- 
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/a117b2f7-2ff4-4fe9-8c56-9d5e137acd58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread John Schmitt
On Wed, Sep 24, 2014 at 04:33:35PM -0500, Javier Guerra Giraldez wrote:
> On Wed, Sep 24, 2014 at 4:30 PM, John Schmitt  wrote:
> > When I'm creating a dummy project to test my apache configuration and/or my 
> > management commands, or trying to assemble a complicated query, I do it 
> > "live" on the VM on which I created the playground project.
> 
> 
> why bother with VMs when we have virtualenv?

I put my projects in virtualenvs which are in my VMs.  It's not like one VM can 
only host one project.

Is that what you mean?

-- 
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/20140924215819.GA6737%40mediapc.snapdragonfly.net.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Javier Guerra Giraldez
On Wed, Sep 24, 2014 at 4:58 PM, John Schmitt  wrote:
> I put my projects in virtualenvs which are in my VMs.  It's not like one VM 
> can only host one project.
>
> Is that what you mean?

not exactly.  if you're using virtualenv, you can directly run the
project in your workstation, no need to create any VM for development.
save that for the staging step.

of course, that's easy almost exclusively for Python projects, in
other languages, (but several are getting virtualenv-like features)
you might want to isolate and not pollute too much your workstation.
in that case, using jails (lxc, docker, even chroot!) makes it easier
to 'directly' edit without ssh or 'networked' filesystems.

in the worst case (when even the smallest test requires some hardware
i don't have), it's easy to add an rsync step to my test script.  So i
edit locally (with all my version control tools) and for each test all
changes are propagated in less time that it takes to restart the
process.

i guess that what i'm trying to say is that a good editing environment
[1] is the most important part of the setup, and it's unreasonable to
compromise it just because i don't want the whole messy project
requirements in my shiny workstation.


[1] i like Kate, which does have remote access to files via ssh
without even sshfs, thanks to KDE.  but it still adds a split-second
lag when i hit save, so i always edit locally, even if i test
remotely.

-- 
Javier

-- 
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/CAFkDaoToPSPrbb_CXK-CiN%3D270y0yyVbx748_FAw2%2B%2BMcsxHCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Correctly passing parameters to raw query

2014-09-24 Thread James Brewer
This is going to depend on the version of Django you're using. Accord to
the docs for 1.7[1], this should work fine.

After playing around in the shell for a bit, I found I was getting an error
complaining about arguments not being converted during string formatting.
It seems the problem occurs when a `RawQuerySet` object is stringified.
This line[2] converts the the params into a tuple if the `params` object is
not a dictionary. For some reason, when this tuple is used in string
formatting, everything breaks.

I haven't been able to figure out a solution and, frankly, I don't even
know if this is the error you're getting. We really do need more solution.

If anyone else can shed some light on the issue I've raised, that would be
fantastic. If not, I will submit a bug report.

[1]:
https://docs.djangoproject.com/en/dev/topics/db/sql/#passing-parameters-into-raw
[2]:
https://github.com/django/django/blob/stable/1.7.x/django/db/models/query.py#L1594

On Wed, Sep 24, 2014 at 2:37 PM, Collin Anderson 
wrote:

> Interesting. I don't use raw queries, but I wonder if Django doesn't
> support lists as parameters to raw()
>
> --
> 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/a117b2f7-2ff4-4fe9-8c56-9d5e137acd58%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
James Brewer
jamesbrewer.io

-- 
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/CAKj8pVppX1_XfqAGz2fcAFau_7YsH-gEF7VeSKQhNtTg-OsJvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Correctly passing parameters to raw query

2014-09-24 Thread James Brewer
Also, it is worth mentioning that the RawQuerySet object looks to have been
refactored in the latest development release. I have not verified this
issue on the development branch.

On Wed, Sep 24, 2014 at 3:53 PM, James Brewer  wrote:

> This is going to depend on the version of Django you're using. Accord to
> the docs for 1.7[1], this should work fine.
>
> After playing around in the shell for a bit, I found I was getting an
> error complaining about arguments not being converted during string
> formatting. It seems the problem occurs when a `RawQuerySet` object is
> stringified. This line[2] converts the the params into a tuple if the
> `params` object is not a dictionary. For some reason, when this tuple is
> used in string formatting, everything breaks.
>
> I haven't been able to figure out a solution and, frankly, I don't even
> know if this is the error you're getting. We really do need more solution.
>
> If anyone else can shed some light on the issue I've raised, that would be
> fantastic. If not, I will submit a bug report.
>
> [1]:
> https://docs.djangoproject.com/en/dev/topics/db/sql/#passing-parameters-into-raw
> [2]:
> https://github.com/django/django/blob/stable/1.7.x/django/db/models/query.py#L1594
>
> On Wed, Sep 24, 2014 at 2:37 PM, Collin Anderson 
> wrote:
>
>> Interesting. I don't use raw queries, but I wonder if Django doesn't
>> support lists as parameters to raw()
>>
>> --
>> 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/a117b2f7-2ff4-4fe9-8c56-9d5e137acd58%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> James Brewer
> jamesbrewer.io
>



-- 
James Brewer
jamesbrewer.io

-- 
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/CAKj8pVpc54vR6yBeYkcUre4JrNtT%3DMON5mdhk7nvEfud9%3D7-iA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Fred Stluka

Excellent!  Thanks!  Now I can just point my team at it, instead
of writing out the details myself.

--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/24/14 5:27 PM, Collin Anderson wrote:

Here's the blog post, by popular demand :)

http://collincode.wordpress.com/2014/09/24/jquery-ui-popup-with-django-backend/
--
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/dd66d8cb-e5bc-44d9-bae4-7e6383508bc0%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/542350E1.2040406%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


Re: I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Russell Keith-Magee
Hi Sabine,

Yes, this error is related to 1.7; no, it's not related to migrations. It's
related to the App Loading refactor:

https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor

The error is caused because you're interacting with Django models before
all the models are known to be loaded. If you're starting a completely
vanilla Python shell, (i.e., not manage.py shell), then the error has been
caused because you haven't called django.setup() - this is a new method
required in 1.7 to bootstrap the Django environment.

If you're seeing this error in a manage.py, then there is clearly some sort
of complex interaction occurring during the loading of your models; we'll
need more details about your setup to be able to diagnose what is going on.

You'll find more details about the new App infrastructure in the docs:

https://docs.djangoproject.com/en/1.7/ref/applications/

Yours,
Russ Magee %-)

On Wed, Sep 24, 2014 at 7:59 PM, Sabine Maennel 
wrote:

> Mostly it is models in the same app: one is fine and the other one throws
> this error, when I call them from my shell:
>
> I start my shell and run
>
> x=.objects.all()
>
> which runs fine, but then when I want to show x by:
>
> print x
>
> the error occurs.
>
> I really do not know what it means, googling it did not help at all.
> Please help. It seems to be something special to Django 1.7? Is it related
> with migrations?
>
> --
> 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/659f1cc0-c00e-4347-abe4-b874a0cfcd1f%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/CAJxq84-T_N-zo%3DQB7VbsabVFPSgP0yYQniFDJ8u%2BwoUhb_4W2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Russell Keith-Magee
Hi Sabine,

No - you don't put it in your settings file; the settings file is loaded as
part of the setup call.

As a completely manual process, you can just run the following:

import django
django.setup()

as the first two commands in your Python shell. If PyCharm has any hooks
you can tie into for providing shell startup logic, that would be a good
place to put these two lines.

Yours,
Russ Magee %-)

On Wed, Sep 24, 2014 at 10:45 PM, Sabine Maennel 
wrote:

> I am using Pycharm and I did declare my project as a Django project. So
> how can call django.setup()? Do I do that in my settings-file?
>
>
> On Wed, Sep 24, 2014 at 4:38 PM, Collin Anderson 
> wrote:
>
>> Are you using a plain python shell or ./manage.py shell? If you are using
>> a plain python shell, you must call django.setup() first.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/r4BaiFdqMeY/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/809ad79d-0036-4ddd-ac1c-a417ed25eed3%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sabine Maennel
> Leimbachstr. 223
> 8041 Zürich
> Tel. +41 (0) 43 53 778 74
> Mathematikerin / Softwareingenieurin
> sabine.maen...@gmail.com
> Blog: http://sabinemaennel.ch
> Startup: http://net-teachers.com
>
> --
> 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/CADDVkog%3DA4SUFU2RbQmrh859YSGc98FJNdu588-tjMz853%3DowQ%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/CAJxq84-f99%2BfSxV47JL9Y2rALf%3DP0Ed7XWoOcDtiADep5HaNQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
On Wed, 2014-09-24 at 14:30 -0700, John Schmitt wrote:

> I appreciate what you said about deploying and not editing "live" files 
> directly.

Hope the information is of use to you.


> However, I have several projects in various stages of development and when I 
> first start a project, I don't have anything to deploy, I edit everything 
> "live".  When it's in production and users are counting on it being up, then 
> I would rather not touch the running machine.

I do the exact opposite.  When I first start out, all I have is my
development environment.  Once I have "enough" of a project for others
to use, then I start deploying.


> 
> When I'm creating a dummy project to test my apache configuration and/or my 
> management commands, or trying to assemble a complicated query, I do it 
> "live" on the VM on which I created the playground project.  
> 

Currently, I don't need to run apache locally (I used to), but if I did,
I would still test it in a development environment.  Once everything is
good, replicate (deploy) onto the target server.  I like to have my
development and production match if possible.  If not, then a
staging/testing area should be the same so I can deploy from development
to staging, test like heck, then deploy to production.


> Another use-case I have is that my workstation is sometimes far removed from 
> my development machine.  My workstation is either a Linux machine or 
> sometimes a laptop via VPN over wireless.  Tmux and vim/emacs are glorious 
> workhorses for this scenario and I have a hard time envisioning that same 
> level of convenience from an IDE.  I guess I was hoping that someone had 
> found something magical that was at least this convenient.
> 

My development machine is in my home in New York, the staging and
production servers are in California, I think (not absolutely sure).
Doesn't matter the distance.  Since development is all local, don't have
to worry about anything else until I'm ready to deploy.


> In case it isn't obvious, I'm a django nub and probably do not know about 
> many best practices.



While there are certainly lots of Django best practices, I think the use
of a development environment and deployment would work equally well for
any type of project, not just Django.  In fact, anything I've ever
worked on C, C++, Python/Django, Perl/CGI, etc., would all start in a
local development environment first.  

If you don't find good answers to your question, maybe you should wonder
why.  Perhaps most people do things a different way and so your question
really doesn't have a good answer.  Just a thought.

-- 
Adam (a...@csh.rit.edu)

-- 
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/1411603125.20736.66.camel%40localhost.localdomain.
For more options, visit https://groups.google.com/d/optout.


Upgrading Django (to 1.7)

2014-09-24 Thread Andrew Pinkham
Hi,
I am writing a series of articles based on the presentation I gave at DjangoCon 
US 2014. I put the first article online earlier today, and figured members of 
this list might be interested in the material.

For all of the material:
afrg.co/updj17/

For the article:
afrg.co/updj17/a1/

I plan to post the next three in the series on each of the coming Wednesdays.

Any feedback appreciated. I hope you find the material helpful.

Andrew

-- 
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/D05EC989-C8DB-41CE-AA23-E1D73C25A623%40andrewsforge.com.
For more options, visit https://groups.google.com/d/optout.


Django hosting

2014-09-24 Thread Sabine Maennel
I live in Switzerland and I will launch my startup shortly. It will be a 
very small platform in the beginning but traffic might grow all of a 
sudden. So regarding to hosting I am torn right now, between Pyrox, which 
is a small, but accessible Germ hoster and Django Europe, which is 
spezialized on Django and LightTTPD. They offer a one click Django install, 
but no phone support only tickets. Can anyone give me advice regarding 
hosting? Has anyone used on of these two hosters? 

 Thanks in advance for your advice
  Sabine

-- 
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/9efbfc90-c92e-4914-afca-f39b9dee5c6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: trying to load a view

2014-09-24 Thread dk

>
> thanks  now when i go to the website
>
 http://127.0.0.1:8000/hello/  does work, so the include work for 
including the urls file inside the applications?

and if i go to 
http://127.0.0.1:8000/
i get the 404 error

Page not found (404)Request Method:GETRequest URL:http://127.0.0.1:8000/

Using the URLconf defined in restaurants.urls, Django tried these URL 
patterns, in this order: 

   1. ^admin/ 
   2. ^hello/$ 

The current URL, , didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django 
settings file. Change that to False, and Django will display a standard 404 
page. 


is that how suppouse to be? or should i be getting the message that django 
gives at the beggining? 
It worked!Congratulations on your first Django-powered page


thanks for the help.  =)

-- 
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/5fbdea98-4730-40ae-8a63-689c2e486c67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrading Django (to 1.7)

2014-09-24 Thread Sabine Maennel
Dear Andrew, 

I read your article and it is great. I am really looking forward to your 
followups. I was hoping for something like this went I attended Django Con 
Europe. I struggle with the understanding the migrations the most. Usually 
in the early phases of development I do not want migrations to bother me 
since my database design just still changes too often for keeping track. I 
find the django admin a very useful tool to test your database design with 
real data and detect flaws early on. So will your followups contain advise 
on that? How can I restart migrations all over once my project is ready for 
deployment? 

Thanks so much for writing these very useful articles! Do you mind if I 
post about them in the Django user facebook user group, or do you want to 
do that, since I think these articles will be very helpful to most Django 
developers.
  with kind regards and keep going!
   Sabine

Am Donnerstag, 25. September 2014 04:09:20 UTC+2 schrieb Andrew Pinkham:
>
> Hi, 
> I am writing a series of articles based on the presentation I gave at 
> DjangoCon US 2014. I put the first article online earlier today, and 
> figured members of this list might be interested in the material. 
>
> For all of the material: 
> afrg.co/updj17/ 
>
> For the article: 
> afrg.co/updj17/a1/ 
>
> I plan to post the next three in the series on each of the coming 
> Wednesdays. 
>
> Any feedback appreciated. I hope you find the material helpful. 
>
> Andrew 
>
>

-- 
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/934a13d6-d5fd-4684-9bb1-e6d323778cda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Sabine Maennel
Thank you so much for these very helpful links to the documentation, 
Russell!

Am Donnerstag, 25. September 2014 01:48:52 UTC+2 schrieb Russell 
Keith-Magee:
>
> Hi Sabine,
>
> Yes, this error is related to 1.7; no, it's not related to migrations. 
> It's related to the App Loading refactor:
>
> https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor
>
> The error is caused because you're interacting with Django models before 
> all the models are known to be loaded. If you're starting a completely 
> vanilla Python shell, (i.e., not manage.py shell), then the error has been 
> caused because you haven't called django.setup() - this is a new method 
> required in 1.7 to bootstrap the Django environment.
>
> If you're seeing this error in a manage.py, then there is clearly some 
> sort of complex interaction occurring during the loading of your models; 
> we'll need more details about your setup to be able to diagnose what is 
> going on.
>
> You'll find more details about the new App infrastructure in the docs:
>
> https://docs.djangoproject.com/en/1.7/ref/applications/
>
> Yours,
> Russ Magee %-)
>
> On Wed, Sep 24, 2014 at 7:59 PM, Sabine Maennel  > wrote:
>
>> Mostly it is models in the same app: one is fine and the other one throws 
>> this error, when I call them from my shell: 
>>
>> I start my shell and run 
>>
>> x=.objects.all() 
>>
>> which runs fine, but then when I want to show x by:
>>
>> print x 
>>
>> the error occurs. 
>>
>> I really do not know what it means, googling it did not help at all. 
>> Please help. It seems to be something special to Django 1.7? Is it related 
>> with migrations? 
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/659f1cc0-c00e-4347-abe4-b874a0cfcd1f%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/5d54e8f7-a877-4ecd-b4c7-a0ac072971a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django hosting

2014-09-24 Thread Mark Phillips
Sabine,

I am in the US, so take my advice with a large grain of salt. I usually use
Linode and Digital Ocean as a benchmarks for hosting services. There prices
are very reasonable and they give you all that you need - root shell access
to your own private virtual server. They have great up-time, and my only
complaint has been about their backup service, but then who would really
trust a hosting company to back up your critical data??? Both can scale as
you grow - increasing memory, disk space, bandwidth takes just a few
minutes. Both have European data centers...Linode in London and Digital
Ocean in Amsterdam.

Anyway, Pyrox seems very expensive, and Django Europe is much closer to
Digital Ocean/Linode in price. I am not wild about the process limits at
Django Europe...I tend to think about physical things - memory, disk space,
bandwidth, etc. I am not a good enough sys admin to know which processes to
kill, and the thought of not being able to log in because I am running too
many processes is scary...check the FAQs at Django Europe.

If you have built your own django app for your start-up, I don't think you
really need to pay for "instant-on" django a la Django Europe. You are
quire capable of setting up your own Django production virtual server.
Email and no phone is OK as long as you they have a guaranteed min/max
response time. I assume you will be your own sys admin, so there is not
much they can do for you anyway. Keep good backups and don't push to
production until you have tested the heck out of your new code on a
different, but identical, development server. Practice rolling back to an
earlier release BEFORE you go live. If your site just dies, and you have
good backups, you can create a new node, install from backups, change the
dns on the local name servers, and you are back live in a few minutes. Then
figure out with the hosting folks what went wrong and ask for a refund...;)

Finally, you can get 2 Virtual Private Servers on AWS EC2 for *free* for
the first year.  After that, their pricing is STILL cheaper than Linode or
Digital Ocean.   But you will have to investigate that by setting up mockup
billing as you build your systems and evaluate your needs.  You have a
whole year.  Their free tier includes a good amount of startup resources:
http://aws.amazon.com/free/. Also, your hosting provider today may not be
your hosting provider tomorrowstart free, learn what you need and how
much you need to scale up, and then move to paid hosting. AWS EC2 also has
European data centers.

Anyway, just my 2 cents on hosting. Lots of options.

Mark


On Wed, Sep 24, 2014 at 8:40 PM, Sabine Maennel 
wrote:

> I live in Switzerland and I will launch my startup shortly. It will be a
> very small platform in the beginning but traffic might grow all of a
> sudden. So regarding to hosting I am torn right now, between Pyrox, which
> is a small, but accessible Germ hoster and Django Europe, which is
> spezialized on Django and LightTTPD. They offer a one click Django install,
> but no phone support only tickets. Can anyone give me advice regarding
> hosting? Has anyone used on of these two hosters?
>
>  Thanks in advance for your advice
>   Sabine
>
> --
> 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/9efbfc90-c92e-4914-afca-f39b9dee5c6a%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/CAEqej2NcbgSy5OqkWoxz7Ka0WAY62VCuReBumxUtsGdZ8xPZRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django hosting

2014-09-24 Thread Sabine Maennel
Thank you very much for your advice Marc, it is very valuable to me, 
especially the part that my hosting provider for today does not need to be 
that of the future. My problem right now is that I am under pressure to 
launch, but just in order to open up registration for a class that won't 
start before January 2015 where the real traffic will start. So I might not 
test thoughly now, and need a quick solution now, but then I will have two 
month to prepare for January and in case I am unhappy with the hosting I 
will still be able to change then.

   with kind regards and thanks again that you took so much time 
for that long informative answer
 Sabine


Am Donnerstag, 25. September 2014 07:58:02 UTC+2 schrieb mark:
>
> Sabine,
>
> I am in the US, so take my advice with a large grain of salt. I usually 
> use Linode and Digital Ocean as a benchmarks for hosting services. There 
> prices are very reasonable and they give you all that you need - root shell 
> access to your own private virtual server. They have great up-time, and my 
> only complaint has been about their backup service, but then who would 
> really trust a hosting company to back up your critical data??? Both can 
> scale as you grow - increasing memory, disk space, bandwidth takes just a 
> few minutes. Both have European data centers...Linode in London and Digital 
> Ocean in Amsterdam.
>
> Anyway, Pyrox seems very expensive, and Django Europe is much closer to 
> Digital Ocean/Linode in price. I am not wild about the process limits at 
> Django Europe...I tend to think about physical things - memory, disk space, 
> bandwidth, etc. I am not a good enough sys admin to know which processes to 
> kill, and the thought of not being able to log in because I am running too 
> many processes is scary...check the FAQs at Django Europe.
>
> If you have built your own django app for your start-up, I don't think you 
> really need to pay for "instant-on" django a la Django Europe. You are 
> quire capable of setting up your own Django production virtual server. 
> Email and no phone is OK as long as you they have a guaranteed min/max 
> response time. I assume you will be your own sys admin, so there is not 
> much they can do for you anyway. Keep good backups and don't push to 
> production until you have tested the heck out of your new code on a 
> different, but identical, development server. Practice rolling back to an 
> earlier release BEFORE you go live. If your site just dies, and you have 
> good backups, you can create a new node, install from backups, change the 
> dns on the local name servers, and you are back live in a few minutes. Then 
> figure out with the hosting folks what went wrong and ask for a refund...;) 
>
> Finally, you can get 2 Virtual Private Servers on AWS EC2 for *free* for 
> the first year.  After that, their pricing is STILL cheaper than Linode or 
> Digital Ocean.   But you will have to investigate that by setting up mockup 
> billing as you build your systems and evaluate your needs.  You have a 
> whole year.  Their free tier includes a good amount of startup resources: 
> http://aws.amazon.com/free/. Also, your hosting provider today may not be 
> your hosting provider tomorrowstart free, learn what you need and how 
> much you need to scale up, and then move to paid hosting. AWS EC2 also has 
> European data centers.
>
> Anyway, just my 2 cents on hosting. Lots of options.
>
> Mark
>
>
> On Wed, Sep 24, 2014 at 8:40 PM, Sabine Maennel  > wrote:
>
>> I live in Switzerland and I will launch my startup shortly. It will be a 
>> very small platform in the beginning but traffic might grow all of a 
>> sudden. So regarding to hosting I am torn right now, between Pyrox, which 
>> is a small, but accessible Germ hoster and Django Europe, which is 
>> spezialized on Django and LightTTPD. They offer a one click Django install, 
>> but no phone support only tickets. Can anyone give me advice regarding 
>> hosting? Has anyone used on of these two hosters? 
>>
>>  Thanks in advance for your advice
>>   Sabine
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/9efbfc90-c92e-4914-afca-f39b9dee5c6a%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