Re: associate Developers for Google

2023-06-17 Thread JOSEPH OCHELEBE O.
Yes please!

On Sat, Jun 17, 2023, 16:47 Peter Benjamin Ani 
wrote:

>
> I know it might be a scam normally, but am not dropping any confidential
> info
> On Sat, 17 Jun 2023 at 16:34, John Ayodele 
> wrote:
>
>> Yes Muhammed!
>> I also thought of it. I think it's a scam.
>>
>> On Sat, Jun 17, 2023 at 4:30 PM Muhammad Juwaini Abdul Rahman <
>> juwa...@gmail.com> wrote:
>>
>>> Be careful folks. Seems like a scam. 
>>>
>>> On Sat, 17 Jun 2023 at 23:18, Mz Gz  wrote:
>>>
 Dear Black,

 Kindly check you inbox or spam folder.

 Regards,

 On Sat, 17 Jun 2023, 5:59 pm John Ayodele, 
 wrote:

> Yes, I'm here!
> Check out my Github profile
> github.com/techie-john
>
> On Sat, Jun 17, 2023 at 3:09 PM Lucifer Black <
> luciferblac...@gmail.com> wrote:
>
>> Is there anyone that wants a job at google developer at home looking
>> for three people
>>
>>
>> Get Outlook for Android 
>>
>> --
>> 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/DB9P193MB15964FB814BFEBE1A8A33AEFF45BA%40DB9P193MB1596.EURP193.PROD.OUTLOOK.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/CAP7pJ3jYQ-AnJrOFyhqacOwgNLONMwzDzKK5VUwRd_juoYXn3A%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/CAHV4E-eA5MXpwPGrFoxaMTAdRYzUeA5F5f%2BfaVGqvibxH9AAVw%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/CAFKhtoRC2huuQe8H_rc-0bS_BRudX474SUWMB3bU7VAcVaj54A%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/CAP7pJ3gd1ezC-oA%2BiDWg_S%2BSyT%2B-8%2BBSYWTq-rqu3vw3K6kkzg%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/CAPxt_2W-cgfEhLv9-v4iDqovwse%2BmuCUmuvF6vY3PSGYx3BagQ%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/CAOCpFMJTNCw_H7%3DE_Cja1bdwYPAv7VWymueVdnnhLGdPMa4X2w%40mail.gmail.com.


ImportError:

2022-12-23 Thread JOSEPH OCHELEBE O.
Am getting this errors bellow when i tried to run my Django project


from . import views
ImportError: cannot import name 'views' from 'it_training_platform' 
(C:\Users\Dreams 
Reality\Desktop\Django-project\it_training_platform\it_training_platform\__init__.py)

-- 
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/b2df5f79-5731-40fa-a0f1-a434f170ee4bn%40googlegroups.com.


Re: Digest for django-users@googlegroups.com - 16 updates in 8 topics

2020-08-22 Thread 'Narendra G O 19BCE1082' via Django users
Hey,

My number is mentioned below. Please give me your number I’ll add you in our 
slack/ Zoho workspace .


G O Narendra 
19BCE1082
B.Tech CSE
VIT University, Chennai


+91 80720 14549

