On Feb 4, 8:56 am, workingbird wrote:
> i the database is created successfully, and i can sign in as a
> super_user.
> and in model documentation (http://localhost:8000/admin/doc/models/),
> the 'Account' model can be found.
> the problem is that, the on Site administration home page ,it is only
On Feb 5, 12:19 pm, min wrote:
> Hi, everyone.
>
> I'm learing Django now. Currently, I have a problem with Django and
> jQuery. The detail is that:
>
> Firstly, I have a form in the forms.py:
>
> class TestForm(forms.Form):
> name = forms.CharField( max_length=30 )
>
> Then, in the views.py:
On Feb 5, 3:50 pm, rc wrote:
> I am newbie to Django and I am struggling to get my arms around DJango
> and it's data access api (models).
>
> I have these models:
>
> class Profile(models.Model):
> profile_id = models.AutoField(primary_key=True)
> profile_name = models.CharField(
On Feb 5, 3:59 pm, knight wrote:
> Hi,
>
> I have the following classes in my models.py:
>
> class Default(models.Model):
> name = models.CharField(max_length=50, choices =
> (('rental_period', 'rental_period'), ('currency', 'currency')),
> unique=True)
> value = models.CharField(max_leng
On Feb 6, 7:01 am, Saurav wrote:
> Hi,
>
> I want to know if its possible to convert a string object into class
> object.
> Basically Im trying to make some generic methods for changing the data
> in the models
>
> For your convinience, Im providing you the link to the code where Im
> facing the
On Feb 8, 9:06 pm, Patricio Palma wrote:
> > This code looks exceptionally old, admin = meta.Admin() has been gone for
> > several years, what version of django are you workign with?
>
> 1.1 pre-alpha
> I 've in admin.py file, the main idea was show the list_display field
> setted
That's impossi
On Feb 9, 6:57 pm, "claudio.br...@googlemail.com"
wrote:
> Hi Alex
>
> Yes I have the line from django.contrib import admin" in urls.py
>
You're going to need to post the whole urls.py. It's a bit hard to
understand why you're getting that error if you do have that line, and
it's not commented o
On Feb 9, 6:13 pm, Dids wrote:
> Hi,
>
> I need to update the model.py file at run-time.
>
> Where can I find the file on disk from the views.py please?
>
> What I'm trying to do is : Open model.py , append a new class , invoke
> syncdb.
>
> Thx
> Dids,
This is extremely unlikely to work, not to
On Feb 9, 8:16 pm, kosuke wrote:
> I'm sure this will come across as basic to many django users but it
> has got me stuck so any helpful pointers would be appreciated. I've
> scoured the docs and come up empty. Upfront apologies done now,
> here's what I got:
>
> Using django forms, i create a
On Feb 9, 7:28 pm, phoebebright wrote:
> I have implemented this solution successfully with a standard model,
> but when I try to use it on one which is subclassed I get an error
> because it is trying to validate the model before it knows about the
> subclass. I can work around this by defining
On Feb 10, 5:03 am, Almost George
wrote:
> On the following example models (actual models, removed of cruft that
> doesn't seem to apply) I'd like to add a "get_upcoming_events" method
> to Band like the one on Venue, but because of the relationship I'm not
> sure how to use the API/filter. (An E
On Feb 10, 2:07 pm, Bobby Roberts wrote:
> Hi. I have the following template tag:
>
> @register.filter(name='elementtotext')
> @stringfilter
> def elementtotext(string):
> itext='Unknown'
> if string=='DR':
> itext='Door'
> if string=='FL':
> itext='Flooring'
> if
On Feb 10, 2:25 pm, Almost George
wrote:
> On Feb 10, 1:30 am, Daniel Roseman
> wrote:
> That doesn't seem to work. Here's my manage.py shell session, which
> appears as I expected it to: (hopefully email clients/google won't
> screw up the quoting, otherwi
On Feb 11, 3:20 pm, gbd wrote:
> Hello,
>
> I am presently working on my first Django project and seemed to be a
> little stuck concerning session variables and forms.
>
> This is how my app is laid out:
> - user logs in and is directed to a "you have successfully logged in"
> page
> - user is th
On Feb 11, 4:11 pm, gbd wrote:
> Another point (sorry I should have said this in my original post)
>
> My form is bound
> i.e. in my view
> form = RecipeForm(request.POST)
> I don't believe that I can use initial in this case?
>
> please let me know if I've misunderstood
>
> thanks again!
>
> On
On Feb 11, 6:53 pm, Kevin Audleman wrote:
> I have the same session. Django has been so slick so far I would
> imagine it has a way to access session variables from a template. Have
> you found the solution?
>
> Kevin
See the documentation for context processors - the 'request' one is
the what y
On Feb 13, 11:23 am, Alan wrote:
> Indeed, I have been looking
> athttp://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-th...
> used 'classes': ['collapse'] in my admin page to see how it works and
> I
> don't see any javascript there and I don't believe page is been reloaded.
You
On Feb 13, 4:45 pm, "bax...@gretschpages.com"
wrote:
> I need a YearField of sorts, where users can select a year (for their
> car), and I'm trying to figure out how best to implement it. I'd need
> roughly 1901 to present. I know I could just put them all in choices,
> but that seems messy and a
On Feb 14, 8:13 am, Evgeny wrote:
> I meant django form.
> Sure, I know about initial values in the constructors of fields, so I
> can set these values in "design-time" and get forms with some
> defaults.
> But what happens in my situation:
> -user clicks on the submit button of a form and sends
On Feb 14, 6:28 am, guptha wrote:
> hi ,
> In models.py i have
> class Customer(...)
> bill_no=models.CharFeild(...)
>
> All i need to access the field 'bill_no' and assign a value, In
> views.py i wrote
>
> from django.db.models.signals import post_save
> from mypro.myapp i
On Feb 15, 12:53 pm, DaSa wrote:
> Hi,
>
> Maybe this is a SQLite question, but a guess many Django users uses
> SQLite3.
>
> I have a lot of data that I want to export to my SQLite3 database. My
> problem is that the data contains special signs (swedish åäö) and
> therefore is it not possible to
On Feb 16, 4:23 pm, Ben Gerdemann wrote:
> Is it possible to add a custom template tag to the admin without
> modifying the Django source? I'd like to add a tag to display a
> different submit_line, but the only way I can figure out how to do
> this is by either adding one of the existing templat
On Feb 17, 9:16 am, "fuceck" wrote:
> hello,everybody,
> i have a problem with templatetags,I difine a template change_gender.py in my
> address app,
> but i meet with with problem:
>
> Could not load template library from django.templatetags.change_gender, No
> module named change_gender
>
>
On Feb 17, 2:01 pm, "euan.godd...@googlemail.com"
wrote:
> Why can't you change the dictionary? Can't you just create a copy of
> the dict and rename the keys in your copy using _ rather than - like
> so:
>
> >>> bad = {'var-1':'Apples', 'var-2':'Pears'}
> >>> good = dict()
> >>> for k,v in bad.
On Feb 19, 5:25 pm, Bobby Roberts wrote:
> Hi everyone.
>
> I have two models - one for "auctions" and one for "auction FAQs".
> AuctionFAQs has a foreignkey field tied to the ID from auctions. The
> result of the selection box in my admin AuctionFAQs model is as
> follows:
>
> name="Auction_Id
On Feb 20, 4:32 am, Eric wrote:
> Hi, I have an admin filter that filters all entries that have a
> particular foreign key. Specifically, this foreign key is a "Code"
> object that contains a "Code #" and a "Description".
>
> In the admin filter display, it shows all the codes I can filter by,
>
On Feb 20, 9:01 am, pete wrote:
> Hi Malcolm, thanks for the reply.
>
> I've tried it with the fields indented like so:
> http://dpaste.com/122916/
>
> I've commented out the browser choices and status fields etc to keep
> the amount of code down for the moment.
>
> I now get an error that assig
On Feb 20, 2:40 pm, pete wrote:
> Hi Daniel,
>
> This has got me closer but i'm now just getting an empty select box
> appearing on in the form, with no data in.
>
> class NewBugForm(forms.Form):
> assigned_to = forms.CharField(max_length=50,widget=forms.Select
> (choices=[]), initial='Anyone',
On Feb 21, 7:27 pm, 3xM <3...@detfalskested.dk> wrote:
> I've got 2 models:
>
>
> class Person(models.Model):
> ...
>
> class Project(models.Model):
> ...
> persons = models.ManyToManyField(Person)
>
>
> Now, how do I lookup Projects including person_a and person_b?
>
> I've
On Feb 22, 1:00 pm, "phyl.jack...@gmail.com"
wrote:
> I have a little custom script that changes some database stuff and
> sends an email - I want to set it to run on a cron job.
>
> So Ive been trying to set it up as a custom django-admin command, Ive
> been trying to use this little bit of info
On Feb 22, 4:53 pm, Brian wrote:
> My experience level: basic. I'm not a developer by trade and do it as
> a hobby. I'm pretty familiar with basic web development--HTML, CSS and
> js. I have explored PHP and other technologies to improve my
> development. Now I've started developing using Django+
On Feb 23, 7:19 pm, Kevin Audleman wrote:
> Hello,
>
> I am using the excellent django-profiles module provided by
> Ubernostrum which gives my site the following views:
>
> - list members
> - view member
> - edit member
>
> The module handles all of the views and urls so basically all I had to
>
On Feb 23, 10:00 pm, djandrow wrote:
> Hello,
>
> Each of the html pages on my site extends base.html but i'm trying to
> get a search box going which will appear on each page. So this will go
> on the base.html template. Since base.html is never called except
> through other templates. In what v
On Feb 23, 10:51 pm, djandrow wrote:
> Yea, the code that processes the search and returns the results.
> Does it not need to go in views.py? Could i just import it?
>
Import it where? Presumably, even though you have a search box on
every page, when you submit a search (no matter where from) yo
On Feb 24, 5:09 am, Margie wrote:
> Ok - I think I should actually be using initial - but still haven't
> gotten that to actually work. I'm trying something like this:
>
> In models.py
> class Book(models.Model):
> title = models.CharField(max_length=100)
> authors = models.ManyToManyF
On Feb 24, 1:19 pm, Brogno wrote:
> Dear djangonauts,
>
> I’m a newbie, a djangonoob ;) So, I have few little questions about
> Django’s template system. Just for you information, I get Django 1.0.2
>
> 1/ Using the i18n internationalization module, I would like to combine
> the translation with
On Feb 24, 2:36 pm, Tonu Mikk wrote:
> In my case I have the files already on the web server. The only thing
> that I need to do is to link to them from the database. When I try
> using the method above, I first read the file into memory like so
> (http://docs.djangoproject.com/en/dev/topics/fi
On Feb 25, 12:33 pm, wegi wrote:
> Hi all,
> I'm new to django, made my way through the tutorial and parts of the
> remaining documentation. But one thing remains unclear to me. Let's
> assume I have two apps news and links which just manage these type of
> objects. I have a view and a template f
On Feb 25, 2:23 pm, lzhshen wrote:
> Take a poll application for example.
>
> There is a "poll_result.html" template that will be used in different
> templates, such as latest_polls.html and hottest_polls.html.
>
> How can I achieve that?
> In "poll_result.html", can I add both " {% extends "late
On Feb 25, 2:41 pm, Paul Waldo wrote:
> Hi all,
>
> I am brand new to Django, so forgive me if my questions are naive :-)
>
> I have read the tutorials and I'm starting my first learning
> application. This is a small time-tracking application. As you can
> imagine, the majority of the applicat
On Feb 26, 3:41 am, seamusjr wrote:
> I am trying to modify the polls example from djangoproject.com to take
> a integer point value for each of the 1 thru 5 poll items instead of
> having a radio button where u select one. However, I am having
> problems with the views.py syntax. I changed the
On Feb 26, 5:10 pm, seamusjr wrote:
> Ok, I got rid of the pointx variables, replaced them with the
> following and restarted the server.
>
> selected_song_set.points = points
> selected_song_set.save()
>
> Here is the traceback:
>
> Environment:
>
> Request Method: POST
> Request URL:http://127.
On Feb 26, 7:10 pm, seamusjr wrote:
> > But what is points? Where is it coming from? As the traceback shows
> > you, you haven't set the points variable anywhere. Where are you
> > expecting it to come from?
> > --
> > DR.
>
> I want to iterate thru the points property of the Song object, from
>
On Feb 26, 8:12 pm, "uno...@gmail.com" wrote:
> I have the following model form:
>
> class EditProfileForm(ModelForm):
>
> class Meta:
> model = UserProfile
> exclude = ('user',)
>
> The corresponding model is:
>
> class UserProfile(models.Model):
>
> user = models.Foreign
On Feb 27, 12:37 pm, andrew wrote:
> Hi, all ,
>
> CODE:
>
> view.py
> -
> def user_login(request):
> if request.method == 'POST':
> form = UserLoginForm(request.POST) # get the form from POST
>
On Feb 27, 1:21 pm, Anders wrote:
> Hi.
>
> In the users admin of Django admin there is a nice way of selecting
> permissions for each user by adding and removing permissions from a
> list of available permissions. ()
>
> I have models set up similar to the ones used for users and
> permissions,
On Mar 1, 6:46 pm, koranthala wrote:
> Hi,
> This is my first Django/DB project, so pardon for the naivete of
> the question.
>
> I have one relation in my DB which I cannot - whatever I think of
> - seem to do it in a single DB check. Since I have around 5 other
> separate SQL statements
On Mar 1, 7:09 pm, "d...@tintophat.com" wrote:
> I'm just starting to get my head around inclusion tags and have hit a
> roadblock.
>
> How on earth do I include them into a Flatpage base template? I don't
> want to have to dig into the flatpage code to make ti work so has
> anyone got a nice met
On Mar 2, 10:41 am, Mattias wrote:
> Hi,
>
> I'm just learning Django, and had a question with my first site.
>
> To have a common layout for multiple pages (even those in different
> applications / python code folders) on the site, I'm using template
> inheritance.
> But the base template uses a
On Mar 3, 9:50 am, burcu hamamcıoğlu wrote:
> I wrote a query like : applications =
> Application.objects.filter(name__contains=searchText)
> I want to get the applications filtered by searchText. If the app. name is
> "Guitar" and my serachText is "guitar", django can't find it, makes the
> quer
On Mar 6, 10:37 am, gregor kling
wrote:
> Hello List,
>
> I have a form inheriting from ModelForm.
> class C(ModelForm):
>
>
> class Meta:
> model = SomeModel
>
> def clean_somefield:
> enhanced checks
>
> Now my problem is how to access session data (request.ses
On Mar 7, 4:27 pm, timlash wrote:
> I've read the doc several times but am still confused by the way
> Django references URLs. I'm running Python 2.4 and Django 1.0.2 on my
> Debian Etch box.
>
> My urls.py reads:
>
> from django.conf.urls.defaults import *
> from django.conf import settin
On Mar 7, 5:42 pm, Jamie Pittock wrote:
> Hi,
>
> I have an app with countries and counties. The simplified model is:
>
> class Country(models.Model):
> name = models.CharField(max_length=50)
> slug = models.SlugField()
>
> def __unicode__(self):
> return
On Mar 7, 8:21 pm, Jamie Pittock wrote:
> Thanks Daniel. Yeah it's just a way of getting the county so I'll try
> your second option. Could you possibly point me to the docs that
> explain the double underscore?
It's the standard syntax for lookups across relationships. See
http://docs.djangop
On Mar 7, 7:59 pm, timlash wrote:
> I see. Thanks.
>
> I've been using render_to_response() without difficulties. Under what
> conditions should I use reverse() vs. render_to_response()? Can they
> be used interchangeably?
>
> Thanks again,
>
> Tim
>
Eh? They do completely different jobs.
re
On Mar 7, 9:42 pm, Rex wrote:
> I'm reading the documentation on sessions (http://
> docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs) and
> saw the following example:
>
> def post_comment(request, new_comment):
> if request.session.get('has_commented', False):
> retur
On Mar 8, 3:50 pm, Christoph Wegscheider
wrote:
> Hi,
> I have the following model:
> class Message(models.Model):
> student = models.ForeignKey(Student, blank=True, null=True)
> message = models.CharField(max_length=200)
>
> I want to filter for:
> message_list = Message.objects.filter
On Mar 10, 12:54 pm, Dmitry Teslenko wrote:
> Hello!
>
> I'm starting with django framework; I use django 1.0 and sqlite
> database backend.
> I've stumbled upon this thing: when editing model entry with ModelForm
> I get insert instead of update.
>
> Here's view procedure:
> =
On Mar 10, 12:45 pm, nivhab wrote:
> Hi,
>
> I am trying to access a simple session attribute in the following way
> (this is inside a view function):
>
> def setSessionData(request):
> if not request.session.get('data_was_set', False):
> comLen=get_comment_count()
>
On Mar 10, 1:14 pm, Dmitry Teslenko wrote:
> On Tue, Mar 10, 2009 at 16:06, Daniel Roseman
> wrote:
> > How is the view getting the task_id parameter? Your form is always
> > posting to edit/, with no parameter, so there's no way it can pass the
> > task_id to the
On Mar 10, 7:50 pm, Adam Nelson wrote:
> http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#revers...
>
> I'm working with Reverse Generic Relations and I was wondering if
> there is a way to get the related objects for multiple objects in a
> simple way. For instance, based on the b
On Mar 16, 5:15 pm, NoviceSortOf wrote:
> I just want to say Hello Mary in my HTML code pulling Mary's username
> from the request.data.
>
> I've dug through the documentation and through this group, but am
> still baffled by
> what seems the inability of Django to allow someone to display a valu
On Mar 16, 5:16 pm, TP wrote:
> Unfortunately the website doesnt work, just get a blank web page.
>
> Im working from a University computer so im guessing it may be due to
> that problem as I have no other programs running apart from Firefox
>
So use a different port number - eg
./manage.py run
On Mar 19, 1:22 pm, Thomas Guettler wrote:
> Hi,
>
> I know that you can pass the request object to form like this:
>
> class MyForm(forms.Form):
> def __init__(self, request, *args, **kwargs):
> self.request=request
> forms.Form.__init__(self, *args, **kwargs)
>
> Somehow I a
On Mar 19, 3:35 pm, Jesse wrote:
> My concern is that each view has 87 lines of duplicate code from the
> "GET" data to get the appended list (shown here as: data retrieved to
> create a list .list.append(publications)). Anytime I make a
> change in one view I have to remember to make the ch
On Mar 19, 8:20 pm, adrian wrote:
> The doc gives this example for querying an Entry model which has a
> foreign key field to a Blog model.
>
> e = Entry.objects.get(id=2)
> e.blog = some_blog
>
> Fine. Now if I do it in a loop like this:
>
> e = Entry.objects.all()
> for entry in e:
> entry
On Mar 20, 7:34 pm, YuDe wrote:
> Hi,
> I have been browsing the documentation, but I could not find obvious
> link to instructions of uploading the file that created through
> tutorials.
>
> I have a server and use winSCP to upload htmls. Is there a page that
> instruct us how to publish webpage
On Mar 22, 8:20 am, nivhab wrote:
> Hi,
>
> I have this problem which is probably right in front of my eyes but I
> just cannot get it. Maybe someone can point me in the right direction:
>
> I am trying to iterate through form.fields in a template.
> The form is rather simple:
>
> class ProductFo
On Mar 22, 3:04 pm, Roy wrote:
> Hi,
>
> Is there a way to include additional JavaScript in the admin page for
> a particular model? I don't want to touch the model code though.
>
> The particular scenario is I want to change the flatpage edit screen
> in the admin to use a rich-text editor (NicE
On Mar 22, 4:15 pm, Roy wrote:
> That would require the extra files be hosted on my media url though. I
> want to be able to link js externally so I can use stuff like YUI,
> etc. without having to host it.
Not at all - if you pass in an absolute path, it is left alone. See:
http://docs.djangopr
On Mar 24, 2:25 pm, SamuelXiao wrote:
> I am writing a simple application which takes parameter from the url
> and simply put it to another python app and open it. If it is
> successful, a content of the author's blog post will be returned.
> The following is my code:
> --This one work
On Mar 24, 3:42 pm, Keyton Weissinger wrote:
> I'm using the extra_context dictionary passed into the view like many
> folks (James Bennett among them) seem to recommend either directly or
> via his projects.
>
> Here is what a view might look like (all of this is on dpaste with
> link below if y
On Jun 21, 1:38 pm, tekion wrote:
> Hi,
> I am getting the below error:
> ViewDoesNotExist at /polls/
>
> Could not import play_django.polls.views. Error was: No module named
> unresolvers
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/polls/
> Exception Type: Vie
On Jun 23, 4:08 pm, kiwi wrote:
> Hi, I've a problem with CSS of admin panel of Django when I deploy my
> web application on Apache2. Everything works, only Css of admin's
> panel do not works correctely... Someone can help me?
>
> Thanks
>
> Alias /media_admin/ /home/utente/www/python/sds/medi
On Jun 24, 12:40 am, saxon75 wrote:
> I'm having a strange problem with my site wherein a ModelForm doesn't
> appear to recognize that it has an attribute that it ought to. I
> should preface this by saying that I recently moved my codebase to a
> new server--everything had been working fine on
On Jun 24, 6:45 am, Oleg Oltar wrote:
> Hi!
>
> I am writing a small application for user profile management.
>
> I need to display and to process output from 2 form on the page of own
> profile. How can I do it?
>
> 1. Form if to change avatar. (Contains browse and upload buttons)
> 2. Form is f
On Jun 15, 4:54 am, Oleg Oltar wrote:
> Hi!
>
>
> {{ form.as_p }}
>
>
>
> After trying this code in browser I am getting a text field with
> browse button, so when I chose file to upload, and finally click
> upload I am getting 404 Error.
> Not sure what I might doing wrong.
> Please hel
On Jun 24, 3:53 pm, Francisco Rivas wrote:
> Hi everyone in both lists.
>
> I created a XSL template and I want to apply it to an XML data (or file)
> which I get from a django view, I mean, I have this snippet in my
> views.pyhttp://dpaste.com/59193/and I have this another snippet to apply an
On Jun 24, 6:26 pm, paultanner wrote:
> As you can see from this I am just learning django.
> I am trying to list contacts and their related organisations. This
> does list the contact names.
> No errors are raised but fields from Organisations do not show with
> this view and template.
> I gues
On Jun 25, 1:24 pm, steveneo wrote:
> I try to use Django in a new project. Honestly, it is very bad
> experience. It looks not boosting my development speed. Today, I
> almost give up and begin to look up another Python framework
>
> One question, does anyone use a hiddenInput in Form? Som
On Jun 25, 2:45 pm, Gil Sousa wrote:
> Hi!
>
> I searched on documentation but I didn't see anything related with
> managing users' groups, I want to do something like a "staff page" and
> for that I need to get a list of groups, I need to get the NAME of
> each group and I need to get the list o
On Jun 25, 6:52 pm, "Daniele Procida"
wrote:
> I created a simple_tag:
>
> def news_for_this_page(page):
> if page.entity_set.all(): # check page belongs to an entity first
> e = page.entity_set.all()[0] # first entity will be only one
> newslist = []
> for item in e.n
On Jun 28, 4:23 pm, Jan-Herbert Damm wrote:
> Hello,
>
> Learning Python and Django, i am walking through the tutorials that reside in
> [...]/django-trunk/docs/intro/. Coming across lines like:
>
> " :ref:`topics-settings` will tell you all about how settings work."
> ^
> m
On Jun 29, 4:57 am, Sam Walters wrote:
> Hi
> I am using django 1.0 to redevelop a website.
> I have readhttp://docs.djangoproject.com/en/1.0/topics/db/queries/and cant
> work out how to do my query except using raw sql. It would be great to be
> able to use the django query api so i can stack qu
On Jun 29, 4:40 am, Steve Hershman wrote:
> Introduction:
> Hi Everyone,
> Django is awesome and I hear you're all really helpful. I'm looking
> forward to joining this group.
>
> Real message:
>
> So I'm developing a site with a few friends. We do not have a
> dedicated server and
On Jun 29, 9:23 am, alecs wrote:
> Hi! If I have some html file somewhere (i.e. /var/file), how to
> redirect user to it? It is not a template and not in a template
> folder. Thanks :)
It needs to be somewhere the webserver can see it. Ideally you'd put
in the same place as the rest of your stat
On Jun 29, 12:33 pm, atik wrote:
> I am working on a simple django project. I have tried to link the css
> file, but it's not working. If i run the html template directly, then
> it's ok. but if i run the server, then its not working. What to do?
Read the documentation:
http://docs.djangoproject
On Jun 29, 11:25 am, Sam Walters wrote:
> Hi Daniel
> Thank you very much for your help.
> The reasons why the foreign key is in the other table is because an event
> can have multiple locations, its unusual however the Aviation industry has
> an event which will fly from location A to B. Yes it
On Jul 1, 8:59 pm, Rajesh D wrote:
> On Jul 1, 9:50 am, Mathieu Leplatre wrote:
> > On 1 juil, 14:44, coan wrote:
>
> > > I have a friendship model for users and want to retrieve all the posts
> > > my friends made.
>
> > > class Friendship(models.Model):
> > > from_friend = models.ForeignKey(
On Jul 2, 8:25 am, Harsha Reddy wrote:
> I using Django from past one week.
>
> On the Django web site, I read that it is a high-level python web
> framework. Inspite of knowing this I am trying to use a Django
> application both as a web application as well as a CLI client.
>
> To know if this w
On Jul 2, 8:26 am, NC wrote:
> I am trying to create a customer database app and the model is as
> follows..
>
> # Create your models here.
>
> class Customer(models.Model):
> name = models.CharField(max_length=40)
> address = models.CharField(max_length=100)
> city = mode
On Jul 2, 3:20 pm, The Danny Bos wrote:
> Daniel,
>
> {% for author in review.item.author_set.all %}
> Is what I've been using.
>
Aargh, copy and paste fail. Should have been
{% for author in review.item.authors.all %}
--
DR.
--~--~-~--~~~---~--~~
You received this
On Jul 2, 2:55 pm, The Danny Bos wrote:
> K, I think I have it.
>
> Just having trouble getting the Author loop from within my Review
> set.
> Here's what I have below, I figured this was pretty close but I'm
> wrong aren't I?
>
> {% for review in reviews_full %}
> {{ revi
On Jul 2, 7:55 pm, Andrew Fong wrote:
> How exactly should I handle a HEAD request in Django?
>
> So ... assuming my view looks like this...
>
> def handle_request(request):
> if request.method == 'POST': return do_post(request)
> elif request.method == 'GET': return do_get(request)
>
On Jul 3, 8:38 am, Geoff wrote:
> Dear Django users,
>
> I am writing my first Django application (also new to Python and have
> not done any web programming for many years) and am trying to produce
> a screen which allows a row to be added to a table (I know this can be
> done in admin but once
On Jul 4, 1:27 pm, Damon Timm wrote:
> Hello everyone -
>
> I wondered if anyone had insight on a Model for site-wide "global"
> options. I am thinking of a place to store: site title, site meta,
> site description, specific global links (twitter, facebook, etc),
> support contact email, etc ...
On Jul 4, 8:42 pm, Carlos Eduardo Sotelo Pinto
wrote:
> Hi people... I have this traceback error and i am something lost, thanks
>
> Exception Type: AttributeError at /support/helping/product/1/1
> Exception Value: type object 'ProductModel' has no attribute 'id'
>
> #model
> class ProductM
On Jul 7, 7:45 am, alecs wrote:
> I'm trying to send a e-mail, but getting this error. Don't know what
> to do... Any ideas?
> Thanks in advance.
>
> def urlsend(request, username):
> if request.method == 'POST':
> form = SendMailForm(request.POST)
> if form.is_valid():
>
On Jul 7, 3:10 pm, Joshua Partogi wrote:
> Dear all,
>
> Because I want to plug a django app from urls.py as it is (without adding
> any suffix), is it possible to include the app urls with this scenario?
>
> # urls.py
> urlpatterns = patterns('',
> (r'^$', include('djapp.urls')),
> )
>
Leav
On Jul 9, 8:47 am, "paul.dorman" wrote:
> Hi all,
>
> I'd like to include blocks of content in my templates which is
> editable in the Admin app. I'd design the overall template, but
> include bits that the computer illiterate folks here could change,
> something like this:
>
> [my template]
>
>
301 - 400 of 2396 matches
Mail list logo