The new form that I'm trying to make is the one with the variable: form, I
forgot to mention that
On Friday, January 25, 2019 at 10:08:03 AM UTC-5, Arturo Fernandez wrote:
>
> Hello, I'm trying to make a simple form so I can dissect it and learn but
> from the guide that I'm reading, they are
Hello, I'm trying to make a simple form so I can dissect it and learn but
from the guide that I'm reading, they are doing it differently from what
I'm trying to accomplish. This are the two links:
model.py: https://tutorial.djangogirls.org/en/django_models/
view.py, forms.py:
Le 2018-02-15 à 01:17, Tom Tanner a écrit :
I'm working on a Django-powered subscription website with a
Django-powered CMS backend. Can the User model, or a derived class, be
made to be compatible with this idea? In my case, I want to store a
user's username, password, and subscription ID.
I'm working on a Django-powered subscription website with a Django-powered
CMS backend. Can the User model, or a derived class, be made to be
compatible with this idea? In my case, I want to store a user's username,
password, and subscription ID.
--
You received this message because you are
Hi, Michael--
On Sun, Aug 31, 2014 at 10:28 PM, Michael Carey wrote:
> That is assuming that you just upload the files?
Your doubt is justified. Just uploading the files is a bit of an
oversimplification. It would help if you gave some specifics about the
directory structure
On Mon, Sep 1, 2014 at 9:56 AM, Michael Carey wrote:
> ). I cannot work out which files to upload to my website to veiw the page?
Do you mean to deploy on production server?
--
Kamaljeet Kaur
--
You received this message because you are subscribed to the Google Groups
That is assuming that you just upload the files?
On Monday, 1 September 2014 14:26:07 UTC+10, Michael Carey wrote:
>
> I have created an app, and it works on the test server (port 8000). I
> cannot work out which files to upload to my website to veiw the page?
>
> Thank you,
>
> Michael Carey
>
I have created an app, and it works on the test server (port 8000). I
cannot work out which files to upload to my website to veiw the page?
Thank you,
Michael Carey
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
Thanks guys for all replies, an especial thanks to Kurtis, I followed all
your tips and my code looks very clean and objective, agree to leave the
underscore from classes name! Although I really appreciate hungarian
notation, without them my vars is so much objective! :)
Cheers
On Thu, Aug 2,
as Kurtis says, drop the explicit Primary Keys, and drop the hungarian
notation as well (don't declare the variable type on it's name): I
don't need to be reminded that the name of a project will be a string,
it's pretty obvious. Also, python standards talk against using
underscore in class names,
Syntax looks good -- but I didn't look at it too closely or try to execute
it. Run it and see if it complains :) (python manage.py sqlall)
I would recommend dropping your explicit primary keys. These are generated
automatically by Django.
On Thu, Aug 2, 2012 at 10:27 AM, Demian Brecht
What, exactly are you confused about? What is your question?
2012/8/2 Robert
> Hi all, I´ve developed that model, but i´m quite confused about the
> sintax, looks a bit freaky... Hers my code:
>
> from django.db import models
>
> ##
>
Hi all, I´ve developed that model, but i´m quite confused about the sintax,
looks a bit freaky... Hers my code:
from django.db import models
##
PROJETOS
##
class
I forgot to address the issue of your LeagueTable, which appears to be
a way to keep track of standings. It looks like what you're really
doing is trying to keep track of matches won and lost, points earned,
etc i.e., the standings of a league.
One way to do this is with a Match model:
class
Without knowing your problem domain, you might want to start off with:
class League(models.Model):
name = models.CharField(max_length=200)
class Team(models.Model):
name = models.CharField(max_length=200)
league = models.ForeignKey(League)
Generally you don't want a model with a
this is my models.py
from django.db import models
# Create your models here.
class Leagues(models.Model):
LeagueName = models.CharField(max_length=200)
class Team(models.Model):
TeamName = models.CharField(max_length=200)
class LeagueTable(models.Model):
league =
Both answers are VERY helpful, and point out how unhelpful my original
question was stated.
Karen, I admit to being a knucklehead. Thanks for reminding me :-)
Shamail Tayyab, I'm not running via command line, using manage.py.
I've created my own script, following instructions found in the docs
You may want to try running your fastcgi daemon via command line,
This is the exact command that I am using at production:
python manage.py runfcgi daemonize=false method=threaded
host=127.0.0.1 port=9001
Tx
--
Shamail Tayyab
Blog: http://shamail.in/blog
On Dec 22, 6:52 pm, Richard Brosnahan
On Wed, Dec 22, 2010 at 8:52 AM, Richard Brosnahan wrote:
> The .fcgi script runs until I get to the line where I try to execute
> runfastcgi.
>
> from django.core.servers.fastcgi import runfastcgi
> runfastcgi(method="threaded", daemonize="false")
>
> [snip]
>
> I get an error
Hi all,
I'm new to django but not new to Python. My goal is to build a web site using
django, replacing an old, tired php framework.
The django 1.2.3 tutorials were fine. I got the basics of my site working
locally, after going thru the entire tutorial. Before going any further, I
wanted to
Swapping out the get_object_or_404 mess with the select_related method
works in some sense in that my executive detail pages show up properly
but the template is still ignoring the information from the nonprofit
class.
I'm expecting that a click on that href would result in /nonprofit/1
but
For that you could use the method select_related, if you want the details
page has executives related to the nonprofit:
e = Executive.objects.select_related().get(pk=id)
Thus, there is a performance gain, it does not require database queries.
2010/12/21 Matt
> I have
I have two classes in my model: nonprofit and executive. It's a one-to-
many relationship, multiple executives for each nonprofit.
I created an index page that displays all executives and all
nonprofits. I've created detail pages for nonprofit and executive.
But when I try to link back to a
Thanks, I indeed did not run my manage.py file.
On Oct 9, 5:35 am, Andi Trînculescu wrote:
> You probably didn't run manage.py runserver.
> You also need to install your app in settings.py
>
> On Oct 9, 12:50 am, lyrical wrote:
>
> > I'm following the
it looks like your dev server isn't running.
On Oct 9, 12:50 am, lyrical wrote:
> I'm following the Django book but run into a pathing problem (I think)
> I did exactly what the book said, even copying and pasting the code as
> to make sure I didn't make a typo.
>
> so
You probably didn't run manage.py runserver.
You also need to install your app in settings.py
On Oct 9, 12:50 am, lyrical wrote:
> I'm following the Django book but run into a pathing problem (I think)
> I did exactly what the book said, even copying and pasting the
I'm following the Django book but run into a pathing problem (I think)
I did exactly what the book said, even copying and pasting the code as
to make sure I didn't make a typo.
so in the views.py I have
from django.http import HttpResponse
def hello(request):
return HttpResponse("Hello world")
3. If you're running under Apache rather than the deveolpment server, did
you restart apache? (The development server restarts the app when
you change the code, but the apache - mod_wsgi or apache - mod_python
scheme does not, and you are still running the old code.)
On Fri, Apr 2, 2010 at 1:30
1. Refresh your browser cache.
2. Make sure you're executing the right code. Have you tried to put a
breakpoint?
import pdb; pdb.set_trace()
2010/4/2 Pablo Cubico :
> Hi Guys!
>
> I'm new to Django AND Python, but I do have a long experience in
> configuring Apache, and
Hi Guys!
I'm new to Django AND Python, but I do have a long experience in
configuring Apache, and PHP programming.
Now, I was testing this simple view:
---
def get_value(request):
return HttpResponse(3)
---
It worked, it printed "3", everything ok.
Now I changed
Many thanks for the help rebus_ and Daniel! All of your suggestions,
code samples, and links have been extremely helpful.
I appreciate it.
Have a great day!
Cheers,
Micky
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
On Feb 16, 2:12 am, mhulse wrote:
> > You could do it like this. There was a discussion recently about mod
> > operator and what happens when you want to do something every N times
> > but can't find it now for some reason :(
>
> Ah, interesting! Thanks for the code sample, I
> You could do it like this. There was a discussion recently about mod
> operator and what happens when you want to do something every N times
> but can't find it now for some reason :(
Ah, interesting! Thanks for the code sample, I really appreciate your
assistance.
I will search around for the
On 16 February 2010 02:58, mhulse wrote:
>> Hrmm, forloop.counter. It is one of those days. :P
>
> But, how can I tell if it is every third item?
>
> Also, is there a way to check if the current number is even?
>
> In a PHP template, I might do this:
>
> ... forloop ...
>
>
On 16 February 2010 02:58, mhulse wrote:
>> Hrmm, forloop.counter. It is one of those days. :P
>
> But, how can I tell if it is every third item?
>
> Also, is there a way to check if the current number is even?
>
> In a PHP template, I might do this:
>
> ... forloop ...
>
>
> Check out "cycle" template tag too.
> http://docs.djangoproject.com/en/dev/ref/templates/builtins/#cycle
Thanks rebus_! I have played with that just a little bit. I will
explore it further.
Cheers,
Micky
--
You received this message because you are subscribed to the Google Groups
"Django
> Hrmm, forloop.counter. It is one of those days. :P
But, how can I tell if it is every third item?
Also, is there a way to check if the current number is even?
In a PHP template, I might do this:
... forloop ...
... endforloop ...
Sorry if silly question.
Thanks!
M
--
You received this
On 16 February 2010 02:52, mhulse wrote:
>> Is this possible? I am sure it is... Any tips ya'll could send my way
>> would be spectacular!
>
> Hrmm, forloop.counter. It is one of those days. :P
>
> --
> You received this message because you are subscribed to the Google Groups
> Is this possible? I am sure it is... Any tips ya'll could send my way
> would be spectacular!
Hrmm, forloop.counter. It is one of those days. :P
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hi,
In my template:
{% for photo in photos %}
stuff
{% endfor %}
Is this possible? I am sure it is... Any tips ya'll could send my way
would be spectacular!
Thanks!
Micky
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
On Jan 5, 10:02 pm, Sheol wrote:
> Suppose I have a set of small applications.
> I want these on a side panel.
> Then I have the main area that is a blogging application.
> What is the proper way to place all these applications on the same
> page?
>
> A new app for the
Suppose I have a set of small applications.
I want these on a side panel.
Then I have the main area that is a blogging application.
What is the proper way to place all these applications on the same
page?
A new app for the page that imports the other apps?
A set of template variables?
--
You
Star! Thanks for that, I'd tried doing it and failed - but wasn't sure
where it was going wrong.
Have done it now and am moving onwards.
Cheers
On Aug 10, 11:17 am, nostradamnit wrote:
> It means you remove the line that says admin.site.register(Choice), as
> the
It means you remove the line that says admin.site.register(Choice), as
the choices will be integrated in the Poll admin page now.
On Aug 10, 11:28 am, egrommet wrote:
> I've just
> reachedhttp://docs.djangoproject.com/en/1.0/intro/tutorial02/#adding-related...
> in the
I've just reached
http://docs.djangoproject.com/en/1.0/intro/tutorial02/#adding-related-objects
in the tutorial and am trying then to follow on.
I've hit the par "Remove the register() call for the Choice model.
Then, edit the Poll registration code to read:
class
On Fri, 2009-04-03 at 09:35 +0100, Mic Pringle wrote:
> Hi,
>
> I've been googling this for a while but can't seem to find any
> relevant information.
>
> Is it possible to utilise the admin interface without requiring
> authorisation ? Is it as simple as not including the authorisation
>
Hi,
I've been googling this for a while but can't seem to find any
relevant information.
Is it possible to utilise the admin interface without requiring
authorisation ? Is it as simple as not including the authorisation
module in my installed apps, or is there a bit more to it than that ?
What
Thanks everyone for your answers. Lots to learn here, but sure is fun!
On Sep 10, 1:03 pm, AmanKow <[EMAIL PROTECTED]> wrote:
> > Summary : You could simply copy the file base_site.html from admin
> > templates to a directory called "admin" in your own template directory
> > and add a link to
> Summary : You could simply copy the file base_site.html from admin
> templates to a directory called "admin" in your own template directory
> and add a link to your own pages in {% block branding %} so you would
> have access to the link on every admin page.
Actually, there is an empty block
Hi Daniel.
I think this is way more complex than what I want.
I have a main page (e..g. the default page in my web root). It is
really just a title page with several links, one of which is to my
admin site to add/update objects. I just want a straight link back on
the admin page to the page in
On Sep 9, 8:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote:
> Can anyone tell me a easy way to add a hyperlink from the
> main admin page to somewhere else outside the admin app.
You should probably read :
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
Summary
On Sep 9, 7:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote:
> Hi all, starting to think there is so much stuff in django and python
> that I will never learn it all. I am building a site that used the
> admin piece for most of the CRUD and a few other pages for the rest of
> my requirements. I
Hi all, starting to think there is so much stuff in django and python
that I will never learn it all. I am building a site that used the
admin piece for most of the CRUD and a few other pages for the rest of
my requirements. I link to the admin from my main app page, and would
like to be able to
Hi guys,
I wrote simple object edit forms at this time, but now i have to add a
"related" object to an another, let's say add Album to existing Artist.
Inserting new Album to existing Artist and editing existing Album requires
two forms or can be just one?
Is there any example somewhere?
Thank you
Gotta say - a week into this project - I am loving Django.
Wrote a small custom filter:
@register.filter ("fromdatetuple")
def fromdatetuple(value):
return datetime.datetime.fromtimestamp(time.mktime(value))
fromdatetuple.is_safe = True
And added this to the template:
{{
James thanks. I have been reviewing the Python docs but there are too
many moving parts for me at this point. I assume this can be
accomplished within the feeds.py module fairly simply but I am just
beginning to learn the code. I will give it a shot once I have a bit
more experience with it.
On Dec 23, 2007 11:06 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Using modified_parsed gave me this date (2007, 12, 21, 21, 22, 49, 4,
> 355, 0) but threw an error when applying a filter: AttributeError
> at / 'time.struct_time' object has no attribute 'year'
>
> I think I am just not
James -
Thanks, I had worked through the date_parsed items - but was getting
the same error. Maybe I was missing some other piece at that point. i
will give it another shot.
Using modified_parsed gave me this date (2007, 12, 21, 21, 22, 49, 4,
355, 0) but threw an error when applying a filter:
On Dec 23, 2007 10:19 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> That all works - (renders as Fri, 21 Dec 2007 21:22:49 + ) but I
> can not apply any Django time filters (date, timesince, naturalday) to
> the {{entry.date }} variable. I would guess it is not recognizing the
> date as
I am using template_utils.feeds to parse and import feeds.
On the template it looks like this:
{% endcache %}
{% cache 5 sample_feed %}
Feed
{% parse_feed "http://example.com/feed.rss; as sample_feed %}
{% for entry in sample_feed.entries %}
{{ entry.title}}
{{ entry.date }}
{% endfor %}
VMware seems to be a good idea - but I'll probably install win2k again
from Ubuntu as main system ;-) My win-machine has gotten so bloated
and slow that it is anyways time for a new installation. That's the
reason why I wanted a new system at all.
Arch also looks lean and fast, but the docs for
I third it... except for the fact that this is a newby asking. Given that
fact I'd have to say (k)ubuntu. Personally I love Arch!!
Ben
On 12/12/2007, Aspersieman <[EMAIL PROTECTED]> wrote:
>
>
> Lic. José M. Rodriguez Bacallao wrote:
> > I will recommend Arch, is simple and powerful.
> >
> > On
Lic. José M. Rodriguez Bacallao wrote:
> I will recommend Arch, is simple and powerful.
>
> On Dec 11, 2007 1:22 PM, Joe <[EMAIL PROTECTED]> wrote:
>
>> To make things easy, you could download VMware Server - run that on
>> your windows box and install the prebuilt appliances. That'd make it
I will recommend Arch, is simple and powerful.
On Dec 11, 2007 1:22 PM, Joe <[EMAIL PROTECTED]> wrote:
>
> To make things easy, you could download VMware Server - run that on
> your windows box and install the prebuilt appliances. That'd make it
> easy to try out a few linux versions. VMware is
To make things easy, you could download VMware Server - run that on
your windows box and install the prebuilt appliances. That'd make it
easy to try out a few linux versions. VMware is free as are the
appliances.
I use ubuntu primarily.
j
On Dec 9, 9:57 am, Andreas Pfrengle <[EMAIL PROTECTED]>
Go for Ubuntu.
RS
On Dec 11, 5:48 pm, Andreas Pfrengle <[EMAIL PROTECTED]> wrote:
> Thanks for so many replies and the helpful links. Ubuntu really seems
> to be a good solution as far as I can tell by now. I'll give it a try.
> At least now I know what I will do on Christmas :-)
Thanks for so many replies and the helpful links. Ubuntu really seems
to be a good solution as far as I can tell by now. I'll give it a try.
At least now I know what I will do on Christmas :-)
--~--~-~--~~~---~--~~
You received this message because you are
A little over a year ago, I was in your shoes. Microsoft just didn't
do it for me anymore, and I wasn't sure where to turn. A lot of people
here are recommending Ubuntu, but as an individual that was not too
long ago in your situation, and has quickly developed a decent
knowledge of Linux server
I'd strongly recommend Ubuntu. It's got the power and flexibility of
Debian with ease-of-use that is absolutely outstanding. It's a stable
server product, and performs very well on the desktop as well.
On Dec 9, 9:57 am, Andreas Pfrengle <[EMAIL PROTECTED]> wrote:
> Hello,
>
> till now I've been
On 09-Dec-07, at 8:27 PM, Andreas Pfrengle wrote:
> But since I haven't any experience with Linux yet, I want to choose a
> distribution that is best suited for someone coming from the Windows-
> world AND suited to establish a Django development environment.
mandriva
--
regards
kg
> But since I haven't any experience with Linux yet, I want to choose a
> distribution that is best suited for someone coming from the Windows-
> world AND suited to establish a Django development environment.
As far as I know Fedora, Ubuntu and Suse have LiveCD .
I suggest to download ISO, burn
If you decide to use Ubuntu, here's a link to how to set it up for
developing Django using PyDev on Eclipse. The steps have been tested
by several high school students, so they're fairly straightforward.
(That doesn't mean you won't find a problem, however.)
IMO the differences between the distributions out there shouldn't
really matter when it comes to GNU/Linux as a development environment.
You should always have the option to install whatever you want from
source. You might face some problems with some distros that use for
example very old version
Since Python's a OS dependless language, and Django's based on Python,
so every popular Linux distro's suitable for Django developement.
Acctually I'm using RHEL, Fedora, Ubuntu as Django development
environment, or you may want to check http://distrowatch.com/ .
hutuworm
On Dec 9, 10:57 pm,
Hello,
till now I've been experimenting with Django (development version)
under Win2k. But Windows sucks. So I dare to make my first steps with
Linux. Most of you will surely say I won't regret this decision ;-).
But since I haven't any experience with Linux yet, I want to choose a
distribution
On 16-Nov-07, at 11:14 AM, bdixon wrote:
> t = loader.get_template(template_name) # You need to create a
> 500.html template.
it is not mac specific, look at the line above
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
You need to create your own 500.html template. It may not be listed
in the install/setup but it is mentioned in the full docs:
http://www.djangoproject.com/documentation/0.96/request_response/#the-500-server-error-view
If you're just starting out, though, I'd recommend getting up and
running
Sorry for what is probably a pretty basic issue but after installing
Django (.96.1) on my MacBook Pro I am getting an odd error that is
telling me that template 500.html is not available. There's nothing
in the documentation (for installation / setup) on this so I have a
feeling that it may be a
On 10/9/07, coffeeho <[EMAIL PROTECTED]> wrote:
> As a CharField, there's no problem. When I changed it to get the
> sexier ManyToManyField it got weird. The tags appear and transfer
> between fields (in admin view) and save in the link like they should,
> but they do not appear in the tagging
I'm using version 0.96.
On Oct 9, 8:55 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 10-Oct-07, at 7:15 AM, coffeeho wrote:
>
> > I'm trying to implement the django-tagging app. My "links" app has a
> > tags field.
>
> could you clarify which version of django you are using
>
> --
>
>
On 10-Oct-07, at 7:15 AM, coffeeho wrote:
> I'm trying to implement the django-tagging app. My "links" app has a
> tags field.
could you clarify which version of django you are using
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Greetings (please forgive me - I'm well past my coffee buzz)
I'm trying to implement the django-tagging app. My "links" app has a
tags field.
As a CharField, there's no problem. When I changed it to get the
sexier ManyToManyField it got weird. The tags appear and transfer
between fields (in
OK, this works great!
Thank you very much!!!
On 4 Mag, 04:34, theju <[EMAIL PROTECTED]> wrote:
> Since Javascript is a static file you have to define your js directory
> in your urls.py. I've used a lot of Javascript Libraries and all have
> worked successfully.
>
> First in urls.py
>
>
Since Javascript is a static file you have to define your js directory
in your urls.py. I've used a lot of Javascript Libraries and all have
worked successfully.
First in urls.py
(r'^js/(?P.*)$', 'django.views.static.serve', {'document_root':
'/media/agora/js/lib/MochiKit/'}),
And then in your
Ok, i'm really sorry to bug you with this noobish question... but i
can't get out this mess alone.
I'm coming from php and i'm still learning Django and Python.
So, my problem is the following.
I've got a simple app called "agora" (which is a simple blog) and all
works great! but now I'm trying
On 5 Jun 2006, at 6:58 am, James Bennett wrote:
>
> On 6/4/06, David Robinson <[EMAIL PROTECTED]> wrote:
>> Really, I've tried looking this one up myself (you wouldn't
>> believe how
>> many questions I *haven't* had to ask... (thanks for well-written
>> docs
>> everyone)). It seems almost
Really, I've tried looking this one up myself (you wouldn't believe how
many questions I *haven't* had to ask... (thanks for well-written docs
everyone)). It seems almost obvious, but I am proving to be just dense
enough to not get what is this "kwarg".
Dave
2006/1/4, EricHsu <[EMAIL PROTECTED]>:
>
> Guys, I created the range0 (0-index) and range1 (1-index filter
>
> $ svn diff defaultfilters.py
> Index: defaultfilters.py
> ===
> --- defaultfilters.py (revision 1813)
> +++
Guys, I created the range0 (0-index) and range1 (1-index filter
$ svn diff defaultfilters.py
Index: defaultfilters.py
===
--- defaultfilters.py (revision 1813)
+++ defaultfilters.py (working copy)
@@ -433,6 +433,14 @@
from
2006/1/4, EricHsu <[EMAIL PROTECTED]>:
>
> guys, I did it by hacking into django's list_detail.py
>
> just add a simply line here:
>
> $ svn diff list_detail.py
> Index: list_detail.py
> ===
> --- list_detail.py (revision 1813)
>
Hi limodou, could you pls be more specific? Thanks!
2006/1/4, EricHsu <[EMAIL PROTECTED]>:
>
> the python way
>
> {% for page_number in range(pages) %}
>
> doesn't work either... :'(
>
>
May be you should use forloop.counter for that.
--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit
I wanted to do this and more and ended up tinkering with
ObjectPaginator directly. It's a bit ugly at the moment, but I plan
to give the code back if it's wanted.
Ben
On 4 Jan 2006, at 5:33, EricHsu wrote:
hi all,
Here is a nOOb question:
I'm using the paginate function, I got
93 matches
Mail list logo