> On 22-Aug-2020, at 6:32 PM, django-users@googlegroups.com wrote:
> 
> 
> django-users@googlegroups.com Google Groups   
> Topic digest 
> View all topics
> Leverage Django 3.1+ async views to implement SSE - 1 Update
> help required with a concept. - 3 Updates
> Who can help me? - 3 Updates
> [No Subject] - 3 Updates
> django - admin error - 2 Updates
> If posible connect Django with IBM i. - 1 Update
> data too long in a CharField column - 1 Update
> Sources for learning django - 2 Updates
> Leverage Django 3.1+ async views to implement SSE
> Benoit Blanchon : Aug 22 01:46AM -0700 
> 
> Hi,
>  
> Documentation for Django 3.1 
> <https://docs.djangoproject.com/en/3.1/topics/async/#async-views:%7E:text=The%20main%20benefits%20are%20the%20ability,long%2Dpolling%2C%20and%20other%20exciting%20response%20types.>
>  says 
> this about async views:
>  
> *The main benefits are the ability to service hundreds of connections 
> without using Python threads. This allows you to use slow streaming, 
> long-polling, and other exciting response types.*
>  
> I believe this means we could implement an SSE (Server-Sent Events 
> <https://en.wikipedia.org/wiki/Server-sent_events>) view without 
> monopolizing a thread per client, but I didn't figure out exactly how.
>  
> I know about Django Channels, but I'm curious to see if we can avoid it. 
>  
> I initially thought StreamingHttpResponse was the way to go since it has 
> been used successfully to implement SSE with synchronous views 
> <https://stackoverflow.com/a/55522953/1164966>. Still, I would accept any 
> solution based on asynchronous views.
>  
> I opened a bounty on stack-overflow 
> <https://stackoverflow.com/q/63316840/1164966>, but so far, no viable 
> solution was proposed. 
>  
> Does anyone know how we could leverage async views to implement SSE?
>  
> Best regards,
> Benoit Blanchon
> Back to top
> help required with a concept.
> Asish Ojha : Aug 21 04:49PM -0700 
> 
> i am designing a project on online registration of students for an 
> educational institution. Now that institution is having several schools 
> registered under it. The School has a school id code and school name. Now i 
> want a generalised login system for the school where they have their school 
> id code as their login id and a standard password trend like 
> school_ind@institution and as a second level authentication a sms based 
> otp. Now when the school logs in it can register students for the exam and 
> while registering the school id shown in school choices of student is the 
> only the school id with which login has been done and in list view only 
> students of that particular school shows up. the school login shud have the 
> crud right for that schools student. how to implement this .
> Ogunsanya Opeyemi : Aug 22 06:40AM +0100 
> 
> Hi you need to carefully create an algorithm because this implementation is
> a big one. Send your whatsapp number to me if you still dont get what i
> meant. If i could help you in it.
>  
>  
> -- 
> OGUNSANYA OPEYEMI
> Mike Dewhirst : Aug 22 04:34PM +1000 
> 
> From my perspective the difficult part is OTP and interfacing with SMS 
> because I haven't done that before.The relational design requires modeling 
> real world relationships which usually isn't hard. Trying to use 
> "@institution" for userid is fraught with potential problems. Normally a 
> registration system lets a user keep entering names until getting one that is 
> unique. I built a similar system where it is companies rather than schools 
> and consultants (and employees) get linked by foreign key to only one 
> company. That means they only see that company's information. However, any 
> consultant can work for multiple companies. We decided in that case they had 
> to have multiple logins and we recommended they use @company for the sole 
> reason of reminding themselves which company they are currently working on. 
> That works because they can use for example mike@thiscompany and 
> mike@thatcompany etc. The software doesn't care what the userid is and nor 
> should it. Keep things as simple as possible.Users can have roles. 
> django.auth.group is useful for differentiating between teachers and students 
> re permissions and also your software can then easily discover which group(s) 
> a user is in and adjust accordingly.Users can have FK relationships not only 
> with schools but between themselves. That would be a many-to-many with "self" 
> to allow users in the

syntax error while trying to run '$ django-admin startproject mysite' command on command terminal

2020-08-16 Thread Michael O
hello, i cd into the directory by cd\ to start a project and was welcomed 
by the blinking '...'. i then typed $  $ django-admin startproject mysite 
and I go syntax Error: invalid syntax. please help by pointing me in the 
right direction so that I could continue to learn. Thank you.

-- 
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/fe8d7229-5b9c-4951-9d1a-c3008a084605n%40googlegroups.com.


contrib.auth.forms Bug

2020-06-29 Thread V O

Hello,


Please have a look at the following:

I was just about to subclass the login form of
django.contrib.auth.forms:

"class AuthenticationForm(forms.Form)"

after dealing a bit with the code I was about to customize the
user_is.active check in order to display a customized message at my
login. I was wondering as I was not able to figure out at what point
exactly the user_is.active really gets validated.
The clean method does a call to another function called
confirm_login_allowed but from my perspective this never gets reached?!
I test against this with a user that is not active but I always get
back self.get_invalid_login_error instead of confirm_login_allowed
error message.
Can smb. confirm that this is a bug or at least at what point
confirm_login_allowed gets triggered ?



def clean(self):
username = self.cleaned_data.get('username')
password = self.cleaned_data.get('password')

if username is not None and password:
self.user_cache = authenticate(self.request,
username=username, password=password)
if self.user_cache is None:
raise self.get_invalid_login_error()
else:
self.confirm_login_allowed(self.user_cache)

return self.cleaned_data

def confirm_login_allowed(self, user):
if not user.is_active:
raise forms.ValidationError(
self.error_messages['inactive'],
code='inactive',
)

def get_user(self):
return self.user_cache

def get_invalid_login_error(self):
return forms.ValidationError(
self.error_messages['invalid_login'],
code='invalid_login',
params={'username': self.username_field.verbose_name},
)


There is also a stackoverflow post about this here:
https://stackoverflow.com/questions/62622571/



Kind regards,

Robin

-- 
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/0fc1c5cc-9e28-4903-a83e-6d77a655a270n%40googlegroups.com.


using mod_python and django3.02??

2020-05-19 Thread Robert O.
I wrote a django site (django3.02) and want to deploy it using mod_python. 
Is that even doable/ reasonable?. Do I need to use django version <1.5? 


-- 
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/9f7ec51b-8b9b-4f00-a48d-b5e54e4c38c9%40googlegroups.com.


Django begginer

2019-11-26 Thread Elijah O. Raji
What exactly do you want the variable 'project' to do because you did not 
Include any field with it.

-- 
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/9ed07012-4254-4d1d-ae00-affe0ef449ed%40googlegroups.com.


Django User Authrntication

2019-11-23 Thread Elijah O. Raji
Hello Chris 
I'm ready to help kindly put the question through.

Or you can contact me view WhatsApp
+2349036475407

-- 
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/571e1b57-0b2a-4f15-88a2-21a78fddc0f4%40googlegroups.com.


Re: Internship

2019-11-22 Thread Elijah O. Raji
I base in Osun and School in Akure.
I can work remotely for the main time.

-- 
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/41b66227-d684-413a-8364-1a766fe68f53%40googlegroups.com.


Re: Internship

2019-11-22 Thread Elijah O. Raji
No sir.
I school in Akure and base I Osun.
I could work remotely if you don't mind..

-- 
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/fb7ed1b2-5322-4b9d-93d2-16f8d7f94c84%40googlegroups.com.


Re: Internship

2019-11-22 Thread Elijah O. Raji
LinkedIn

https://www.linkedin.com/in/elijah-raji-361a3b153

Git Repo

www.github.com/owengrace

-- 
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/4222a6a1-0834-44aa-b37a-6574664cc078%40googlegroups.com.


Re: Internship

2019-11-22 Thread Elijah O. Raji
Sir, I'm also interested in the internship as a backend developer.
I base in Nigeria.
I can work remotely.

-- 
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/12bc9d00-1bd6-4c8c-9e70-2f936e4fbf55%40googlegroups.com.


Re: use of migrate command and how to see the tables

2019-07-20 Thread Luis O Sulbaran L
Ejemplo,
Registra o actualizar cambios realizados a nuestros modelos:
python manage.py makemigrations nombre_aplicación






04146493449--0261-7699778
*https://t.me/luisulbaranleon <https://t.me/luisulbaranleon>*



El vie., 19 de jul. de 2019 a la(s) 04:32, Jani Tiainen (rede...@gmail.com)
escribió:

> Hi.
>
> Migrate command applies migrations, changes to your models, into database.
>
> For example if you add a new field in your model you need to create a
> migration (piece of code that reflects your change) using makemigrations
> command.
>
> Once you have made migration(s) you need to apply them so database
> contains a colum in a table that your model represents.
>
>
> pe 19. heinäk. 2019 klo 11.23 yasar arafath Kajamydeen 
> kirjoitti:
>
>> Hi all,
>>
>> can some one tell me what is the use of migrate command ?
>>
>> when i enter the command i got the following error (No migration to
>> apply) . I dont know what to do further and also i would like to create
>> tables (sqlite) .
>>
>>
>> [image: migrate.JPG]
>>
>>
>> Note - I am a beginer to Django ..  Most welcome with your reply
>>
>> --
>> 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/e715d8b3-9ed7-433d-9bf2-94899b196289%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/e715d8b3-9ed7-433d-9bf2-94899b196289%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91ocrDXRqKVF7PhfOD764G91bCv45pqJUtTgyS3nF_v%2BihA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHn91ocrDXRqKVF7PhfOD764G91bCv45pqJUtTgyS3nF_v%2BihA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANvxS2t2f5Ao_F8xxa25eFq%2BuVQBWA%3DXtgbfKU43i5dGK3kJUw%40mail.gmail.com.


Django use id=models.IntegerField(primary_key=True) as autokey

2019-07-02 Thread P O
Hello,
sorry if I am wrong, but I use somethig like:
id=models.IntegerField(db_name="some_id", primary_key=True)
and Django uses auto-key when I add objects this way:
obj = Obj()
obj.some_id= 1
obj.save()
obj = Obj()
obj.some_id= 3
obj.save()
In default DB this objects have some_id=1 and some_id=2, There us no 
errors, no warnings.

Is it a bug? Without db_name works well. 

-- 
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/b876893b-bd60-495a-9e62-092317b80d7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Import circular

2019-06-06 Thread Fabio O da silva
not



[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
Remetente
notificado por
Mailtrack
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
06/06/19,
06:28:46 PM

On Thu, Jun 6, 2019 at 5:25 PM 'Alex Mesias Diaz Toro' via Django users <
django-users@googlegroups.com> wrote:

> Hi Fabio,
> Did you solve this problem?
> Ty
>
> El jue., 6 jun. 2019 a las 12:12, Fabio O da silva (<
> fabio7silv...@gmail.com>) escribió:
>
>> urls.py
>>
>>
>>
>> [image: Mailtrack]
>> <https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
>>  Remetente
>> notificado por
>> Mailtrack
>> <https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
>>  06/06/19,
>> 02:11:53 PM
>>
>> On Thu, Jun 6, 2019 at 11:47 AM Joe Reitman  wrote:
>>
>>> Can you post your views.py, urls.py and template?
>>>
>>> On Thursday, June 6, 2019 at 9:18:22 AM UTC-5, Fabio O da silva wrote:
>>>>
>>>> django.core.exceptions.ImproperlyConfigured: The included URLconf
>>>> 'simplemooc.urls' does not appear to have any patterns in it. If you see
>>>> valid patterns in the file then the issue is probably caused by a circular
>>>> import.
>>>>
>>>> --
>>> 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/480664b9-d779-419d-8cbe-c4ea2aadb8a4%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/480664b9-d779-419d-8cbe-c4ea2aadb8a4%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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 https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAFZF8WdSdWVQpN7HeTVNyMXoj%3DXhPa8ryx2bsMW3HeiQB8JOHQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFZF8WdSdWVQpN7HeTVNyMXoj%3DXhPa8ryx2bsMW3HeiQB8JOHQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGSrrc6g2NMugAv8Q2%2B7Sk0r_6nfEN9X%3DEXqTKA%2BFaOn4b-cYA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGSrrc6g2NMugAv8Q2%2B7Sk0r_6nfEN9X%3DEXqTKA%2BFaOn4b-cYA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFZF8Wf_0wYvXiP-C8re9%3DADH_UW821peq8o%2ByyECR%2BF8prdKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Import circular

2019-06-06 Thread Fabio O da silva
urls.py



[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
Remetente
notificado por
Mailtrack
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality5;>
06/06/19,
02:11:53 PM

On Thu, Jun 6, 2019 at 11:47 AM Joe Reitman  wrote:

> Can you post your views.py, urls.py and template?
>
> On Thursday, June 6, 2019 at 9:18:22 AM UTC-5, Fabio O da silva wrote:
>>
>> django.core.exceptions.ImproperlyConfigured: The included URLconf
>> 'simplemooc.urls' does not appear to have any patterns in it. If you see
>> valid patterns in the file then the issue is probably caused by a circular
>> import.
>>
>> --
> 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/480664b9-d779-419d-8cbe-c4ea2aadb8a4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/480664b9-d779-419d-8cbe-c4ea2aadb8a4%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFZF8WdSdWVQpN7HeTVNyMXoj%3DXhPa8ryx2bsMW3HeiQB8JOHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Import circular

2019-06-06 Thread Fabio O da silva
django.core.exceptions.ImproperlyConfigured: The included URLconf 
'simplemooc.urls' does not appear to have any patterns in it. If you see 
valid patterns in the file then the issue is probably caused by a circular 
import.

-- 
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/cc298740-3e54-487b-8ec4-9a0be431a3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how-to style registration form?

2018-09-09 Thread V O
i currently try to "style" my registration form. in General i get the 
concept behind it but not at that point:


This is how it's intendet to be (and not working):

class RegistrationForm(UserCreationForm):
> username = forms.CharField(required=True, label='Username', 
> widget=forms.TextInput(attrs={'class': 'class-one-input-fields'}))
> password1 = forms.CharField(required=True, label='Password', 
> widget=forms.PasswordInput(attrs={'class': 'class-one-input-fields'}))
> password2 = forms.CharField(required=True, label='Password 
> confirmation', widget=forms.PasswordInput(attrs={'class': 
> 'class-one-input-fields'}))
> pubpgp = forms.CharField(required=True, label='Public PGP Key', 
> widget=forms.Textarea(attrs={'class': 'class-two-input-fields'}))
> captcha = CaptchaField()
> 
> def save(self, commit=True):
> username = super(RegistrationForm, self).save(commit=False)
> username.pubpgp = self.cleaned_data['pubpgp']
> 
> if commit:
> username.save()
> 
> return username


views.py:

def signup (request):
> if request.method == 'POST':
> form = RegistrationForm(request.POST)
> if form.is_valid():
> form.save()
> messages.add_message(request, messages.INFO, "Thanks for 
> you registration, you are now able to login.")
> return redirect(reverse('post_list'))
> else:
> form = RegistrationForm()
> 
> args = {'form': form}
> return render(request, 'registration/signup.html', args)


The error i get is:

> AttributeError: Manager isn't available; 'auth.User' has been swapped
> > for 'accounts.User'


in my settings.py i set:

> AUTH_USER_MODEL = 'accounts.User'


This is the current working state:

class RegistrationForm(UserCreationForm):
> user = forms.CharField(required=True)
> 
> class Meta:
> model = User
> fields = (
> 'user',
> 'password1',
> 'password2',
> 'pubpgp'
> )
> 
> captcha = CaptchaField()
> 
> def save(self, commit=True):
> user = super(RegistrationForm, self).save(commit=False)
> user.pubpgp = self.cleaned_data['pubpgp']
> 
> if commit:
> user.save()
> 
> return user


User model of accounts:

#User Model Manager
> class UserManager(BaseUserManager):
> def create_user(self, user, password=None):
> """
> Creates and saves a User with the given username and password.
> """
> if not user:
> raise ValueError('Error: The User you want to create must 
> have a username, try again')
> 
> new_user = self.model(
> user=self.model.normalize_username(user)
> )
> 
> new_user.set_password(password)
> new_user.save(using=self._db)
> return new_user
> 
> def create_staffuser(self, user, password):
> """
> Creates and saves a staff user with the given username and 
> password.
> """
> new_user = self.create_user(
> user,
> password=password,
> )
> new_user.staff = True
> new_user.save(using=self._db)
> return new_user
> 
> def create_superuser(self, user, password):
> """
> Creates and saves a superuser with the given username and 
> password.
> """
> new_user = self.create_user(
> user,
> password=password,
> )
> new_user.staff = True
> new_user.admin = True
> new_user.save(using=self._db)
> return new_user
> 
> 
> class User(AbstractBaseUser):
> 
> #User fields
> user = 
> models.CharField(verbose_name='username',max_length=30,unique=True)
> bio = models.TextField(max_length=5000, blank=True, null=True)
> pubpgp = models.TextField(blank=True, null=True)
> avatar = fields.ImageField(upload_to='avatar', blank=True, 
> null=True, dependencies=[
> FileDependency(processor=ImageProcessor(
> format='JPEG', scale={'max_width': 350, 'max_height': 
> 350}))
> ])
> 
> #Account typs
> active = models.BooleanField(default=True)
> staff = models.BooleanField(default=False) # a admin user; non 
> super-user
> admin = models.BooleanField(default=False) # a superuser
> # notice the absence of a "Password field", that's built in.
> 
> USERNAME_FIELD = 'user'
> REQUIRED_FIELDS = [] # Username & Password are required by default.
> 
> def 

Re: How to convert Queryset to String?

2018-01-02 Thread Joshua O. Morales
Here's the snippet of my code:
models.py:

class Comment(models.Model):
comment_title = models.TextField()
comment_content = models.TextField()
def __str__(self):
return self.comment_content




def test_me():
comment_id_set = list(Comment.objects.values_list('id', flat=True))
for pk in comment_id_set:
comment = Comment.objects.filter(pk=pk)
print(comment)


Output:
]>
]>


On Tuesday, January 2, 2018 at 5:34:44 PM UTC+8, Etienne Robillard wrote:
>
> if your title object has a __str__ then it can be printed.
>
> Printing a queryset object make no sense!
>
> HTH
>
> Etienne
>
> Le 2018-01-02 à 04:30, Joshua O. Morales a écrit :
>
> title = Title.objects.filter(title=title)
> print(title)
> Is there a way to turn this:
> *<QuerySet[]>* 
> into a string:
> *Hello, World*
>
>
>
> I tried using it as an argument but it gave me an error.
>
> -- 
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/9d47f644-68f6-4939-a0f2-65b4681701b5%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/9d47f644-68f6-4939-a0f2-65b4681701b5%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> Etienne robillardtka...@yandex.com 
> https://www.isotopesoftware.ca/
>
>

-- 
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/b0336f03-63ff-4a1e-9138-056d5a8c9cbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to convert Queryset to String?

2018-01-02 Thread Joshua O. Morales
title = Title.objects.filter(title=title)
print(title)
Is there a way to turn this:
**
into a string:
*Hello, World*



I tried using it as an argument but it gave me an error.

-- 
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/9d47f644-68f6-4939-a0f2-65b4681701b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Run manage.py test app_name command from view

2017-11-26 Thread Joshua O. Morales
I tried it out, but I'm still getting 400 error. I attached a copy of the 
tests.py of the app. Maybe you'll find something I can't. 
views.py:

from django.shortcuts import render
from django.core.management import call_command


def start_scraping(request):
call_command('test','seleniumapp')
return render(request, 'seleniumapp/selenium.html')

On Monday, November 27, 2017 at 3:40:58 AM UTC+8, Matemática A3K wrote:
>
>
>
> On Sun, Nov 26, 2017 at 11:03 AM, Joshua O. Morales <joshuao@gmail.com 
> > wrote:
>
>>  What I would like to do is to execute the tests.py by clicking a certain 
>> button.  I am trying to run the tests.py via views.py, but it gives me a 
>> 400 Bad Request error. Is there any other solution?
>> Your help would be very much appreciated.
>> Here's a snippet of the code:
>>
>> from django.core.management import call_command
>>
>> def start(request):
>> call_command('test appname')
>>
>> It should be:
>
> call_command('test', 'appname')
>
> Don't know why is your 400, how are you requesting your view? Also, note 
> that you are not returning any HttpResponse nor redirect in the snippet (It 
> will give you other error)
>

-- 
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/90dee471-a65b-404f-aa9f-b19223471944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException

## get the Firefox profile object
firefoxProfile = FirefoxProfile()

# 1=enabled, 2=disabled ; True=enabled, False=disabled
## CSS
firefoxProfile.set_preference('permissions.default.stylesheet', 1)

## images
firefoxProfile.set_preference('permissions.default.image', 2)

## JavaScript
firefoxProfile.set_preference('javascript.enabled', True)

## Flash
firefoxProfile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so','False')

## Use the driver
browser = webdriver.Firefox(firefoxProfile, executable_path=r'./driver/geckodriver.exe')
#browser.set_window_size(200,400)
browser_wait = WebDriverWait(browser, 120)

agoda_revtitle_element = ".Review-comment-bodyTitle"
agoda_revcomment_element = ".Review-comment-bodyText"
agoda_revscore_element = ".Review-comment-score"
agoda_revdate_element = ".Review-statusBar-date "

max_page_num = 5


class Review:
def __init__(self, review_site, title, comment, score, review_date):
self.review_site = review_site
self.review_title = title
self.review_comment = comment
self.review_score = score
self.review_date = review_date


def parse_reviews(website_name, review_title_element, review_comment_element, review_score_element,
  review_date_element):

review_titles = browser.find_elements_by_css_selector(review_title_element)
review_comments = browser.find_elements_by_css_selector(review_comment_element)
review_scores = browser.find_elements_by_css_selector(review_score_element)
review_dates = browser.find_elements_by_css_selector(review_date_element)

review_list = []
for idx in range(len(review_titles)):
review_list.append(idx)

rev_dates = []
rev_scores = []

if website_name == "agoda":
for idx in review_dates:
rev_dates.append(idx.text)
review_dates.clear()
for idx in rev_dates:
review_dates.append(idx)

for idx in review_scores:
rev_scores.append(idx.text)
review_scores.clear()
for idx in rev_scores:
review_scores.append(idx)

if website_name == "agoda":
agoda_dates = []
for idx in review_dates:
agoda_dates.append(idx[9:])

review_dates.clear()

for idx in agoda_dates:
review_dates.append(idx)

for idx in range(len(review_list)):
review_list[idx] = Review(website_name, review_titles[idx], review_comments[idx], review_scores[idx],
  review_dates[idx])


Run manage.py test app_name command from view

2017-11-26 Thread Joshua O. Morales
 What I would like to do is to execute the tests.py by clicking a certain 
button.  I am trying to run the tests.py via views.py, but it gives me a 
400 Bad Request error. Is there any other solution?
Your help would be very much appreciated.
Here's a snippet of the code:

from django.core.management import call_command

def start(request):
call_command('test appname')

-- 
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/c5eb9d74-d290-4f6c-9c2b-82d184f0945e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Setting up PortgreSQL with Djano 1.8

2015-11-09 Thread Ele. O.
Hello Everyone, 
I tried to insall PostgreSQL with Djngo 1.8 and when running "migrate" to 
ensure the database is connected and created successfully, i faced a an 
error regarding the settings and couldn't go further . Below you can fine 
the steps that was taken at the time of setting up the database , if you 
can point me in where was the missing step or if there's a different way 
that this can be done... 

OS: Arch Linux

*First Step: *


$sudo pacman -S posgresql
$sudo -i -u postgres
[postgres@dworld~]$ initdb --locale en_US.UTF-8 -E UTF8 -D 
'/var/lib/postgres/data'
[postgres@dworld~]$ postgres -D /var/lib/postgres/data

*# then in another terminal while the above terminal live:*

$ sudo -i -u posgres
[postgres@dworld ~]$ psql

postgres=# CREATE DATABASE fdatabase
postgres=# CREATE USER dan WITH PASSWORD 'password'
postgres-# ALTER ROLE dan SET client_encoding TO 'utf8'
postgres-# ALTER ROLE dan SET default_transaction_isolation To 'read 
committed'
postgres-# ALTER ROLE dan SET timezone TO 'UTC+03:00'
postgres-# GRANT ALL PRIVILEGES ON DATABASE fdatabase TO dan
postgres-# \q

[postgres@dworld ~]$ exit



*Second Step:*
$ django-admin startproject mysite

$ pip install psycopg2
$ vim settings.py

*# then did the following changes to Settings.py :*



DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'fdatabase',
'USER': 'dan',
'PASSWORD': 'password',
'HOST': '',
'PORT': '',
}
}

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC+03:00'





