Re: Uploadfile form and CSS Style

2014-11-18 Thread Kakar Nyori
Hello Russo,

You need to select the input button in the css. Something like this:

input[type=submit] {
background-color: transparent;
border:none;
cursor:pointer;
background-color:blue;
color:white;
}

Note that this will select every "submit" type button in your html. So if
you don't want all of them to be like the above, then you need to provide
the ID and and then select the submit button. You can check it by the *inspect
element tool, *as Collin has described. Or you can manually do it in your
forms as Donarb has described.

Hope this will make some sense.

Cheers!

On Tue, Nov 18, 2014 at 6:12 AM, donarb  wrote:

> On Monday, November 17, 2014 5:00:54 AM UTC-8, Russo wrote:
>>
>> Hi James,
>>
>> sorry I'm new on Django, can you give me some code example? I mean, hot
>> to define the CLASS or ID into the html with elements like this {{
>> form.docfile }} ?
>>
>> Regards
>> Russo
>>
>>
>> El jueves, 13 de noviembre de 2014 15:48:16 UTC-4:30, James Schneider
>> escribió:
>>>
>>> If you are manually expressing the form, then you can add classes and
>>> ID's to any or all elements in the form. Even if you are using something
>>> like the {{ form.as_p }} method to display the form, you can still style it
>>> using CSS styles at the tag level. Just include a custom CSS file with your
>>> template.
>>>
>>> -James
>>> On Nov 13, 2014 12:13 PM, "Russo"  wrote:
>>>
  Hi Kakar,

 but i tried and there is not way to change the bottom style, see the
 html code

 
 >>> enctype="multipart/form-data">
 {% csrf_token %}

 {{ form.non_field_errors }}
 {{ form.docfile.label_tag }} {{ form.docfile.help_text
 }}
 
 {{ form.docfile.errors }}
 {{ form.docfile }}
 
 
 

 as it is a form there is no way to change style ¿?

 Regards/AR


 El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:

 Then you need to apply css to the form.

 On Fri, Nov 14, 2014 at 1:16 AM, Russo 
 wrote:

> Hi,
>
> i just implemented the uploadfile form on Django, and everything goes
> greate, but i would like to do if it is possible to apply CSS styles to 
> the
> upload botton on the forms, Anybody knows this?
>
> Regards
> Russo
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/54650A9B.8040004%40musicparticles.com.
> For more options, visit https://groups.google.com/d/optout.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%
 2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/5465119E.2030707%40musicparticles.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>
> I assume you have a form class for your form. In that class file, you can
> define the class or any other attribute that is used by that widget in your
> form, something like this (note, this is sort of off the top of my head,
> but you should be able to get the idea):
>
> class MyForm(forms.Form):
> upload = 

Re: Uploadfile form and CSS Style

2014-11-17 Thread donarb
On Monday, November 17, 2014 5:00:54 AM UTC-8, Russo wrote:
>
> Hi James,
>
> sorry I'm new on Django, can you give me some code example? I mean, hot to 
> define the CLASS or ID into the html with elements like this {{ 
> form.docfile }} ?
>
> Regards
> Russo
>
>
> El jueves, 13 de noviembre de 2014 15:48:16 UTC-4:30, James Schneider 
> escribió:
>>
>> If you are manually expressing the form, then you can add classes and 
>> ID's to any or all elements in the form. Even if you are using something 
>> like the {{ form.as_p }} method to display the form, you can still style it 
>> using CSS styles at the tag level. Just include a custom CSS file with your 
>> template.
>>
>> -James
>> On Nov 13, 2014 12:13 PM, "Russo"  wrote:
>>
>>>  Hi Kakar,
>>>
>>> but i tried and there is not way to change the bottom style, see the 
>>> html code
>>>
>>> 
>>> >> enctype="multipart/form-data">
>>> {% csrf_token %}
>>>
>>> {{ form.non_field_errors }}
>>> {{ form.docfile.label_tag }} {{ form.docfile.help_text 
>>> }}
>>> 
>>> {{ form.docfile.errors }}
>>> {{ form.docfile }}
>>> 
>>> 
>>> 
>>>
>>> as it is a form there is no way to change style ¿?
>>>
>>> Regards/AR
>>>
>>>
>>> El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:
>>>  
>>> Then you need to apply css to the form.
>>>
>>> On Fri, Nov 14, 2014 at 1:16 AM, Russo  
>>> wrote:
>>>
 Hi,

 i just implemented the uploadfile form on Django, and everything goes 
 greate, but i would like to do if it is possible to apply CSS styles to 
 the 
 upload botton on the forms, Anybody knows this?

 Regards
 Russo

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/54650A9B.8040004%40musicparticles.com
 .
 For more options, visit https://groups.google.com/d/optout.

