Re: Trouble Starting Up with runserver

2009-05-07 Thread donarb
On May 7, 8:43 am, Phil Mocek wrote: > This, unfortunately, is not explained in the > runserver documentation [1] or the admin utility's built-in help. > The only place I've found it documented is in chapter two of The > Django Book [2]. It is also documented in the tutorial: http://docs.django

Re: Django superusers

2009-05-15 Thread donarb
On May 15, 7:31 am, Mike Driscoll wrote: > The book does not mention anything about the autodiscover() call, > although it seems to have done everything else right. Once I added > that, the admin pages starting working as expected. I have the PDF version of the book and the autodiscover() call

Re: Running tests - minor problem with fixtures

2007-05-29 Thread donarb
The original question was never really answered. I am using 0.96 and cannot load any fixture unless it is named 'initial_data.json', even when I add a fixtures attribute to my testcase (yes, it is subclassed from django.test.TestCase). My testing works great, as long as I put all my data into ini

Re: CSS Basics

2006-12-20 Thread donarb
cwurld wrote: So when one says "Serve from Django" does that mean use the "view django.views.static.serve"? The documentation says that is not secure. Does anyone know what the security risk is? Thanks, Chuck It's insecure because of the way that dynamic servers behave versus static servers

Re: CSS Basics

2006-12-20 Thread donarb
hasan_aljudy wrote: I'm quite new to Django and I ran into this situation yesterday .. in the end, I went with the {% include "style.css" %} trick, which seems to be the best solution, because it's the simplest one, and I don't see any drawbacks to it. That will work fine. The only drawback i

Re: Displaying template location in html

2012-01-29 Thread donarb
Use the Django Debug Toolbar, it shows all kinds of things. For templates, it shows the names of all the templates that make up the given page as well as which tags are used on the page. With DDT, you don't have to annotate (and un-annotate) anything. http://pypi.python.org/pypi/django-debug-tool

Re: Django Admin base.html error

2012-02-25 Thread donarb
Try this first. Check your urlconf and make sure that all routes lead to actual methods. Like if you have a url that points to something like myapp.views.index, make sure that there is actually an index method in views.py. This error bites everyone eventually, since people get ahead of themselves

Re: overlay feature in django

2012-03-12 Thread donarb
My guess is that he means a lightbox-like popup form, especially when he mentions login and registrations. Don On Mar 12, 12:21 am, kenneth gonsalves wrote: > On Mon, 2012-03-12 at 00:14 -0700, Derek wrote: > > That is not an example or definition of "overlaying"; just a laundry > > list of temp

Re: pub_date timezone

2012-10-26 Thread donarb
You misspelled 'pub_date' as 'put_date' in your model definition. On Thursday, October 25, 2012 9:30:57 AM UTC-7, BrendanC wrote: > > Hi erm > > Went back over your comment and realised what you commented. > After python manage.py I gget the python prompt>>> and then typed > from polls.models i

Re: http://lightbird.net/dbe/ ... django by example help

2012-11-18 Thread donarb
When you look at the web page, the code in the "Enhancing Admin" section is code that should be added to the code in the first listing. So the import statements that you need are already there. On Sunday, November 18, 2012 7:05:54 AM UTC-8, boxcarlo wrote: > > Hi, > I'm not very expert on pyth

Re: How to get the source code of an url?

2012-11-27 Thread donarb
You're not parsing XML, it's HTML and it's not well formed, for example your title and author tags have closing tags that don't match. Your HTML needs to be valid XHTML before trying to use an XML parser on it. You might want to try something else to parse this, like Scrapy or Beautiful Soup. O

Re: Template syntax error: Could not parse the remainder: '-login' from 'accounts-login'

2012-12-03 Thread donarb
Except, the Django documentation states that url names with dashes are acceptable and the examples show url tags using unquoted names. It even says you can use any character you want: *The string used for the URL name can contain any characters you like. You are not restricted to valid Python n

Re: Template syntax error: Could not parse the remainder: '-login' from 'accounts-login'

2012-12-03 Thread donarb
Correction, the syntax has changed between 1.4 and 1.5. You are now required to quote the name in the url tag. -- 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-user

Re: Templates not found