*Third Step:*
(my_site)[dan@dworld my_site]$ python2 manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 354, in execute_from_command_line
utility.execute()
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 303, in execute
settings.INSTALLED_APPS
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 48, in __getattr__
self._setup(name)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 44, in _setup
self._wrapped = Settings(settings_module)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 131, in __init__
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: UTC+03:00


Thanks all in advance ..

-- 
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/dd96cf9c-18e1-4139-8fe1-48fbe6aa9036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Long-term support (LTS)

2014-09-05 Thread Philippe O. Wagner
Thanks Collin!

Am Donnerstag, 4. September 2014 19:47:08 UTC+2 schrieb Collin Anderson:
>
> It hasn't been decided yet, and it's not necessarily 1.7. See the thread 
> on django-developers.
> https://groups.google.com/d/topic/django-developers/KweKHgdIiz0/discussion
>

-- 
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/90bfa503-5274-4f50-9bdb-07843bdc92fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Long-term support (LTS)

2014-09-04 Thread Philippe O. Wagner
Hi all, 

Django 1.4 is the current Long-term support (LTS) release that lasts until 
end of March 2015. 
I am curious which is the next LTS release? Is it Django 1.7?
 
Regards,

Philippe 

-- 
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/1daec6fe-dcc1-4e72-a354-280c139943ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Dynamic image content