>>>  
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/5465119E.2030707%40musicparticles.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

I assume you have a form class for your form. In that class file, you can 
define the class or any other attribute that is used by that widget in your 
form, something like this (note, this is sort of off the top of my head, 
but you should be able to get the idea):

class MyForm(forms.Form):
upload = forms.FileField(widget=forms.FileInput(attrs={'class': 
'some_style' }))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/87a213ab-3a49-4f6d-b01f-4a1679d122dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Uploadfile form and CSS Style

2014-11-17 Thread Collin Anderson
Hi Russo,

There should be an auto-generated id, in this case probably #id_docfile for 
that field. You could check the generated html source to be sure. (or 
"Inspect Element" in a browser.)

Collin


On Monday, November 17, 2014 8:00:54 AM UTC-5, Russo wrote:
>
> Hi James,
>
> sorry I'm new on Django, can you give me some code example? I mean, hot to 
> define the CLASS or ID into the html with elements like this {{ 
> form.docfile }} ?
>
> Regards
> Russo
>
>
> El jueves, 13 de noviembre de 2014 15:48:16 UTC-4:30, James Schneider 
> escribió:
>>
>> If you are manually expressing the form, then you can add classes and 
>> ID's to any or all elements in the form. Even if you are using something 
>> like the {{ form.as_p }} method to display the form, you can still style it 
>> using CSS styles at the tag level. Just include a custom CSS file with your 
>> template.
>>
>> -James
>> On Nov 13, 2014 12:13 PM, "Russo"  wrote:
>>
>>>  Hi Kakar,
>>>
>>> but i tried and there is not way to change the bottom style, see the 
>>> html code
>>>
>>> 
>>> >> enctype="multipart/form-data">
>>> {% csrf_token %}
>>>
>>> {{ form.non_field_errors }}
>>> {{ form.docfile.label_tag }} {{ form.docfile.help_text 
>>> }}
>>> 
>>> {{ form.docfile.errors }}
>>> {{ form.docfile }}
>>> 
>>> 
>>> 
>>>
>>> as it is a form there is no way to change style ¿?
>>>
>>> Regards/AR
>>>
>>>
>>> El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:
>>>  
>>> Then you need to apply css to the form.
>>>
>>> On Fri, Nov 14, 2014 at 1:16 AM, Russo  
>>> wrote:
>>>
 Hi,

 i just implemented the uploadfile form on Django, and everything goes 
 greate, but i would like to do if it is possible to apply CSS styles to 
 the 
 upload botton on the forms, Anybody knows this?

 Regards
 Russo

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/54650A9B.8040004%40musicparticles.com
 .
 For more options, visit https://groups.google.com/d/optout.

>>>  
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/5465119E.2030707%40musicparticles.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aeaccaa9-8e93-4266-8aca-94f81ad8d992%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Uploadfile form and CSS Style

2014-11-17 Thread Russo
Hi James,

sorry I'm new on Django, can you give me some code example? I mean, hot to 
define the CLASS or ID into the html with elements like this {{ 
form.docfile }} ?

Regards
Russo


