Denis Darii already answered this on February 1st:
"You can redefine your database connection by adding somewhere at the end
of your settings.py something like:
import sys
if 'test' in sys.argv:
DATABASES = ...
hope this helps."
Did you try this?
On Wed, Feb 8, 2012 at 7:19 AM, xina tow
, but django makes a new testDatabase and that's my problem, I want
> django to use a database I've previously done.
>
>
> On 8 February 2012 16:34, Mark Furbee wrote:
>
>> Denis Darii already answered this on February 1st:
>>
>> "You can redefine
As alluded to previously, the most "straightforward way to use a set of
choices of which several can be chosen" IS to use a ManyToManyField. The
syntax is slightly different, but ManyToManyFields are really easy to use
with Django. Do not reinvent the wheel in this case.
Thanks,
Mark F
Good Morning Tabitha.
Actually, do you have a model for StaffForm? That is the object being
instantiated and then causing the error. If there is no nics group
reference field in the StaffForm object, it may raise this error. Also, do
you have this running in a view/template? Do you have a real pag
It means, don't use the "decorator" @login_required above your login view.
Your login view cannot require a login, because you'd never get to log in.
Chicken and egg.
On Tue, Jan 17, 2012 at 2:34 PM, coded kid wrote:
>
>
> Thorsten Sanders wrote:
> > With using
> >
> > @login_required decorator
working! Any help?
>
> On Jan 17, 10:37 pm, Mark Furbee wrote:
> > It means, don't use the "decorator" @login_required above your login
> view.
> > Your login view cannot require a login, because you'd never get to log
> in.
> > Chicken and egg.
gged
out successfully.'}, context_instance=RequestContext(request))
template login.htm:
.
.
.
{% csrf_token %}
Login
{% if error %}
{% FatalImage %}
{{ error }}
{% endif %}
{% if warning %}
{% WarnImage %}
{{ warning }}
{% endif %}
{% if notice %}
{% NoticeImage %}
{{
slashes, change the ? with *, like
`url(r'^login/*', 'views.Login')`. Again, that's not tested, but it should
work, I think.
Happy Coding!
Mark
On Wed, Jan 18, 2012 at 6:09 PM, coded kid wrote:
> Thanks bro. Don't you think I should import Login in urls.py? What
>
Not sure if you need the json.large to be compiled or if that should be
part of the string. The biggest issue was you had a single-quote before
onmouseover. After that, you have to escape the single-quote before \',LEFT, true, OFFSETY, -250, OFFSETX, 0, WIDTH,
800)\" target=\"_blank\">';
FYI: if y
No worries, Mike. Any time!
On Thu, Feb 21, 2013 at 3:17 AM, MikeKJ wrote:
> Thank you Mark spot on!
>
> Really appreciate it
>
>
>
>
>
> On Wednesday, February 20, 2013 3:58:28 PM UTC, Mark wrote:
>
>> Not sure if you need the json.large to be compiled or if that should be
>> part of the strin
Mike DeWitt's answer is most appropriate. In you view define an argument
'pdf=False' and when returning the response from uou view, if pdf is False,
return regular HttpResponse. If pdf is True, follw @Mike's reply to set
response Content type to PDF. It is really easy to return what would be an
htm
Django docs (pretty turse):
https://docs.djangoproject.com/en/dev/howto/outputting-pdf/
>From ReportLab site:
http://www.reportlab.com/software/documentation/
Here's a decent quick tutorial:
http://www.blog.pythonlibrary.org/2010/03/08/a-simple-step-by-step-reportlab-tutorial/
Note that what you
Woo-hoo! Awesome news. We really appreciate all the hard work you guys have
been doing getting this version out.
Thanks a million!
Mark
On Tue, Feb 26, 2013 at 11:44 AM, James Bennett wrote:
> Yup, it's finally here!
>
> * Announcement blog post here:
> https://www.djangoproject.com/weblog/201
It would appear to me that your missing the path to django in your
environment. When you upgraded did you also upgrade to another version of
Python, perhaps? Is the dist-packages/site-packages django folder in the
same place it was?
On Thu, Apr 4, 2013 at 3:58 PM, Bastian wrote:
> I have tried
Can you run manage.py shell and connect to 'views?'
On Thu, Apr 4, 2013 at 4:13 PM, Mark Furbee wrote:
> It would appear to me that your missing the path to django in your
> environment. When you upgraded did you also upgrade to another version of
> Python, perhaps? Is the
Try dropping the .value from referencia. Like {{
form.instance.idproduto.idmercadoria.referencia }}. Does this work?
On Thu, Aug 22, 2013 at 9:35 AM, Fellipe Henrique wrote:
> I tried again.. and work if I have just 1 FK, if I have more then one,
> doesn't work, like this:
>
> I have this models
Are your "nome" and "idade" fields displaying? If so, {{
form.instance.brinq.descricao }} should display the descricao field of the
brinq object associated with that Filhos instance bound to the form in the
formset.
On Thu, Aug 22, 2013 at 9:24 AM, Fellipe Henrique wrote:
> Ok, I read that, but
Are you sure the idmercadoria is not None on that idproduto record?
{{ form.instance.idproduto.**idmercadoria }} Does this display anything?
How about {{ form.instance.idproduto }}?
If these don't display, verify the records in your database. In Django
templates, if something is None or does not
I see. I don't understand how this works: {{
itens.instance.idproduto.codigobarra
}} when this doesn't: {{ itens.instance.idproduto.idmercadoria.referencia }}
Can you post your template code?
On Fri, Aug 23, 2013 at 10:13 AM, Fellipe Henrique wrote:
> form.instance is "Pedido" model, not "It
Yes, that link will cover the basics...
Here's a couple ways to find out if a query returns any records:
User.objects.filter(username=username).exists() # .exists() returns
boolean if records are found.
User.objects.filter(username=username).count() != 0 # .count() returns
number of rec
Also, you can do a try/catch, but I don't really like this method,
personally:
try:
User.objects.get(username=username)
except User.DoesNotExist:
# user didn't exist in database.
On Fri, Jan 16, 2015 at 9:16 AM, Mark Furbee wrote:
> Yes, that link will cov
Looks slick to me! Clearly with mobile and responsive design in mind, but
that's what we have to keep in mind these days.
Great job to all contributors involved in this redesign!
On Tue, Dec 16, 2014 at 4:01 PM, Cal Leeming wrote:
>
> Personally I really like it.
>
> The footer menu contrast is
You say you imported the database. Did you use syncdb to set up the tables?
It sounds like your comment_id field in MySQL is not set as an
auto-incrementing primary key field. Do you have access to that MySQL
database to check, and or update that field definition?
On Wed, Apr 9, 2014 at 2:42 PM,
23 matches
Mail list logo