2013-09-10 Thread Mark O
 
Hi folks, 
 
Consider the snippet in views.py
 
 
   url = http://127.0.0.1:8806/test
   request = urllib2.Request ( url ) 
   f = urllib2.urlopen ( request ) 
   result = f.info().getheader ( 'Content-Type' )
   if result == "image/jpeg" :
 print "image/jpeg"
   s = f.read() 

   t = loader.get_template ( 'templates/index.html' ) 
   #load the image via render to response or ...?
 
Let's assume the content from s is an imagery.  The question:  Can I load 
upload the content from s within a template?   I'm told that's not possible 
with html tags and I'd have to write the content to disk on the server side 
then pass the url to the my django views.py logic.
 
If I can load the content from s without the need to store the content on 
the server then I'd like an example html and the accompanying logic in 
views.py to test.  Assume the image size is 640x480
 

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Can't open any other view except default "It Worked!" page......

2013-05-04 Thread Daniel O' Shaughnessy
Hi,

This worked fine for me with the polls tutorial app but when I tried 
another app it kept just giving me that page over and over even though I 
followed the same procedure as the polls app except I used inspectdb

Now this page is all I get for anything and I've tried deleting all 
projects and starting new ones but no luck any ideas?

Cheers,

Daniel

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




broken pipe and javascript xmlhttprequest

