On 6 авг, 18:48, Shawn Milochik wrote:
> Are you running collectstatic after making those changes?
After Your advice I did so without any success. The details are:
I use django 1.3, Windows on a local computer.
1) I removed 'products' and 'thumbnails' subfolders from 'image'
folder and placed an i
hi, jimmy
you should pass the name of your func with url in template. such as your
example,
in your urls.py, you update the url: url(r'card/create$',
'card.views.create_card', name = 'create_card'),
and then you can use the url in your template like this : {% url
create_card %}
在 2011年8月7日星期日,J
Hi,
I got the error "Caught ImportError while rendering: No module named
urls" when using:
{% url 'card.views.create_card' %} in the template file
in the urls.py the route to the url is:
urlpatterns = patterns('',
url(r'card/create$', 'card.views.create_card'),
)
The Django version I use is
"Python-dad which stands for Django Automated Deployment is a
lightweight Python package which harness the power of virtualenv, pip
and fabric to fully automate the development setup and deployment of
django projects. "
Blog post: http://haineault.com/blog/163/
Project page: http://code.google.com
On 6 août, 19:32, nixlists wrote:
> Thank you so much guys, your suggestions are very helpful. Bruno,
Why, thanks... Oh, and did I suggest paying more attention to
naming ?-)
Sorry, couldn't resist - but from experience, good naming really makes
a difference - it makes the code self-documenting
On 6 août, 22:53, paulo couto wrote:
> Thank you all for your advices.
> I started with the beginners guide from the python official site because i
> think i should learn at least the basics of python before move into django.
Yeps, right. Better to start with the core language, then learn the
f
On 5 août, 20:30, Doug Ballance wrote:
> Your time spent learning python and django
> will not be wasted if you also choose to learn/use php. I think it's
> much easier to learn good methodology and practices with python, and
> then carry those practices over to php than than the other way
> arou
Hello,
Is it possible to somehow interrogate url configuration at startup
time?
I am trying to give users a meaningful message when something needs to
be changed
in the url configuration.
For example - now I need to change the handler500 and handler404, when
my app
is upgraded.
Tried many ways,
I indstalled django-regstration per the Quick-Start guide:
easy_install -Z django-registration
manage.py syncdb
I added
'registration',
to
INSTALLED_APPS = ()
and
ACCOUNT_ACTIVATION_DAYS = 7
I added
(r'^accounts/', include('registration.backends.default.urls')),
tp my urls.py
At this point I
Hi,
I have a small question:
I use settings.py:LOGGING in order to configure my logging
Now I'd like to add some log traces during the import phase
of a module using django
Example:
import logging
logger = logging.getLogger('mymodule')
logger.INFO('created logger')
import django.db
logger.I
I love the django book. Until I got to the section "Tying Your First
Form Class".
Problem:-"This class can live anywhere you want — including directly
in your views.py file — but community convention is to keep Form
classes in a separate file called forms.py. Create this file in the
same directory
Thank you all for your advices.
I started with the beginners guide from the python official site because i
think i should learn at least the basics of python before move into django.
What you advice after i complete the beginners guide?Should i pick one of my
designs and try to "pythonize" it? Shou
hmm. Still stuck on this. I have tried a range of solutions, but none work
for me with 1.3 class-based views.
Can anyone help?
thx,
paul.
--
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
ya it worked. thank you!
On Sat, Aug 6, 2011 at 11:07 PM, Thomas Orozco wrote:
> In your context you passed your 'lists' object as 'book'.
>
> So {% if book %} would work, but your current syntax won't.
> Le 6 août 2011 19:32, "shakthi" a écrit :
>
> > The if condition in my html template is not
In your context you passed your 'lists' object as 'book'.
So {% if book %} would work, but your current syntax won't.
Le 6 août 2011 19:32, "shakthi" a écrit :
> The if condition in my html template is not working, only else is
> executing.
>
> view function is
> def test(request):
> lists=Book.o
This is because you're passing it as 'book' in the context.
{% if book %} will evaluate to True.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group
Thank you so much guys, your suggestions are very helpful. Bruno,
others: I really appreciate your help.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this
The if condition in my html template is not working, only else is
executing.
view function is
def test(request):
lists=Book.objects.all()
return render_to_response('test.html',{'book':lists})
template file:test.html
{% if lists %}
{% for a in lists %}
There are {{book|
Thanks guys ... for clarifying that up..
> Date: Sat, 6 Aug 2011 01:50:21 -0700
> Subject: Re: Question about imports..Python Dejango and Models
> From: andrew.mark.sc...@gmail.com
> To: django-users@googlegroups.com
>
> Hi,
>
> models.Model is django.db.models.base.Model and is defined in djan
Hi,
models.Model is django.db.models.base.Model and is defined in django/
db/models/base.py.
Have a look at django/db/__init__.py (in your local Django
installation or https://code.djangoproject.com/browser/django/tags/releases/1.3)
and http://docs.python.org/tutorial/modules.html.
Regards,
Andr
I'd like to be able to display the superuser and active status of users
in the Django admin interface. Is there a good/clean way of doing that?
(Alternatively, does anybody think there's a chance of getting code to
make this happen in Django itself?)
While looking around, I ran into
http://djangos
Are you running collectstatic after making those changes?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...
I have got working test project but it works very strange.
http://www.w3.org/1999/xhtml"; xml:lang="en">
What is strange: if I rename an image file or any directory and change
a reference accordingly, an image disappears from the page.
--
You received this message because you are s
2011/8/6 Rafael Durán Castañeda :
> I'm not a django expert but I think you are wrong. Checking my django
> installation:
>
Yep, you're right.
https://code.djangoproject.com/browser/django/trunk/django/db/models/base.py
--
You received this message because you are subscribed to the Google Gro
I did it in a simple way ;)
I had seperate model class for images and I used inline models in admin
Take a look at code below:
models:
class News(models.Model):
title = models.CharField("Tytuł", max_length=256)
text = models.TextField("Treść")
date_added = models.DateTimeField(editabl
On 6 août, 02:45, nixlists wrote:
> On Fri, Aug 5, 2011 at 5:14 PM, Subhranath Chunder
> wrote:
> > Your model declarations are very confusing for me,
Indeed. Not using explicit names, and reusing the same name for both a
field in the Product model and the foreign keys to Product in other
model
On 6 août, 03:04, Adam Zedan wrote:
> Hi while going through the Django Book I ran into the following code
> Being fairly new to Python the code kind of confused me
Python-related questions ought to posted on comp.lang.python... But
anyway:
> from django.db import models --->lineA
> class Pu
I'm not a django expert but I think you are wrong. Checking my django
installation:
- models is package not a python module
- __init__.py from this file contains:
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
from django.db import co
28 matches
Mail list logo