Re: Admin page not found error

2012-12-29 Thread Shahjalal Hossain
On Friday, December 28, 2012 9:29:50 AM UTC+1, Shahjalal Hossain wrote: > > > > > >

Re: Design by composition and persistance

2012-12-29 Thread Taras_96
Hey Mike, Sorry I didn't make it very clear that I've been working with Django for about 8 months now, so I've got the hang of the basic concepts. I'm redesigning a part of the system that was hacked together into what I hope is a cleaner OO design. I realised that my question can be applied o

Django 1.5 - release date

2012-12-29 Thread Aidan Zhakypov
Does anyone know when Django 1.5 is going to be released as a stable version? If I want to *start* developing a production web site, should I write it on Django 1.4 or is it already ok to implement it on Django 1.5? -- You received this message because you are subscribed to the Google Groups "

Bug in inlines.js

2012-12-29 Thread Ruud van der Weide
I just noticed a small bug in inlines.js. In the part where the "addButton" is included, the following check is used: if ($this.attr("tagName") == "TR") { This check doesn't work as expected however. The attr-method reads an attribute. "tagName" isn't an attribute. This check should be: if ($this

Re: Design by composition and persistance

2012-12-29 Thread Mike Dewhirst
On 29/12/2012 7:39pm, Taras_96 wrote: f we map software objects directly onto Django Models, then we'd end up with a TimeWindow table, where each row would only ever be referenced by exactly one Event. My understanding of the advantage of normalisation is that it prevents data duplication, and th

customize the comment template for cleaned_data errors

2012-12-29 Thread Stephan
I use Django 1.4.3 and have a problem with the comment-app. If the comment-app miss some data (e.g. the field "Comment" is empty) I get the preview template with the error message. This preview-template is without css-style and looks horrible. How is it possible to use the normal template also

Question about URL namespaces

2012-12-29 Thread Dae James
When I was reading django's URL document, I come across "URL namespaces". The raw sentence is "When you need to deploy multiple instances of a single application, it can be helpful to be able to differentiate between instances." I'm very confused here. What the application here refer to? Does it

Re: Design by composition and persistance

2012-12-29 Thread Javier Guerra Giraldez
On Sat, Dec 29, 2012 at 3:39 AM, Taras_96 wrote: > If we map software objects directly onto Django Models, then we'd end up > with a TimeWindow table, where each row would only ever be referenced by > exactly one Event. My understanding of the advantage of normalisation is > that it prevents data

citations

2012-12-29 Thread samtygier
Hi, I am creating a site, and trying to implement a referencing/citation system. I'd like to render something like "Lorem ipsum dolor sit amet[[ref:foo2012]], consectetur adipisicing elit, sed do eiusmod tempor incididunt[[ref:bar2011]] ut labore et dolore magna aliqua." stored in a TextField,

Problem with auto tests Get an error creating the test database: (1044, "Access denied for user 'viewbank_django'@'localhost' to database 'test_viewbank_django'")

2012-12-29 Thread Jeff
When I run the command - "python manage.py test polls" I get the following error - error creating the test database: (1044, "Access denied for user 'viewbank_django'@'localhost' to database 'test_viewbank_django'") I am using a shared server that will only allow me to create a database prefixed

problem while passing a list of string to javascript in template

2012-12-29 Thread Everest K.C.
Hello Everyone, I have problem while passing a list of string from django views to javascript template. The quotation mark gets converted into hex and I cannot use it to plot graph using jpplot. I even tried *replace* method of javascript to replace the hex to convert to '. The codes are as fo

When I set DEBUG=False, my 404.html doesn't appear

2012-12-29 Thread Dae James
I put my 404.html into root of the directory specified in TEMPLATE_DIRS. However, when I visit an inexisting page, the browser's 404.html appears rather than my own 404.html page. What's wrong with me ? PS: I've set the DEBUG variable in settings.py to False. Dae James -- You received this

Re: alternate way for nested inline in django admin

2012-12-29 Thread Nikhil Verma
Hi All Can somebody explain me the workaround for this ticket 9025. I want to nested inlines in my django admin explained below. Thanks in advance On Fri, Dec 28, 2012 at 10:54 PM, Nikhil Verma wrote: > Hi Guys > > Here are my models :- > > class Blog(models.Model): > """ > This model r

Re: When I set DEBUG=False, my 404.html doesn't appear

2012-12-29 Thread Ryan Blunden
All I can suggest is to double-check the TEMPLATE_DIRS tuple to ensure the path is correct. On 29/12/2012, at 7:59 AM, "Dae James" wrote: > I put my 404.html into root of the directory specified in TEMPLATE_DIRS. > However, when I visit an inexisting page, the browser's 404.html appears > rat

Re: problem while passing a list of string to javascript in template

2012-12-29 Thread Ryan Blunden
Django presumes all template variables are "unsafe" by default to prevent XSS attacks which is why it's encoded the quotes. Read up on filters and auto-escaping and you'll be able to figure out the rest. Cheers, Ryan On 29/12/2012, at 7:57 AM, "Everest K.C." wrote: > Hello Everyone, > I have

Re: Problem with auto tests Get an error creating the test database: (1044, "Access denied for user 'viewbank_django'@'localhost' to database 'test_viewbank_django'")

2012-12-29 Thread Ryan Blunden
Hey Jeff, There sure is. Just specify a "TEST_NAME" key in the database configuration dictionary and you're good to go. https://docs.djangoproject.com/en/dev/topics/testing/overview/#the-test-database Cheers, Ryan On 29/12/2012, at 7:27 AM, Jeff wrote: > When I run the command - "python mana

Re: Question about URL namespaces

2012-12-29 Thread Ryan Blunden
I've never used this feature but I believe it was created so that for a single Django project, you could provide multiple administration apps. For example, you might have one for customers and one for back office staff that expose different models, have different permissions etc. So to answer y

Re: Django 1.5 - release date

2012-12-29 Thread Aaron C. de Bruyn
Django 1.5 is close to being released. I'm not sure how you do your development, but my process under Linux is to create a virtualenv (virtualenv myproject) then install the development version of Django (pip install git+git://github.com/django/django.git) and then begin the project (django-admin.

Re: Bug in inlines.js

2012-12-29 Thread Ryan Blunden
You should post this to https://code.djangoproject.com/newticket Cheers, Ryan On 29/12/2012, at 12:50 AM, Ruud van der Weide wrote: > I just noticed a small bug in inlines.js. In the part where the "addButton" > is included, the following check is used: > if ($this.attr("tagName") == "TR") { >

Re: Admin page not found error

2012-12-29 Thread Ryan Blunden
I added a record to the django_site table (which Django on the first syncdb run for the Sites app) and then I could view the admin fine. So you can either try this or just delete the sqlite.db file and run syncdb again which will also fix the problem. Also, you don't need to specify the databas

Re: Access denied for user

2012-12-29 Thread Ryan Blunden
You either need to create an account for this user with access to the database or check the username and password provided. How are you administering the DB? PHPMyAdmin? On 27/12/2012, at 6:22 AM, El sayed Gamal wrote: > You need to change your mysql database configurations, that's is it. > >

Re: Using django-profiles app twice in one project.

2012-12-29 Thread Ryan Blunden
The AUTH_PROFILE_MODULE functionality is being deprecated in Django 1.5 in favour of being able to create your own custom User models. It sounds like that would be the way to go, especially as the 1.5 release is just around the corner and trunk is normally rock solid. Cheers, Ryan On 27/12/201

Re: Actions after logout

2012-12-29 Thread Ryan Blunden
When you say you haver a "process in place", do you mean code sitting in a file? If you haven't already, create a logout url and hook it up to your code to delete the log out data. Then just call django.contrib.auth.logout() somewhere in your logout view. Cheers, Ryan On 27/12/2012, at 6:50 AM

Re: When I set DEBUG=False, my 404.html doesn't appear

2012-12-29 Thread nimesh ghelani
Can you post the shell output when 404 occurs along with the TEMPLATE_DIRS part of settings.py? On Saturday, December 29, 2012 9:29:11 PM UTC+5:30, Dae_James wrote: > > I put my 404.html into root of the directory specified in TEMPLATE_DIRS. > However, when I visit an inexisting page, the brows

Re: problem while passing a list of string to javascript in template

2012-12-29 Thread nimesh ghelani
use mark_safe: from django.utils.safestring import mark_safe ticks = mark_safe(["a", "b", "c", "d"]) On Saturday, December 29, 2012 9:27:55 PM UTC+5:30, Everest K.C. wrote: > > Hello Everyone, > I have problem while passing a list of string from django views to > javascript template. The quotati

loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

2012-12-29 Thread Sam Raker
Hello, I've got a very tight deadline, and I'm encountering a very frustrating problem. Every time I try to use loaddata to load my data into my database, I get the loaddata error in the subject. I've tried YAML, I've tried JSON, I've tried excerpting only a few lines of each, all to no avail. I

Re: problem while passing a list of string to javascript in template

2012-12-29 Thread Masklinn
On 2012-12-29, at 19:59 , Ryan Blunden wrote: > Django presumes all template variables are "unsafe" by default to prevent XSS > attacks which is why it's encoded the quotes. > > Read up on filters and auto-escaping and you'll be able to figure out the > rest. Realizing that the string serializ

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

2012-12-29 Thread Ryan Blunden
Can you provide a single example of one of the fixture objects you're trying to import, as well as the model it corresponds to? On 29/12/2012, at 11:34 AM, Sam Raker wrote: > Hello, > I've got a very tight deadline, and I'm encountering a very frustrating > problem. Every time I try to use loa

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

2012-12-29 Thread Sam Raker
Here's the truncated version I tried to load in case the problem was the length of the file: - fields: {location: ST. DENNIS HOTEL, restaurant: Veterans American Guard, status: complete, year: 1900} model: dishes.menu pk: 12495 - fields: {location: BOSTON, restaurant: New England Shorthan

virtualenv setup

2012-12-29 Thread Phil
Hi, I have python/django working system wide. But am currently looking into using Heroku for a new project so am trying to get virtualenv setup for the first time. When I run "django-admin.py startproject whatever" it creates the project ok, but then when I run "python manage.py runserver 8080"

Re: virtualenv setup

2012-12-29 Thread Victor Manuel QuiƱones Victor
Hi Phil sorry for the question, but, did you activate your virtualenv source? $ source bin/activate (?) Anyway, I'd try to install django via pip once you I have my virtualenv created and activated. Cheers On Sat, Dec 29, 2012 at 7:01 PM, Phil wrote: > Hi, > > I have python/django working sys

Re: virtualenv setup

2012-12-29 Thread Phil
Hi, Thanks for reply. Yeah I activated the source(terminal has "venv" beside my username). I followed instructions here(so I pip installed django etc after getting virtualenv up and running)... https://devcenter.heroku.com/articles/django#prerequisites If I runserver thats when I get the error

Getting Access to Object in Admin Panel

2012-12-29 Thread That guy
After overriding list_display, I noticed that I lost access to being able to directly click on the object to view all its fields in the control panel. Hence, I needed to resort to defining return_unicode. I know that theres definitely a better way to approach it, so whats the 'Django' way of do

Re: Design by composition and persistance

2012-12-29 Thread Taras_96
> in your case: > > class Event(models.Model): > name = models.CharField(.) > description = models.CharField() > tw_start = models.DateTimeField() > tw_finish= models.DateTimeField() > timewindow = TimeWindowField(tw_start, tw_finish) > > and getDuration() is a me

Re: Django 1.5 - release date

2012-12-29 Thread Russell Keith-Magee
On Sat, Dec 29, 2012 at 2:44 PM, Aidan Zhakypov wrote: > Does anyone know when Django 1.5 is going to be released as a stable > version? If I want to *start* developing a production web site, should I > write it on Django 1.4 or is it already ok to implement it on Django 1.5? It's difficult to

Re: citations

2012-12-29 Thread Russell Keith-Magee
On Sat, Dec 29, 2012 at 10:26 PM, wrote: > Hi, > > I am creating a site, and trying to implement a referencing/citation > system. > > I'd like to render something like > "Lorem ipsum dolor sit amet[[ref:foo2012]], consectetur adipisicing elit, > sed do eiusmod tempor incididunt[[ref:bar2011]] ut

Re: problem while passing a list of string to javascript in template

2012-12-29 Thread Everest K.C.
Thank you nimesh very much. It worked for me. Masklinn I didn't get your point. Can you please explain? -- With Regards, Everest K.C. BE Computer Engineering Institute of Engineering, Pulchowk Campus URL: http://www.everestkc.com.np -- You received this message because you are subscribed to the

Replicating same model for different deployed application.

2012-12-29 Thread Subodh Nijsure
Hi, I have following situation where. My model consist of say table1, table2, table3. I am going to "host" similar data and associated web interface for multiple customers -( customer1, customer2, customer3.) they would access these application as http://hostname/customer1 http://hostname/custome

Re: virtualenv setup

2012-12-29 Thread Sam Lai
It looks like you haven't installed Django in your virtualenv. In your virtualenv directory, look in lib/python2.x/site-packages and see if there is a Django directory in there. You can also try sourcing your venv, then running Python, and entering in the following statement to see if Python can f

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

2012-12-29 Thread donarb
Not sure if it's related to your problem, but you should never create function names like __period__. Names such as those are reserved for Python internals. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visi

Re: Admin page not found error

2012-12-29 Thread Shahjalal Hossain
Hi, I have done what you said, delete sqlite.db, re-write absolute path, and run sync db. Now, it is showing following error. Is it possible, I have done something wrong in my Django installation? Do I need to reinstall Django, again? How can I check my django installation was ok? Is there any

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

2012-12-29 Thread donarb
And your __unicode__ method is incorrect as well. You should be returning self.restaurant. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/bsJoTGDbveYJ. To

Getting Access to Object in Admin Panel

2012-12-29 Thread donarb
You can code a string that references the __unicode__ method: list_display = ('__unicode__', ... -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/t0v9rTmc