2010-04-20 Thread }--o
Hi,

could someone explain me why do I get a broken pipe when I call some urls
asynchronously from javascript, but works fine for synchronous calls?
I use django-piston to create a simple read api that I call using something
like

var req = new XMLHttpRequest();
req.open('GET', 'http://127.0.0.1:8000/api/user/', true, user, password); //
this is an async call, because of true, if I set it to false, then
everything runs fine
req.setRequestHeader('Authorization', make_base_auth(user, password));
req.setRequestHeader('Content-Type', 'application/json');
req.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
req.onload = myOnload
req.onstatechange = function(aEvt) {
  if(req.readyState == 4) {
myOnload(aEvt, req);
  }
}
req.send(null);
if(req.status == 200)
  // do something with req.responseText

Here is the output of runserver: the first call to /api/user/ is synchronous
and returns fine, unlike the second one

[20/Apr/2010 05:56:01] "GET /api/user/ HTTP/1.1" 200 72
Traceback (most recent call last):
  File
"/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 280, in run
self.finish_response()
  File
"/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 320, in finish_response
self.write(data)
  File
"/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 399, in write
self.send_headers()
  File
"/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 463, in send_headers
self.send_preamble()
  File
"/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 381, in send_preamble
'Date: %s\r\n' % http_date()
  File "/usr/lib/python2.5/socket.py", line 262, in write