2012-12-12 Thread donarb
When you used the shell, you imported 'tracks.views' but in your urls.py, you have musicsite.views.home. The two don't match. On Wednesday, December 12, 2012 6:11:54 AM UTC-8, Lloyd Dube wrote: > > urls.py: > > urlpatterns = patterns('', > # Examples: > url(r'^$', 'musicsite.views.home',

Re: deprecation of DotExpandedDict announced?

2012-12-17 Thread donarb
On Monday, December 17, 2012 7:37:59 AM UTC-8, roman wrote: > > Hello everyone, > > just trying 1.5 beta ... > > django.utils.datastructures.DotExpandedDict seems to be no longer there. > Can't find where this has been announced. > Did I miss something? > > Regards > Roman > https://github.com/

Re: Django community, is it active?

2012-12-18 Thread donarb
On Tuesday, December 18, 2012 1:36:42 PM UTC-8, sparky wrote: > > > ... I'm also finding it hard to find any user groups locally in the UK > (I'm based in Manchester, UK). > > Sometimes Django does not have enough of a user base in an area for its own group, you might want to check out the lo

Re: Change label/title from an application added to django admin

2012-12-23 Thread donarb
On Sunday, December 23, 2012 6:02:45 PM UTC-8, Ankush Chadda wrote: > > Hi, > Look at the Meta options verbose_name and verbose_name_plural > > Using these you can change the display name in admin. > > Those are for the displaying the model names, not the app name. -- You received this messa

Re: ImportError at/ No module name