El jueves, 13 de noviembre de 2014 15:48:16 UTC-4:30, James Schneider 
escribió:
>
> If you are manually expressing the form, then you can add classes and ID's 
> to any or all elements in the form. Even if you are using something like 
> the {{ form.as_p }} method to display the form, you can still style it 
> using CSS styles at the tag level. Just include a custom CSS file with your 
> template.
>
> -James
> On Nov 13, 2014 12:13 PM, "Russo"  > wrote:
>
>>  Hi Kakar,
>>
>> but i tried and there is not way to change the bottom style, see the html 
>> code
>>
>> 
>> > enctype="multipart/form-data">
>> {% csrf_token %}
>>
>> {{ form.non_field_errors }}
>> {{ form.docfile.label_tag }} {{ form.docfile.help_text 
>> }}
>> 
>> {{ form.docfile.errors }}
>> {{ form.docfile }}
>> 
>> 
>> 
>>
>> as it is a form there is no way to change style ¿?
>>
>> Regards/AR
>>
>>
>> El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:
>>  
>> Then you need to apply css to the form.
>>
>> On Fri, Nov 14, 2014 at 1:16 AM, Russo > > wrote:
>>
>>> Hi,
>>>
>>> i just implemented the uploadfile form on Django, and everything goes 
>>> greate, but i would like to do if it is possible to apply CSS styles to the 
>>> upload botton on the forms, Anybody knows this?
>>>
>>> Regards
>>> Russo
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com .
>>> To post to this group, send email to django...@googlegroups.com 
>>> .
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/54650A9B.8040004%40musicparticles.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/5465119E.2030707%40musicparticles.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c14d4df3-2eb8-401b-8e42-17eddbcad59d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Uploadfile form and CSS Style

2014-11-13 Thread James Schneider
If you are manually expressing the form, then you can add classes and ID's
to any or all elements in the form. Even if you are using something like
the {{ form.as_p }} method to display the form, you can still style it
using CSS styles at the tag level. Just include a custom CSS file with your
template.

-James
On Nov 13, 2014 12:13 PM, "Russo"  wrote:

>  Hi Kakar,
>
> but i tried and there is not way to change the bottom style, see the html
> code
>
> 
>  enctype="multipart/form-data">
> {% csrf_token %}
>
> {{ form.non_field_errors }}
> {{ form.docfile.label_tag }} {{ form.docfile.help_text
> }}
> 
> {{ form.docfile.errors }}
> {{ form.docfile }}
> 
> 
> 
>
> as it is a form there is no way to change style ¿?
>
> Regards/AR
>
>
> El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:
>
> Then you need to apply css to the form.
>
> On Fri, Nov 14, 2014 at 1:16 AM, Russo 
> wrote:
>
>> Hi,
>>
>> i just implemented the uploadfile form on Django, and everything goes
>> greate, but i would like to do if it is possible to apply CSS styles to the
>> upload botton on the forms, Anybody knows this?
>>
>> Regards
>> Russo
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/54650A9B.8040004%40musicparticles.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5465119E.2030707%40musicparticles.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVJek%2B_qxrqM5uqMFc0JZq1FEPK4waKtq%3DLOfK90JPN7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Uploadfile form and CSS Style

2014-11-13 Thread Russo

Hi Kakar,

but i tried and there is not way to change the bottom style, see the 
html code



enctype="multipart/form-data">

{% csrf_token %}

{{ form.non_field_errors }}
{{ form.docfile.label_tag }} {{ form.docfile.help_text 
}}


{{ form.docfile.errors }}
{{ form.docfile }}




as it is a form there is no way to change style ¿?

Regards/AR


El 13/11/2014 a las 03:37 p.m., Kakar Nyori escribió:

Then you need to apply css to the form.

On Fri, Nov 14, 2014 at 1:16 AM, Russo > wrote:


Hi,

i just implemented the uploadfile form on Django, and everything
goes greate, but i would like to do if it is possible to apply CSS
styles to the upload botton on the forms, Anybody knows this?

Regards
Russo

-- 
You received this message because you are subscribed to the Google

Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
.
To post to this group, send email to django-users@googlegroups.com
.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/54650A9B.8040004%40musicparticles.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5465119E.2030707%40musicparticles.com.
For more options, visit https://groups.google.com/d/optout.


Re: Uploadfile form and CSS Style

2014-11-13 Thread Kakar Nyori
Then you need to apply css to the form.

On Fri, Nov 14, 2014 at 1:16 AM, Russo  wrote:

> Hi,
>
> i just implemented the uploadfile form on Django, and everything goes
> greate, but i would like to do if it is possible to apply CSS styles to the
> upload botton on the forms, Anybody knows this?
>
> Regards
> Russo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/54650A9B.8040004%40musicparticles.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B8oko%2Bawro-H19b7XG-LXnNc4r%2BmFX0qTx_7kkvSmo%3Dvkg30A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.