self.flush()
  File "/usr/lib/python2.5/socket.py", line 249, in flush
self._sock.sendall(buffer)
error: (32, 'Broken pipe')

it would be already a great help if someone could give me some ideas at
least how to find out which async call gives the broken pipe error, as when
I call them synchronously, they return fine.

thanks, Viktor

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



buildout and fixtures

2010-02-26 Thread }--o
Hi,

we are switching to buildout for django development, but have several
problems for the moment, mainly related to test running.

Previously we've had a django project in all our applications' directory to
easily run ./manage.py test myapp from inside Eclipse.
now using djangorecipe we can run $ bin/test-1.1, but this is not integrated
into eclipse, which makes its use rather unconvenient.
How should we set up buildout in order to Eclipse recognise the lines of
output?

A related question is about fixtures. How can we load fixtures of an egg?
Here is one of our buildouts:

[buildout]
parts = python django-1.1 omelette
develop = .
eggs =
django-contacts
django-l10n
django-registration
django-uni-form
django-sugar
eggs-directory = /home/nagyv/.buildout/eggs
find-links =
${buildout:eggs-directory}
http://pypi.python.org/simple/
download-cache = /home/nagyv/.buildout/dlcache

extensions = mr.developer
sources = sources
auto-checkout =
uni-form
sugar

[omelette]
recipe = collective.recipe.omelette
eggs = ${buildout:eggs}

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

[django-1.1]
recipe = djangorecipe
version = 1.1.1
project = contacts
projectegg = contacts
settings = testsettings
test = contacts
testrunner = test-1.1
eggs = ${buildout:eggs}

[sources]
uni-form = git git://github.com/nagyv/django-uni-form.git
sugar = git git://github.com/nagyv/django-sugar.git

As a bonus question, I would like to ask as well how to set
${buildout:eggs-directory} and ${buildout:download-directory} for something
like $HOME/.buidout/ I was Googleing after this but without much
success.

thanks for your greatly appreciated help

Enjoy your day!
Viktor

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to use an internal (multi-table inherited) OneToOneField

2010-01-11 Thread }--o
Hi,

I have the following three models

class AbstractModel
   title = CharField

class Quote(AbstractModel)

class Project(AbstractModel)

Instead of creating a new Project when a Quote gets accepted, I would prefer
extending the Quote's abstractproject_prt instance

could someone show me how to do this, please?

thanks, V
-- 

You received this message because you are subscribed to the Google Groups "Django users" group.

To post to this group, send email to django-us...@googlegroups.com.

To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



DjangoUnicodeDecodeError

2010-01-09 Thread }--o
hi,

could someone tell me how to handle this exception?
I try to save some data, the data comes from a csv file read via
codecs.open(file, 'r')