2012-12-25 Thread donarb
On Tuesday, December 25, 2012 4:29:22 AM UTC-8, djangobie wrote: > > I appreciate your response. > The __init__.py is there in the app folder (yes, I created the app via > manage.py). > It ran perfectly on initial attempts, but with new code added, I got > stuck. My so far conclusion (though, not

Re: Django comments customization issue

2012-12-26 Thread donarb
On Wednesday, December 26, 2012 11:43:47 AM UTC-8, sri wrote: > > Hi, I am trying to learn django comments customization by adding an > integer field to the comments framework. My Model looks like below > > class CommentWithRating(Comment): rating = > models.IntegerField(name='rating') > > And i

Re: Minimilisticaly: Deploying Django using Nginx on Ubuntu 12.10

2012-12-27 Thread donarb
On Wednesday, December 26, 2012 11:26:12 PM UTC-8, djangobie wrote: > > Hi all, > I am trying to deploy my Django project using Nginx, tried various > tutorials. All of them are filled bunch of dependencies and requirements. > Here I am looking forward to a simple (in sure way minimilistic), p

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-27 Thread donarb
On Thursday, December 27, 2012 8:51:11 AM UTC-8, Dan Richards wrote: > > Yeah, psycopg2 is definitely installed... > > On Thursday, December 27, 2012 9:03:31 AM UTC-5, ke1g wrote: >> >> >> >> On Thu, Dec 27, 2012 at 8:26 AM, Dan Richards wrote: >> >>> Hmmm...well that isn't working either - same

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-27 Thread donarb
On Thursday, December 27, 2012 8:51:11 AM UTC-8, Dan Richards wrote: > > Yeah, psycopg2 is definitely installed... > I noticed that you are using djcelery (which I know nothing about), but have you tried getting everything working without it first? There's a line in your settings that says DATA

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: 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

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

2012-12-30 Thread donarb
On Sunday, December 30, 2012 9:54:45 AM UTC-8, Sam Raker wrote: > > Thanks for your suggestions. > > I eliminated the underscores and got rid of the __unicode__ methods > entirely, cleaned up my except statement, and changed the order of stuff > such that all of each model's fields are defined be

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

2012-12-30 Thread donarb
On Sunday, December 30, 2012 11:58:46 AM UTC-8, Sam Raker wrote: > > So I upped the verbosity like you said, and basically all it got me was a > bunch of text telling me all the places Django didn't find my fixture > before it finally did, and then the same error. Here's the full text of the >

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

2012-12-30 Thread donarb
At this point, I would just skip trying to load the data through Django and write a quick Python script to load the data using INSERT statements or create a bulk data file to load it directly into MySQL. I'm not as familiar with MySQL as I am with Postgres, but Postgres can swallow a whole data

Re: How to add an element of derived data to a Django model?

2013-01-05 Thread donarb
On Saturday, January 5, 2013 8:48:00 AM UTC-8, Saqib Ali wrote: > > > I have a Django Model as follows: > > > class myModel(models.Model): > > a = models.IntegerField() > > b = models.IntegerField() > > > I want to add a models.BooleanField() named c to the myModel class. > However

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread donarb
On Thursday, January 10, 2013 6:04:47 AM UTC-8, john.w...@tpiengineering.com wrote: > > What is the best way to specify a database level default value with > Django? If I want a timestamp column to default to the SQL function now(), > is there an accepted way to make it happen? Or to default a

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread donarb
auto_now and auto_now_add don't work at the database level for raw SQL inserts or updates. -- 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/-/noYf3kz3qMYJ. To

Re: where the syntax error?

2013-01-14 Thread donarb
On Monday, January 14, 2013 12:39:08 PM UTC-8, Érico Oliveira wrote: > > class Imovel(models.Model): > disponivel = models.BooleanField(choices=DISPO) > data_venda = models.DateTimeField(auto_now_add=True, blank=True) > > def validaData(self): > if self.data_venda < datet

Re: Design for storing likes/dislikes?

2013-07-16 Thread donarb
On Tuesday, July 16, 2013 5:29:47 PM UTC-7, Victor Hooi wrote: > > Hi, > > We have a list of users, who are going to like/dislike various widgets. > > My question is regarding how to store the like/dislikes. > > Essentially, there can be three states between a user and a widget - like, > dislike,

Re: django-registration ImportError

2013-07-21 Thread donarb
On Saturday, July 20, 2013 9:23:37 PM UTC-7, Mike wrote: > > I just updated django-registration to 1.0 (from 0.8) and now I get an > ImportError: > > ImportError: cannot import name activate > > > /Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/u

Re: ImportError: No module named django.core.management

2013-07-28 Thread donarb
On Sunday, July 28, 2013 7:31:39 AM UTC-7, vinoth job wrote: > > venv > /bin > /build > /django > /include > /lib > /local > > > here i installed django-1.4.5. and there is no error output coming when i > run this command . > pip freeze|grep -i django > > > On S

Re: View not working / how can I test it in the shell?

2013-10-11 Thread donarb
On Friday, October 11, 2013 2:48:13 PM UTC-7, Mario Osorio wrote: > > Hello all, working with mezzanine, I created in an app (newsroom) folder, > a views.py http://dpaste.com/1413587/. This view is an addition to the > blog app in site-packages. I then I put a section in my blog_post_list.html >

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread donarb
On Thursday, October 24, 2013 2:34:13 PM UTC-7, Don Fox wrote: > > > > python manage.py shell > > Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) > > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. >

Re: List in a Template

2013-11-09 Thread donarb
On Saturday, November 9, 2013 5:55:07 AM UTC-8, Timothy W. Cook wrote: > > I have a view that creates a list of managers in the context. I want > to test if a logged in user is in the list before displaying a link to > the manager dashboard. > > class IndexView(TemplateView): > > template_n

Re: List in a Template

2013-11-09 Thread donarb
On Saturday, November 9, 2013 9:28:01 AM UTC-8, Timothy W. Cook wrote: > > SOLVED (sort of). > > On Sat, Nov 9, 2013 at 2:56 PM, donarb > > wrote: > > > If the user is a manager, you should be able to just test for membership > in > > the list: > >

Re: List in a Template

2013-11-09 Thread donarb
On Saturday, November 9, 2013 5:37:19 PM UTC-8, donarb wrote: > > > As I said, I haven't tested this and I may be buggy, but you should be > able to get the idea. > > Um, I'm definitely not buggy, but my sample may be... -- You received this message because you

Problem with url template tag and namespaces

2015-04-07 Thread donarb
I'm having a problem with a generated url using the url template tag, currently using Django 1.6.5. The appname is 'dashboard', here is the main urls.py: urlpatterns = patterns("", (r'^dashboard/', include('dashboard.urls', namespace='dashboard')), ) Here is the dashboard urls.py: # dash

