What about your urls.py?
Kenny
On Sun, Jun 26, 2011 at 1:15 PM, vahidR wrote:
> Hi There,
>
> I have a very basic question about adding images to Django 1.3.
> I've almost read the whole documents on adding Static files , searched
> for relevant results both in here and StackOverFlow and still
> i want to create superuser(administrator) on registration
User.objects.create_superuser is your friend.
> user=User.objects.create_user(
> username=form.cleaned_data['username'],
> password=form.cleaned_data['password1'],
> email=fo
:-)
You will not always need web frameworks. It really depends on what you
want to make.
http://dfhu.org/blog/should-you-use-a-framework
Kenny
On Tue, May 10, 2011 at 5:57 AM, Kenny Meyer wrote:
>> 1. What is the purpose of using a web framework like django? Could I
>> get the same
> 1. What is the purpose of using a web framework like django? Could I
> get the same functionality by just using pythong cgi and python to
> access mysql? (like php scripting)
A web application framework is a software framework that is designed
to support the development of dynamic websites, web a
Oh! I have found a precious discussion on SO.
http://stackoverflow.com/questions/38601/using-django-time-date-widgets-in-custom-form
I think you might like the highest-voted solution.
Kenny
On Mon, May 9, 2011 at 9:28 PM, Kenny Meyer wrote:
> s/sting/string
>
> On Mon, May 9, 2011 a
s/sting/string
On Mon, May 9, 2011 at 9:27 PM, Kenny Meyer wrote:
>> However, I keep getting validating errors with datetime, probably is
>> how I am entering the data. I have also tried the SplitDateTimeWidget
>> I am getting the same
>> validation error
> These
n error. I have tried manually creating the form and it
> worked. I wonder what is the normally approach to DateTimeField in
> django templates. Is using the
> SplitDateTimeWidget the norm or should I use the AdminDateTimeWidget ?
>
> Thanks again.
>
>
>
> On Mon, May 9, 201
On Mon, May 9, 2011 at 10:55 AM, Kevin Miller wrote:
> Dear all,
>
> I am new to django but is in the process of building my first website. I have
> been ok for a while as I am not new to programming in python. However, I have
> one problem that I cannot figure out the proper way to do it. I want
Look at the Celery project ( http://celeryproject.org/ ) to be sure it
fits your needs. You can easily integrate with Django by using
https://github.com/ask/django-celery .
You could also use a signal, listening for a request_finished, which
will run the task inside a Thread. Here's a concrete exa
As a newbie I recommend you taking the Django tutorial. Here's the
part about forms:
http://docs.djangoproject.com/en/dev/intro/tutorial04/
Kenny
On Sat, Apr 30, 2011 at 7:24 PM, Pulkit Mehrotra
wrote:
> can anyone tell me the precise way of taking an input from a form and
> storing it in a da
> Or is there other better solution?
I think you should handle this in the view, like checking there if the
user has sufficient privileges for seeing the message.
Kenny
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
On Fri, Apr 29, 2011 at 5:11 PM, Daniel Roseman wrote:
> On Friday, 29 April 2011 21:24:44 UTC+1, Kenny Meyer wrote:
>>
>> Hello,
>>
>> I have the following inclusion tag in templatetags/show_submissions.py :
>>
>> ## BOF
>>
>> register
Hello,
I have the following inclusion tag in templatetags/show_submissions.py :
## BOF
register = template.Library()
@register.inclusion_tag('competition/templatetags/show_submissions.html')
def show_submissions(participant):
submissions = Submission.objects.get(participant=participant)
Hi Rosemarie,
Try a quick google search with terms like "django has no ForeignKey to " and you'll get a bunch of results. I promise.
Here's only one of those results:
http://stackoverflow.com/questions/609556/django-admin-inlining-foreign-key-issue
AFAICS this issue has been discussed various t
hing horrible like put os.walk in a loop.
>
> call_command: Kenny Meyer pointed this out to me. It lets you run
> 'manage.py' commands from a Python script.
> http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code
>
> SystemExit: Wh
Hi Shawn,
http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code
Does this answer your question?
Kenny
On Wed, Apr 27, 2011 at 12:41 PM, Shawn Milochik wrote:
> Sorry, I realize that last post is missing the context of the original
> question.
> Ple
On Tue, Apr 26, 2011 at 4:17 PM, Shawn Milochik wrote:
> If you're creating a ModelForm that already has data in the database, don't
> pass in request.POST. Instead, pass in the instance with the 'instance'
> keyword argument.
>
> For example, if it was a ModelForm for the User object: form =
> Us
On Sun, Apr 24, 2011 at 5:23 PM, Shawn Milochik wrote:
> It's not recommended that you subclass User.
>
> Better: Create a class to use for a user profile and associate it with
> the User using the instructions here:
>
> http://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-informat
> I have done the following, and it works most of the time for me:
>
> def index(request):
> user = request.user
> if user.is_authenticated():
> if user.is_superuser:
> return redirect('/admin')
>
> judge = None
> participant = None
> competition = None
Hello guys,
In my application models I have two models, Judge and Participant:
from django.contrib.auth.models import User
class Judge(User):
pass
class Participant(User):
pass
In my view I want to find out if the authenticated user is either a
Judge or a Participant. How can
On Fri, Apr 22, 2011 at 4:22 PM, John Maines wrote:
> Hello,
>
> I am going through the Django Tutorials on the Django home page. All
> has gone fine, except one thing:
>
> When building the admin page, I can't get the unicode translator to
> work. It is supposed to change "Poll: Poll object" to r
Can you give us the following information:
- Django version installed on your system
- Full tracebacks, not just what type of Exception has been thrown.
Please?
Kenny
On Thu, Apr 21, 2011 at 4:00 PM, Gandeida wrote:
> Hello,
>
> I have been working through the Django Book, and I keep gettin
On Wed, Apr 20, 2011 at 8:09 PM, Rodrigo Ruiz wrote:
> Another thing I still haven't decided is between python with Django or ruby
> on rails.
> I know it's a Django group, so I know i must expect the good aspects on
> Django, but why should I use Django instead of ruby on rails?
I think you will
Kenny Meyer (knny.m...@gmail.com) wrote:
> Hello,
>
> I have two models, 1) FlashCard and 2) Practice, and I have a generic relation
> in the FlashCard model pointing to the Practice model using the contenttypes
> framework.
> The Practice model tracks information like how ma
ect for my FlashCard object.
I started a research on Google, but I really haven't found anything really
helping me to do that.
Can you guys give me a helping hand on this with your expertise, please?
Additional information about my environment:
- Django 1.2.3
- PostgreSQL 8.4.5
Cheers,
Kenny
--
- Kenny Meyer
To understand recursion, we must first understand recursion.
--
pgp3RUd4A9RGp.pgp
Description: PGP signature
ook at CNPROG [1]? It looks very similar to Stack
Overflow, but beware that similar does *not* mean the *same*.
Actually, you could cherry-pick all the modules you'd like to have in your app
and mix them together.
[1] http://github.com/cnprog/CNPROG
--
Regards,
Kenny Meyer | http://kenny.
Russell Keith-Magee (freakboy3...@gmail.com) wrote:
> On Sat, Mar 6, 2010 at 6:55 AM, Kenny Meyer wrote:
> > Wilmer A. Delpratt (wdelprat...@gmail.com) wrote:
> >> Hi everyone..i'm new in this group...my friends says this is one of
> >> the best groups...
>
t should work.
> Hi everyone..i'm new in this group...my friends says this is one of
> the best groups...
They're certainly right your friends. ;)
Hope I could help,
Kenny
.. [1] http://www.hoax-slayer.com/email-subject-lines.html
.. [2] http://catb.org/~esr/faqs/smart-questions.
Tom Evans (tevans...@googlemail.com) wrote:
> On Thu, Mar 4, 2010 at 10:39 AM, Kenny Meyer wrote:
> > ...
> > I would probably have an app tree structure like this:
> >
> > test_app/
> > |-- __init__.py
> > |-- models.py
> > |--
rk of Django and writing reusable apps. ;)
> b. many people do it.
AFAIK I don't know many Django developers who do that (if any). But why
not do it?
Large views modules can be quite readable and browseable if your
editor supports intelligent code folding.
Correct me if I got something wr
're trying to import a Middleware class which doesn't exist.
Compare your MIDDLEWARE_CLASSES with this working example:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware'
zweb (traderash...@gmail.com) wrote:
> What is the best way to build installer for python/django based
> software product ?
> Like in Microsoft world you can have .exe and installshield?
>
> I need to way which can guide user to setup database, run DB script,
> set up parameters and guide him thro
Martin J. Laubach (mjl+goo...@emsi.priv.at) wrote:
> > post_info_dict = {
> > 'queryset': Post.objects.all(),
>
> You probably don't want to evaluate your queryset here. Drop the .all
> () and you'll be good.
>
> mjl
>
Argh, the tiny details...
Thanks mjl!
--
You received this
Hello,
Problem:
I basically have a blog with a ``Post`` model, representing each post of
the blog. Now if I create an object, save it and want to view it I get
a 404 Error with Django saying "No post found for".
This like this until I restart the development server (actually when
deploy
Kenny Meyer (knny.m...@gmail.com) wrote:
> El 22/01/10 07:31, Kenny Meyer escribió:
> > I'm trying to generate some feeds for my blog with Django's high-level
> > Syndication Framework.
> > My problem is, when browsing to the URL defined in the ``link``
> >
Hi guys,
I'm trying to generate some feeds for my blog with Django's high-level
Syndication Framework.
My problem is, when browsing to the URL defined in the ``link``
attribute of the ``syndication.Feed`` model, there's no Feed
generated/displayed.
If not clear what I'm trying to say, please rea
> How other can access pages i generated with django?
You mean how others can access pages which Django generated *for you*.
If you're connected with computers in a home network they can see your
work with a webbrowser, knowing the IP address of the Pc which is
serving the Django "pages". Usually t
On Wed, 9 Dec 2009 21:58:39 -0500
Karen Tracey wrote:
> On Wed, Dec 9, 2009 at 8:24 PM, Kenny Meyer
> wrote:
>
> >
> > /urls.py[shortened]:
> > urlpatterns = patterns('',
> >(r'', include('posts.urls'))
Hello,
I want to simply render a built-in comment form in a template, using
Django's builtin commenting module, but this returns a
TemplateSyntaxError Exception.
I need help debugging this error, please, because after googling and
using the Django API reference, I'm still not getting any farther.
at you're doing this directly in python, since in the
> manage.py shell other stuff has already caused django.core to be
> imported, so it's available. (And Frank was probably using the
> manage.py shell, thus finding that he didn't have to separately
> import django.c
, 'template', 'utils', 'views']
> >>> dir(django.core)
> ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> '__path__', 'cache', 'exceptions', '
Hi guys,
I have some strange behaviour in my interactive python shell, when
trying to browse Django modules...
Example:
>>> import django
>>> dir(django.core)
AttributeError: 'module' object has no attribute 'core'
>>> import django.core
>>> dir(django.core)
['__builtins__', '__doc__', '__file_
42 matches
Mail list logo