DjangoUnicodeDecodeError: 'utf8' codec can't decode bytes in position
171-176: unsupported Unicode code range. You passed in
'B:\\Dokumentumok\\_Forditas\\12_December\\Tengelmann\\1210\\01-02-03-04-05-06-08-09-10-11-12-14-15\\AA
Nr. 1_Ablagesystematik
Landesimmobiliengesellschaften_Anlage_Muster-Ordnerr\xfcckenschild.doc'
()

thanks, Viktor
-- 

You received this message because you are subscribed to the Google Groups "Django users" group.

To post to this group, send email to django-us...@googlegroups.com.

To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



how to use the iso-codes package

2009-12-14 Thread }--o
Hi,

at
http://git.debian.org/?p=iso-codes/iso-codes.git;a=tree;h=8e097c154f64de7d1ffaa7e0b4d9c459298766f2;hb=8e097c154f64de7d1ffaa7e0b4d9c459298766f2

there are po files on hundreds of languages with all the currency, country
and language names.
to me such a resource would be great to be easily used from django, could
someone help me how to do it?

my simplest idea would be to:
1. add the english names to a database
2. at the template, use django's built-in i18n motor

the problem is that it's a rather problematic approach, especially as such
lists are often used for forms, thus e.g. I'll have to write all the form
templates 1-by-1, or a custom widget, and use that in my form definition.

Does someone have a better idea, or would this be possible to add somewhere
under django.contrib?

thanks

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




awkward backward relationships

2009-11-11 Thread }--o
hi,

I have the following models:

class AbstractTaskOrProject(Model)
  parent = ForeignKey('AbstractProject')

  class Meta:
abstract = True

class AbstractProject(AbstractTaskOrProject)
  pass

class Project(AbstractProject)
  pass

class SubProject(AbstractProject)
  pass

class Task(AbstractTaskOrProject)
  pass

now the strange thing is that a Project instance has the following *_set
backward relationships:
* task_set
* abstractproject_set
but there is no subproject_set at all.
The only thing I have is Project.subproject which is
Subproject.DoesNotExist, given the OneToOneRelationship of the model
inheritance. So this part is clear.

Moreover, if I create a Subproject instance with a given Project as parent,
then clearly mySubproject.parent gives back Parent.
But Project.abstractproject_set is empty.

I would like to get the SubProject instances from a given Project without
running a separate SubProject.objects.filter(parent=myProject). I thought
that SubProject will result in a backward relationship of subproject_set
over the projects, but this did not happen.

Could someone explain me where I get lost in the documentation?

thanks, Viktor

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.




django ajax admin components

2009-11-03 Thread }--o
Hi,

lately I've written several small snippets to get a smoother admin
experience, and I thought about integrating them into the admin app. Is
there any interest in these? Are the contrib authors interested in accepting
such a contribution?

What I did:
* change generic relation's content_type, object_id field, to content_type,
and object_id being populated with an ajax call based on the selected
object_id
* update some field(s) based on a choice of a ForeignKey field (kind of one
model storing templates for another)

For the moment my code is not ready to be published, not general enough to
be included in the contrib app, but I would try cleaning it up, if there is
any interest. I'm using jquery for every javascript.

greets,
Viktor

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



login_required redirects to a specific url

2009-09-27 Thread }--o
Hi,

I'm using the login_required decorator extensively, but have one view where
instead of the default landing page ('accounts/login') I would like to
redirect it to a specific page. Is there a simple way to do this?

Viktor

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django Forms in HTML 4.01 Strict

2009-01-26 Thread Eduardo O. Padoan

On Mon, Jan 26, 2009 at 4:23 PM, Ty  wrote:
>
> I write HTML 4.01 strict documents and I'm using the django.forms form-
> handling library.
>
> Currently when printing input fields on the template, the output
> includes the ending slash: "".
>
> Is there any way, other then manually writing the input field to the
> template, to get these variables to output in an HTML 4.01 strict
> compliance mode?

Django-html[1] provides a {% doctype %} and a {% field %} tag. You
declare your doctype and the field output will be always correct.


[1] http://code.google.com/p/django-html/


-- 
Eduardo de Oliveira Padoan
http://djangopeople.net/edcrypt/
"Distrust those in whom the desire to punish is strong." -- Goethe,
Nietzsche, Dostoevsky

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Eduardo O. Padoan

On Tue, Sep 16, 2008 at 2:59 PM, Sven Richter <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> i am wondering if the "users" path in get_absolute_url
> from the User class is hardcoded?
> I mean this line:
> return "/users/%s/" % urllib.quote(smart_str(self.username))
>
> I have the problem that all my profiles want to reside
> under /profile/username and not /users/username.
>
> Can i subclass this Model and overwrite the function
> somehow?
> Or is there another way to get my profiles path
> without a dirty hack?
>

Jannis Leidel have written about it:
http://jannisleidel.com/2008/08/easy-overrides-absolute-urls-reusable-apps/


> Greetings
> Sven


-- 
Eduardo de Oliveira Padoan
http://djangopeople.net/edcrypt/
http://stopforwarding.us/etiq.html

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Wiki/CMS app?

2008-08-27 Thread Eduardo O. Padoan