Re: Problem with url template tag and namespaces

2015-04-07 Thread donarb
On Tuesday, April 7, 2015 at 9:19:17 AM UTC-7, donarb wrote: > > I'm having a problem with a generated url using the url template tag, > currently using Django 1.6.5. > > The appname is 'dashboard', here is the main urls.py: > > urlpatterns = pattern

Re: How to change type of field in model, when database is already populated ?

2015-05-17 Thread donarb
On Saturday, May 16, 2015 at 6:26:32 AM UTC-7, mangu rajpurohit wrote: > > Hi, > > I am new to Django. I am working on an application ,where the types of > table fields in database are not known before hand. So, say for eg. In > student table, I am assigning CharField to marks field, ie > > class

Re: Newbie operational error with Django db tables

2014-11-06 Thread donarb
On Thursday, November 6, 2014 6:31:08 AM UTC-8, Mr. crazy wrote: > well, > > That is totally true.This is the problem which I need to find it's > solution. > Do I have to make the table?? How? > I looked for the DB tables and I didn't find it-Maybe I did not searched > the correct place > > I

Re: how to test an application that's using a legacy database

2014-11-10 Thread donarb
On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: > > Here comes the context. Sorry. > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >> >> >> No, when you run syncdb it will not create or modify any existing >> tables, only create new ones.

Re: Issue in Django 1.7.1 with __unicode__ and admin site?

2014-11-11 Thread donarb
On Tuesday, November 11, 2014 1:26:53 PM UTC-8, krmane wrote: > > > That brings me to another related question. > I had asked this before but let's put it in a different way. > With the official Django tutorial for 1.7, they say it is ment for > Python 3X. > Do we have any plan to have some app

Re: Uploadfile form and CSS Style

2014-11-17 Thread donarb
On Monday, November 17, 2014 5:00:54 AM UTC-8, Russo wrote: > > Hi James, > > sorry I'm new on Django, can you give me some code example? I mean, hot to > define the CLASS or ID into the html with elements like this {{ > form.docfile }} ? > > Regards > Russo > > > El jueves, 13 de noviembre de 20

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2014-11-21 Thread donarb
On Friday, November 21, 2014 10:59:19 AM UTC-8, Andreas Ka wrote: > > I don't know. > How to test that? > > > > The things I have done were these: > > https://docs.djangoproject.com/en/1.7/intro/tutorial02/#customizing-your-project-s-templates > > mkdir templates > mkdir templates/admin > cp > /us

Re: Want to change home->blog to Admin home -> blog

2014-11-21 Thread donarb
On Friday, November 21, 2014 2:02:29 PM UTC-8, Collin Anderson wrote: > > Hi, > > Is your TEMPLATE_DIRS set correctly? The tutorial recommends this: > > TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] > > Thanks, > Collin > > > > On Tuesday, November 18, 2014 2:06:35 AM UTC-5, Sachin Tiwari w

Re: Image input missing from POST request

2014-11-22 Thread donarb
On Friday, November 21, 2014 7:56:54 PM UTC-8, Abhishek Batra wrote: > > Hi, > > This is probably not a Django issue, but just trying my luck. > > I have an input field corresponding to a Django ImageField in a Django > template. Rendered, the HTML looks like: > >method="post" > id=

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2014-11-25 Thread donarb
tings as settings >> print settings.TEMPLATE_DIRS >> ['D:\\Programming\\eclipse\\mysite\\templates'] >> >> so no: not empty. >> >> >> Why is my file templates/admin/base_site.html never called >> when I open http://127.0.0.1:8000/admin/ or &g

Re: Preventing race conditions when submitting forms

2014-11-25 Thread donarb
On Tuesday, November 25, 2014 7:57:08 AM UTC-8, Paul Johnston wrote: > > Hi, > > Consider an e-commerce site, where Alice and Bob are both editing the > product listings. Alice is improving descriptions, while Bob is updating > prices. They start editing the Acme Wonder Widget at the same time. B

Re: Does Django offers a way to generate data grid from database table like web2py

