Re: [Tutor] PyCountry currency formatting woes

2014-05-06 Thread Sithembewena Lloyd Dube
Thanks for this response, this is exactly what I needed to know. On Mon, May 5, 2014 at 6:26 AM, Marc Tompkins wrote: > On Sun, May 4, 2014 at 1:55 PM, Sithembewena Lloyd Dube > wrote: > >> Thanks, i was actually getting the error information to update the post. >> Apoligies to waste your time

Hide default permission in Django admin form

2014-05-06 Thread Robert Jonathan Šimon
I looked up the answer (http://stackoverflow.com/questions/6062655/remove-or-hide-default-permissions-from-django), it worked, but suddenly it stopped working, i am not sure, what i did or if I reinstaled something. I have this solution: from django.contrib import admin from django.contrib.aut

pinax-project-account login redirect to dynamic url

2014-05-06 Thread Daniel Kane
I'm writing a web app that uses the pinax-project-account and bootstrap. When a user logs in the login view should grab the ACCOUNT_LOGIN_REDIRECT_URL and redirect the user to it. There seems to be an issue with dynamic urls though because when I do this with a static /profile/ url, there is

Django URLs problem

2014-05-06 Thread G Z
drwxr-xr-x 4 root root 4096 May 5 20:12 . drwxr-xr-x 3 root root 4096 May 5 19:09 .. -rw-r--r-- 1 root root 255 May 5 19:09 manage.py drwxr-xr-x 2 root root 4096 May 5 22:51 provisioning drwxr-xr-x 3 root root 4096 May 5 22:22 vmware my project ursl is as follows from django.conf.urls impor

Urls.py Question

2014-05-06 Thread G Z
project name = provisioning app name = vmware In my projects urls.py I have the following. I assume I set the new url link customers to myapp.urls because im watching a youtube video and thats what he did. from django.conf.urls import patterns, include, url from django.contrib import admin ad

Django URLS help app not defined

2014-05-06 Thread G Z
project name = provisioning app name = vmware In my projects urls.py I have the following. I assume I set the new url link customers to myapp.urls because im watching a youtube video and thats what he did. from django.conf.urls import patterns, include, url from django.contrib import ad

Re: Urls.py Question

2014-05-06 Thread Rafael E. Ferrero
What version of django do you have runing?, do you define an admin for vmware? -- Rafael E. Ferrero 2014-05-06 2:50 GMT-03:00 G Z : > project name = provisioning app name = vmware > > In my projects urls.py I have the following. I assume I set the new url > link customers to myapp.urls because

Re: Django URLS help app not defined

2014-05-06 Thread Rafael E. Ferrero
I think that you fail on trying to setup the admin site for your proyect. check this out https://docs.djangoproject.com/en/1.6/ref/contrib/admin/ -- *RAFAEL FERRERO* *Chief Officer Technology* San Francisco Cba. | Argentina +54 9 356251 4856 www.perseux.com 2014-05-06 2:09 GMT-03:00 G Z : > pr

Re: What is different of handling character code between pure Python and Django?

2014-05-06 Thread 杉田臣輔
Hello Thank you for replying. I tried to use the ".encode('utf8')" method before. I also tried your suggestion. But error happened like below. 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128) 2014-05-06 17:10 GMT+09:00 Hannu Krosing : > On 05/06/2014 08:28 AM,

Re: What is different of handling character code between pure Python and Django?

2014-05-06 Thread Sithembewena Lloyd Dube
That should be ".encode('utf-8') - it is separated by a dash. On Tue, May 6, 2014 at 4:31 PM, 杉田臣輔 wrote: > Hello > > Thank you for replying. > I tried to use the ".encode('utf8')" method before. > > I also tried your suggestion. But error happened like below. > > 'ascii' codec can't decode byt

Re: Django 1.7 not working with mysql-connector-python 1.1.6 & Python 3.3 ?

2014-05-06 Thread Richard Esplin
In order to move forward with this project, I switched to PyMySQL: https://github.com/PyMySQL It appears to work great. In order to use the default Django backend for MySQL, I put this in my settings.py: import pymysql pymysql.install_as_MySQLdb() DATABASES = { 'default': { 'ENGINE

Re: Django URLS help app not defined

2014-05-06 Thread G Z
I'm not trying to set up the admin stie. I have already done that the admin site works im trying to set up the /customers site. Which I have defined below. I have it set in the projects urls.py to link to vmware.urls then i have the urls.py in the app vmware pointing to my templates to display d

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > and yes vmware is defined in installed apps. > -- 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 gr

Re: Django URLS help app not defined