On Tue, Aug 26, 2008 at 12:23 PM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I search a Wiki/CMS application to manage a homepage.
>
> This application should:
>  - look like a homepage, not like a Wiki
>  - Content can be HTML and wiki like markup.
>  - No anonymous editing
>  - history: Who has edited which page, Diff between versions, reverting.
>  - Nice URLs http://.../about/ http://.../projects/save-earth/... (not
> /projects/1234/)
>  -  URLs, breadcrumbs and menu-structure use the same hierarchy (That is
> what most
>wikis don't do)
>  - Tracking of internal back links: Warning, if you try to delete a page
> which
>   is still linked (Needs parsing of HTML)
>  - Access control is no issue for me. All users can edit everything.
>  - liberal licence (at best BSD-like)
>  - of course: Django based.
>
> is there already something like this?

Take a look at django-wikiapp.

http://code.google.com/p/django-wikiapp/
https://edge.launchpad.net/django-wikiapp


-- 
 Eduardo de Oliveira Padoan
http://djangopeople.net/edcrypt/
http://whoisi.com/p/514
http://pinax.hotcluboffrance.com/profiles/edcrypt/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Command Line Admin

2008-06-30 Thread Eduardo O. Padoan

On Mon, Jun 30, 2008 at 2:31 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> I thought of something that might prove useful.
>
> Anyone that has installed trac has used trac's command line admin interface.
>
> Something similar for django might be desirable in some situations.
>
> What I'm thinking is more or less a drop-in replacement for the
> django.contrib.admin app. One would get access to admin functionality from
> the command line:
>
>   python manage.py admin-cli
>
> One would be able to add, delete, or modify instances. It is possible that
> this might be more useful as a curses-driven app rather than as a straight
> CLI similar to trac's.
>
> The benefits to such a system would include higher security for the web
> portal. I might have a blog that I really don't want to get spammed. I
> disable comments, and I uninstall the admin interface. I would be able to
> make all changes to my site independent of any web requests. Granted, this
> is security for the paranoid.
>
> Another benefit would be that it is nice to be able to edit content in more
> than one way. Sometimes a full-blown web browser is just out of the
> question. My server doesn't have X on it at all, so if I want to edit
> something through the admin interface, I either have to get up, and bring my
> laptop to where my server terminal is, or I have to get up and go use my
> desktop. Neither of these are a big deal, but the point is that it'd be nice
> to have the option to simply use a CLI for a django admin.
>
> There's no reason to write something like this to make it necessary to take
> out the existing django admin from your INSTALLED_APPS-- it would be an
> opt-in app, just like the web admin interface.
>
> I haven't found anything like this that already exists. I'd be willing to do
> some coding for something like this if there's some interest. Please respond
> with your opinions, comments, constructive criticism, etc. If its already
> been done, I'd be excited to hear about that as well.
>

python manage.py shell


> Jeff Anderson
>
>



-- 
Eduardo de Oliveira Padoan
http://djangopeople.net/edcrypt/
http://whoisi.com/p/514
http://pinax.hotcluboffrance.com/profiles/edcrypt/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Google App Engine & Django

2008-04-08 Thread Eduardo O. Padoan

On Tue, Apr 8, 2008 at 2:36 PM, ydjango <[EMAIL PROTECTED]> wrote:
>
>  I agree, with no support for Django Models and relational databases
>  like mysql and postgressSQl, Google Apps Engine usefulness appears to
>  be limited to more Content Management kind of web application.
>  It pretty much excludes data driven and data intensive applications
>  where data consistency and reliability is very critical (ACID
>  properties).
>
>  Unless I am missing something and Google Data store is intended to be
>  full Object Oriented DB equivalent of Relational DBMS's.

Jut because it is not relational, does not mean that it have no ACID properties.

>  Still it is an exciting development and another great option  to
>  Amazon s3/ec3 services.
>
>  thanks
>  Ashish Gupta
>
>
>  On Apr 8, 4:31 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
>
>
> > On Tue, Apr 8, 2008 at 2:28 AM, Ramin Firoozye <[EMAIL PROTECTED]> wrote:
>  > >  Caveat: there's a waiting list for signing up.
>  >
>  > Another caveat, according to that same page you linked:
>  >
>  > "Since App Engine does not support Django models, leave all DATABASE_*
>  > settings set to an empty string. The authentication and admin
>  > middleware and apps should be disabled since they require Django
>  > models. The functionality these provide is covered by the App Engine
>  > Users API and Admin Console respectively. Sessions also depend on
>  > Django models and must be disabled as well."
>  >
>  > Without models, the vast majority of Django apps won't run at all.
>  >
>  > -Gul
>
>  >
>



-- 
 Eduardo de Oliveira Padoan
http://www.advogato.org/person/eopadoan/
Bookmarks: http://del.icio.us/edcrypt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: New Django Site - tsacomplaints.com

2008-02-07 Thread Eduardo O. Padoan

On Feb 7, 2008 1:19 AM, slartiblartfast <[EMAIL PROTECTED]> wrote:
>
> hey guys - im about to formally launch a new site done with django
> called TSA Complaints (http://www.tsacomplaints.com)
>
> the site is a response to the hundreds of comments taking the TSA to
> task for their well-deserved reputation of being ineffective, lax, and
> generally obnoxious. i hope for it to become a forum for complaints,
> housing the opinion of travelers inconvenienced by the company thats
> supposed to be keeping them safe. eventually, once enough input has
> been given, ill be excitedly mining the results on a regular basis
> (probably weekly-monthly) and publishing the results to watch trends
> in both the short and long (historical) term.
>
> before the grand opening, i'd really appreciate any feedback,
> comments, wisdom or content (especially content!) that the django
> users community has to offer. this is the first kinda-big scale
> project i've launched, too.
>
>
> thanks!

Great idea! Submit as a story to boingboing.net.
The style is nice.  Good use of completion on the airport name input.


> matt dennewitz




-- 
http://www.advogato.org/person/eopadoan/
Bookmarks: http://del.icio.us/edcrypt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: New Django Site - tsacomplaints.com

2008-02-07 Thread Eduardo O. Padoan

On Feb 7, 2008 7:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Found a debug error here: http://www.tsacomplaints.com/airports/PDX/
>

It needs a 404.html.

-- 
http://www.advogato.org/person/eopadoan/
Bookmarks: http://del.icio.us/edcrypt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Re: problem with django admin after update to development version

2008-01-14 Thread patrick . o

I am on a client site on the 11th Jan. I shall respond to your email on my 
return. 

Many thanks

Patrick O'Connor





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---