2014-11-28 Thread donarb
On Wednesday, November 26, 2014 10:33:25 PM UTC-8, Sarbjit singh wrote: > > Hi, > > I have been using web2py for sometime. I am exploring Django now, in > web2py there is a way to generate data grids (using SQLFORM.grid) which > generates very net grid based on the data model with support to add

Re: Reverse for 'results' with arguments '(3L,)' and keyword arguments '{}' not found.

2014-12-02 Thread donarb
On Tuesday, December 2, 2014 6:39:46 AM UTC-8, Terry Lang wrote: > > I am in the middle of tutorial 4, but am getting an error. > What did I do wrong? > > NoReverseMatch at /polls/3/vote/ > > Reverse for 'results' with arguments '(3L,)' and keyword arguments '{}' not > found. 1 pattern(s) tried:

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-03 Thread donarb
On Wednesday, December 3, 2014 11:59:42 AM UTC-8, Danish Ali wrote: > > this is stacktrace when I use: slug = AutoSlugField(populate_from='name') > in my model > > > Environment: > > > Request Method: POST > Request URL: http://127.0.0.1:8000/admin/product/shop/add/ > > Django Version: 1.7.1 > Py

Re: Commercial Django e-commerce products

2014-01-28 Thread donarb
On Tuesday, January 28, 2014 5:39:38 AM UTC-8, Alex Strickland wrote: > > > Can anyone suggest any commercial Django e-commerce products? > > The only commercial one written in Django that I know of is WebCube. I know nothing about them, so can't make a suggestion. www.getwebcube.com -- You r

Re: moving from sqlite3 to mysql

2014-01-28 Thread donarb
On Tuesday, January 28, 2014 9:17:32 AM UTC-8, Malik Rumi wrote: > > This is somewhat like the question in "need help moving to production > server" but I think the right procedure is to start a new thread. So I > think I have done well for just starting out. With your help I've gotten > Django

Re: App_step.readme_id may not be NULL

2014-01-30 Thread donarb
On Thursday, January 30, 2014 9:08:22 AM UTC-8, Wnt2bsleepin wrote: > > I am new to Django and am trying to save two objects from the same form. > > Models: > > class ReadmeTemplate(models.Model): > """ > Represents a bugfix README > > Contains step models, which contain mult

Re: when I pip-installed django-debug-toolbar, the latest version of Django was installed automatically.

2014-02-18 Thread donarb
On Monday, February 17, 2014 9:56:09 PM UTC-8, jmin...@gmail.com wrote: > > hi Frank, > > I appreciate it but seem that this situation is so unusual that people do > not understand. > I have done those already. > > > So I do > 1) pip uninstall django > 3) pip uninstall django-debug-toolbar >

Re: when I pip-installed django-debug-toolbar, the latest version of Django was installed automatically.

2014-02-18 Thread donarb
On Monday, February 17, 2014 9:56:09 PM UTC-8, jmin...@gmail.com wrote: > > hi Frank, > > I appreciate it but seem that this situation is so unusual that people do > not understand. > I have done those already. > > > So I do > 1) pip uninstall django > 3) pip uninstall django-debug-toolbar >

Re: What are the active Django e-commerce frameworks right now (2014)?

2014-04-26 Thread donarb
On Saturday, April 26, 2014 3:57:51 AM UTC-7, Brutus Schraiber wrote: > > Thanks 'somecallitblues' I will definitely take a closer look at Mezzanine > and Cartridge. > > But I'm kinda baffled. Only one answer after two weeks? > > Sure webshops might not be the hot topic anymore than they where a g

Re: Django Template Based If Statement Issue

2014-05-12 Thread donarb
On Monday, May 12, 2014 3:37:47 PM UTC-7, G Z wrote: > > ok its still not putting out the vm data i get > > > Grant - google.com - 7029855378 - zuk...@gmail.com - 2332 > oakland st > - - > > > {% for customer in customers %} > {{ customer.NAME }} - {{ customer.W

Re: csrf question

2014-05-15 Thread donarb
On Wednesday, May 14, 2014 11:35:46 PM UTC-7, G Z wrote: > > So I read the documentation on passing csrf tokens, however its giving me > an issue i think its because im trying to pass it as a dictonary variable > with my form and customers. > > This is from the documentation > > from django.views