2014-05-06 Thread Davide Scatto
it seems in yr project urls.py you don't import vmware. from django.conf.urls import patterns, include, url from django.contrib import admin from . import vmware urlpatterns = patterns Il giorno martedì 6 maggio 2014 07:09:51 UTC+2, G Z ha scritto: > > project name = provisioning

Re: Loading data in migrations

2014-05-06 Thread J Y
I would like to know this also. Can anyone provide an example of how to do this in 1.7? The doc leaves a lot to the imagination. I'd be willing to help update the docs if there's guidance on what the official "sanctioned" approach is to replicate the same functionality, that behaves like the

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > so in my project.urls file i put > from . import vmware do i have to add anything to my apps.urls because i got the following error after adding the folllowing from django.contrib import admin admin.autodiscover() from . import vmware urlpatterns = patterns('', # Examples: # url(

Models and Admin Site Question

2014-05-06 Thread G Z
so in my models .py file I have from django.db import models # Create your models here. class Customer(models.Model): NAME = models.CharField(max_length=200) WEBSITE = models.CharField(max_length=200) PHONE = models.CharField(max_length=200) EMAIL = models.CharField(max_length=

Re: Models and Admin Site Question

2014-05-06 Thread C. Kirby
It looks like you have an indentation error. your __unicode__ method is should be a method in the Customer class, so it should be indented inside it. Right now it is outside the class namespace On Tuesday, May 6, 2014 11:44:46 AM UTC-5, G Z wrote: > > so in my models .py file I have > > > from

Re: Models and Admin Site Question

2014-05-06 Thread G Z
Thank you so much I dont know why i didnt catch that. Can you help me with my other post abotu urls? -- 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-user

Re: Django URLS help app not defined

2014-05-06 Thread C. Kirby
Please post your project structure - that will help to clear up the import On Tuesday, May 6, 2014 11:28:28 AM UTC-5, G Z wrote: > > so in my project.urls file i put >> > > from . import vmware > > do i have to add anything to my apps.urls because i got the following > error after adding the fol

Re: Urls.py Question

2014-05-06 Thread G Z
I'm running 1.6.4 yes vmware is in my installed apps i used from . import vmware if I dont try to link my appurls to project urls and just use admin site all my stuff works correctly its just when i try to add vmare project.urls from django.conf.urls import patterns, include, url from django.

Django Linking Multiple Mysql tables with unique identifiers

2014-05-06 Thread G Z
So I'm trying to set up my django app and I want to link multiple tables each with a unique key identifier. To test this i have the following models. py from django.db import models # Create your models here. class Customer(models.Model): NAME = models.CharField(max_length=200) WEBSITE

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > I'm running 1.6.4 > > Project Structure Project name: provisioning App Name: vmware > /djangoprojects/provisioning/provisioning/urls.py > > > from django.conf.urls import patterns, include, url > > from django.contrib import admin > admin.autodiscover() > from . import vmware > > urlpatte

Re: Django URLS help app not defined

2014-05-06 Thread C. Kirby
G Z, That is a somewhat odd project structure. Also, the ls you posted: directory structure provisioning is the project vmware is the app. drwxr-xr-x 4 root root 4096 May 5 20:12 . drwxr-xr-x 3 root root 4096 May 5 19:09 .. -rw-r--r-- 1 root root 255 May 5 19:09 manage.py drwxr-xr-x 2 root roo

Re: Django URLS help app not defined

2014-05-06 Thread G Z
I'm following the django tutorial the project is provisioning I created the folder provisioning folder, then ran startproject provisioning which has manage.py then it creates the subfolder provisioning which has the init.py file and settings etc. then from the root directory of my project folder

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > in fact here is the tutorial series I was following > https://www.youtube.com/watch?v=KqN4u28T-JQ&list=PLQVvvaa0QuDcTDEowl-b5nQlaDaD82r_s -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Django URLS help app not defined

2014-05-06 Thread C. Kirby
Sorry, it's been a while since I looked at the tutorial, to make the tutorial more straightforward it uses a simplified project layout. I looked at your urls again, and the error is that you forgot quotes. url(r'^customers/', include(vmware.urls)), should be url(r'^customers/', include('v

Re: Django URLS help app not defined

2014-05-06 Thread C. Kirby
I strongly recommend the tutorial provided by django, and I would do the tutorial as it is to start, not with your own models. Really understand the concepts as they are written, then apply those concepts to your project. Kirby On Tuesday, May 6, 2014 1:16:46 PM UTC-5, G Z wrote: > > in fact he

Re: Django URLS help app not defined

2014-05-06 Thread C. Kirby
At first glance you are missing a paren: queryset=Customer.objects.all().order_by"-id")[:100] should be: queryset=Customer.objects.all().order_by("-id")[:100] Are you using an IDE? It should have picked that up kirby On Tuesday, May 6, 2014 1:38:34 PM UTC-5, G Z wrote: > > Whats wrong with

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > Whats wrong with this > from django.conf.urls import patterns, include, url from django.view.generic import ListView from vmware.models import Customer urlpatterns = patterns(' ', url(r'^customers/', ListView.as_view( queryset=Customer

Re: Django URLS help app not defined

2014-05-06 Thread G Z
> > Thanks so much one last thing > Page not found (404)Request Method:GETRequest URL: http://pythondev.enki.co:8001/customers Using the URLconf defined in provisioning.urls, Django tried these URL patterns, in this order: 1. ^admin/ 2. ^customers/ The current URL, customers, didn't mat

Re: Django URLS help app not defined

2014-05-06 Thread Rafael E. Ferrero
if you try http://pythondev.enki.co:8001/admin works just fine ? -- Rafael E. Ferrero 2014-05-06 17:40 GMT-03:00 G Z : > Thanks so much one last thing >> > > Page not found (404)Request Method:GETRequest URL: > http://pythondev.enki.co:8001/customers > > U

Re: Django URLS help app not defined

2014-05-06 Thread G Z
The admin page works fine only the other two don't Project Structure Project Root Directory: provisioning/ this is where manage.py lives Project Settings Directory provisioning/provisioning/settings.py App Directory provisioning/vmware template directory /provisioning/vmware/templates/ th

Re: Django URLS help app not defined

2014-05-06 Thread G Z
ok I figured it out all i had to do was change my app urls.py and take out customers so now its like this from django.conf.urls import patterns, include, url from django.views.generic.list import ListView from vmware.models import Customer urlpatterns = patterns('', url(r'^', ListView.a

Re: Django URLS help app not defined

2014-05-06 Thread G Z
yea the admin works perfectly fine no issues. On Monday, May 5, 2014 11:09:51 PM UTC-6, G Z wrote: > > project name = provisioning > app name = vmware > > In my projects urls.py I have the following. I assume I set the new url > link customers to myapp.urls because im watching a youtube video and

Re: Django URLS help app not defined

2014-05-06 Thread Rafael E. Ferrero
Check this out: http://linkode.org/j5tuDIjRiGrzufkXDrCMh7 if you visit http://www.fsorgosuardi.com.ar/eventos you go to activos views if you visit http://www.fsorgosuardi.com.ar/eventos/ampliar/something-hereyou go to activos views with parameters if you visit http://www.fsorgosuardi.com.ar/evento

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-06 Thread Guillem Liarte
Hello again. The solution for the incorrect version came as a combination of both Tom's and Brad's answer. I could compile a mod_wsgi 3.4 with my python and I used the recommended configuration. Now I get: [Tue May 06 23:51:30 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/3.4 Python/3.3

Re: Django Linking Multiple Mysql tables with unique identifiers

2014-05-06 Thread G Z
Easier to be red Ok so I have three tables in my database Customer Vms and Vmspecs Vms is tied through customer by customer id through database id field and vmspecs is tied to vms through the id field for Vms. However when I go into admin panel and try to add vmspecs to vms after connecting the

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-06 Thread Timothy W. Cook
On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte < guillem.lia...@googlemail.com> wrote: > > > But I still get the locale encoding problem. Do you guys have any > suggestions? > > I do not recall the exact error I had with this config (once you corrected those you mentioned) but eventually I had to

regex error?

2014-05-06 Thread G Z
Im using detailview to display customer individualy when the link is clicked on but its not recognizing the number i think my regex is wrong.. this is what i have from django.conf.urls import patterns, include, url from django.views.generic.list import ListView from django.views.generic.detail

Re: regex error?

2014-05-06 Thread G Z
ive also tried url(r'^customers/([0-9])/$', DetailView.as_view( model = Customer, template_name="customer.html")), -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Detail View Question

2014-05-06 Thread G Z
So I'm using DetailView to associate a Customer ID with customer information but due to my lack of knowledge im not entirely sure what the issue is. It will go to the page but it won't load the unique customer data. The data exist at domain/customers/ however when you click the link which takes

Re: Detail View Question

2014-05-06 Thread G Z
repost easier to read So I'm using DetailView to associate a Customer ID with customer information but due to my lack of knowledge im not entirely sure what the issue is. It will go to the page but it won't load the unique customer data. The data exist at domain/customers/ however when you cl

Re: Urls.py Question

2014-05-06 Thread James Schneider
You need to quote the argument being passed to include(): include('vmware.urls') There might be other things going on, but I'm on my phone and it's hard to follow. -James On Tuesday, May 6, 2014, G Z wrote: > I'm running 1.6.4 > > yes vmware is in my installed apps i used from . import vmware