Regex Validators doesn't validate while working in a shell

2016-09-12 Thread ashish . goyal
I've configured user's username field in following way

username = models.CharField(
_('username'),
max_length=30,
unique=True,
help_text=_('Required. 30 characters or fewer. Letters, digits and 
@/./+/-/_ only.'),
validators=[
validators.RegexValidator(
r'^[\w.+-]+$',
_('Enter a valid username. This value may contain only '
  'letters, numbers ' 'and ./+/-/_ characters.')
),
],
error_messages={
'unique': _("A user with that username already exists."),
},
)

I'm getting error in admin panel but not in django-shell.








Though django raises an error for maximum length in shell.

Is it a bug? Or am I missing something.

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3bbed56d-091d-492f-bac7-a3175df0e556%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django_admin_log table is error with migrate and giving ORA-00955

2020-06-20 Thread ashish goyal
I have been trying to do below steps and all the migrations except my custom 
apps are getting failed with ORA-00955 error saying name is already used by an 
existing object. When i search in oracle dba_tables i don't find 
DJANGO_ADMIN_LOG table

i have executed below steps which is failing:

python manage.py makemigrations
python maange.py migrate admin
django.db.utils.databaseerror ora-00955 name is already used by an existing 
object
*
while i am able to perform

python manage.py migrate myapp
same happening for other objects like auth and session.

Any help is appreciated??

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3fd6b474-7513-44d8-b3f1-eb79eb275d96o%40googlegroups.com.


Oracle 12.0.1 admin not working with django 3+

2020-06-23 Thread ashish goyal
Ho All,

Have created lot of stuff in app, when i try login to admin with superuser name 
and password it shows integrity issue. And there is no row in django_admin_log.
On some posts i found this is an issue with django 3+ version which i am using.

How can i resolve this without hampering my existing code?

Thanks
Ashish

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/F37ADD66-7F26-4555-8605-2B8359968947%40gmail.com.


change charfield to list and create insert form

2020-06-27 Thread ashish goyal
Hi All,

I am creating my first django project where i have inserted some data in
table which is oracle table.

Now i created insert form where i will put up data and submit which will
add a row in table.

Currently the form is rendered through model class and i am getting text
box on one charfield whereas i wanted to have drop down with fixed values.

Can someone guide me on how to put drop down in form with charfield, i can
put up fixed value where use any of those values and submit

-- 
Thanks
Ashish

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMjennDWcy2bYbL-XW1LMzZfK9jappXpe78c7fw47PZhdGQFFw%40mail.gmail.com.


Static not working on unix while working on windows

2020-07-06 Thread ashish goyal
Hi All,

I have created a django app on windows and have used bootstrap navbar n other 
functions which are working good on windows.

Same files I have imported on unix server then i am able to get all details but 
getting issue with css and js files saying below error

Refused to apply style from  because its MIME type ('text/html') is not a 
supported stylesheet MIME type, and strict MIME checking is enabled angular

I am using below script in windows which is working in windows but not on unix

{ % load static %}
https://groups.google.com/d/msgid/django-users/D45C33B1-949B-4BBE-8338-8982F2A246BF%40gmail.com.


Re: Static not working on unix while working on windows

2020-07-06 Thread ashish goyal
I am using same but still css is not available when i am clicking on css file 
link from inspect.

Is it because i have not configured nginx as i am just running app from 
runserver on unix machine.

Was working fine on windows. No change

Thanks
Ashish

> On 07-Jul-2020, at 00:11, Vishesh Mangla  wrote:
> 
> 
> Href = “{% static appname/something.css %}”
>  
> Sent from Mail for Windows 10
>  
> From: ashish goyal
> Sent: 06 July 2020 23:50
> To: django-users@googlegroups.com
> Subject: Static not working on unix while working on windows
>  
> Hi All,
>  
> I have created a django app on windows and have used bootstrap navbar n other 
> functions which are working good on windows.
>  
> Same files I have imported on unix server then i am able to get all details 
> but getting issue with css and js files saying below error
>  
> Refused to apply style from  because its MIME type ('text/html') is not 
> a supported stylesheet MIME type, and strict MIME checking is enabled angular
>  
> I am using below script in windows which is working in windows but not on unix
>  
> { % load static %}
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/D45C33B1-949B-4BBE-8338-8982F2A246BF%40gmail.com.
>  
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/2A992212-ECB5-4FBA-BE2A-6775FE777304%40hxcore.ol.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9A4AC834-CFD6-477E-BCCB-3829A13D7087%40gmail.com.


Re: Static not working on unix while working on windows

2020-07-07 Thread ashish goyal
Hey musty,

No those basic things are working already on windows. But not on linux. Once 
hosted css is not available, even after i did collectstatic in static folder 
but still css n js are not loading with static

>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/35233aa7-a4c2-4cbf-8d69-54ddc4844045o%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/964912B9-CB49-4867-8A31-9829F4ABAF8B%40gmail.com.


Re: Static not working on unix while working on windows

2020-07-07 Thread ashish goyal
Ok avi (Import mimetypes) and kevin (Remove stylesheet - hope this works on 
redhat) will follow both changes and come back.

Since database is same When i was developing on windows and when i migrate to 
linux redhat then no migration needs to be apply when i did migrate.

Sent from my iPhone

> On 08-Jul-2020, at 00:54, Avi shah  wrote:
> 
> 
> 
> Hi Ashish , 
> I had the same error while deploying my django on iis windows server 
> just copy paste the below code into your settings.py and you will have no 
> issues
> And i have done for js , you can do it for css too
> 
> import mimetypes
> 
> mimetypes.add_type("text/plain", ".js", True)
> mimetypes.add_type("text/javascript", ".js", True)
> 
> 
> And let me know if theres any error in django 
> 
> Thanks & Regards ,
> Avi Shah
> (9167199744) 
>> 
>> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CALa7AFNqNh-j9ABe1vmy-QWdR4AhGiWAJCxzmj6t250bqvRALg%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82988F95-C659-4AFB-9584-148B17FA5830%40gmail.com.


Re: Static not working on unix while working on windows

2020-07-08 Thread ashish goyal
Hi ajeet, yes done collectstatic

Sent from my iPhone

> On 08-Jul-2020, at 20:31, Ajeet Kumar Gupt  wrote:
> 
> 
> You tried to first run collectststic 
> 
>> On Mon, Jul 6, 2020, 10:20 PM ashish goyal  wrote:
>> Hi All,
>> 
>> I have created a django app on windows and have used bootstrap navbar n 
>> other functions which are working good on windows.
>> 
>> Same files I have imported on unix server then i am able to get all details 
>> but getting issue with css and js files saying below error
>> 
>> Refused to apply style from  because its MIME type ('text/html') is not 
>> a supported stylesheet MIME type, and strict MIME checking is enabled angular
>> 
>> I am using below script in windows which is working in windows but not on 
>> unix
>> 
>> { % load static %}
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/D45C33B1-949B-4BBE-8338-8982F2A246BF%40gmail.com.
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2BTqRsvCq0A7GuLyRADscU5%2BQOP4LNbYs-0BWCJhvjNpU_NUUQ%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/BBFCCCD9-7DF9-43C6-B82A-6C3BED03DD46%40gmail.com.


Django deployment on linux rhel 7

2020-07-12 Thread ashish goyal
Hi,

Anyone done django deployment on linux rhel 7 and bootstrap working fine with 
below command
python manage.py runserver 

Need help

Thanks
Ashish

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/08B5234D-64F5-40DD-8252-EE2B0AB1AC37%40gmail.com.


Shell script dynamic execution from app

2020-07-25 Thread ashish goyal
Hi guys, i have built an app for collecting various stats of environment. Its 
working.
Now i wanted to integrate it with all the utilities or shell scripts which are 
present on application server. So its like all scripts names as a list on 
django app and one click run pf those script. Currently those scripts are 
scheduled with control-m. I wanted to have a dynamic design of those scripts so 
that this all could be possible. Any leads?

Thanks
Ashish

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2DE1B9C9-9964-438B-AEF3-5C2DD31FE960%40gmail.com.